docs / agent-framework / overviewgithub.com/Fareground/agent-framework ↗

agent-framework

An agent framework built for web applications, not laptops.

fg-agents (import package fg_agents) runs LLM agents inside a multi-user web product. Most agent frameworks — Claude Agent SDK, LangChain agents, AutoGen, CrewAI — quietly assume a laptop: a local filesystem to write to, a terminal to print to, and a single user who owns the machine. None of that exists in a web backend. There is no filesystem the agent may touch, there are many tenants whose data must never mix, replies have to stream to a browser over SSE, and sessions must survive server restarts.

fg-agents is a drop-in for FastAPI/Starlette that takes those constraints as the starting point. The lean core covers the engine, tools, and in-memory persistence; the web and postgres/sqlite extras add SSE streaming, the HTTP API, and durable persistence — plus multi-tenant isolation and multi-agent orchestration throughout. The entry point is one line: await ask("What's 2+2?") — no client object, model auto-detected from your environment. The usage ladder runs ask() → the Agent facade (multi-turn conversations, async with) → the low-level objects when you need middleware, skills, or a full web backend.

The three things you bring

The framework is deliberate about what it does not do:

Brains, tools, lifecycle

Three ideas structure everything else:

No filesystem — by design

Where a laptop framework would give the agent CLAUDE.md and a scratch directory, fg-agents gives it repository-backed self-management tools: a persistent objective, named knowledge documents, reusable skills, a per-session plan and notes. Everything is keyed by scoped_agent_key(tenant_id, agent_id), so two tenants running the same agent never share a byte of memory. See Concepts.

Status

Distribution fg-agents, version 0.4.0, on PyPI (pip install fg-agents; fg_agents.__version__ reads it from package metadata) · Alpha · Python ≥ 3.11 · lean core (pydantic / structlog / aiohttp) · Part of the Fareground platform. The distribution and import names are the stable identifiers dependents rely on; the repository name (agent-framework) deliberately differs.

→ Start with Getting started · Concepts · API reference · Examples