Metadata-Version: 2.4
Name: agno-agent-builder
Version: 0.1.3
Summary: Parametrizable Agno-based agent runtime — FastAPI factory with pluggable agent sources, multi-tenant headers, and LISTEN/NOTIFY hot reload.
Project-URL: Homepage, https://github.com/Zetesis-Labs/PayloadAgents
Project-URL: Repository, https://github.com/Zetesis-Labs/PayloadAgents
Project-URL: Issues, https://github.com/Zetesis-Labs/PayloadAgents/issues
Author: Zetesis Labs
License: MIT
Keywords: agent,agno,fastapi,llm,mcp,rag
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: agno[anthropic,mcp,openai,os,postgres,telegram]>=2.6.0
Requires-Dist: cryptography>=42.0
Requires-Dist: fastapi>=0.115
Requires-Dist: httpx>=0.28
Requires-Dist: psycopg[binary]>=3.2
Requires-Dist: pydantic>=2.9
Requires-Dist: structlog>=24.1
Requires-Dist: uvicorn[standard]>=0.34
Description-Content-Type: text/markdown

# agno-agent-builder

Parametrizable Agno runtime as a library. Build a fully configured FastAPI app
for chat with hot-reloadable agents fetched from any source you plug in.

## Quick start

```python
from agno_agent_builder import create_app, RuntimeConfig, PayloadAgentSource

app = create_app(
    RuntimeConfig(
        app_name="my-runtime",
        agent_source=PayloadAgentSource(
            base_url="http://payload:3000",
            internal_secret="...",
        ),
        mcp_url="http://mcp:3001/mcp",
        database_url="postgresql://user:pass@host:5432/db",
        internal_secret="...",
    )
)
```

## Public API

| Symbol | Purpose |
|---|---|
| `create_app(config)` | Returns a configured FastAPI app |
| `RuntimeConfig` | Pydantic model — required + optional knobs |
| `AgentSource` | Protocol — implement `async fetch_agents() -> list[AgentConfig]` |
| `AgentConfig` | Normalized per-agent record (CMS-agnostic) |
| `PayloadAgentSource` | Default source for Payload CMS |
| `build_agent`, `build_model`, `build_mcp_tools` | Lower-level builders for advanced wiring |
| `compose_instructions`, `DEFAULT_TOOL_PROTOCOL`, `DEFAULT_OUTPUT_FORMAT` | Override-friendly prompt building blocks |

## What you get

- AgentOS REST surface (`/agents`, `/sessions`, `/metrics`, …)
- `POST /agents/{slug}/runs` SSE chat
- `/health`, `/ready` Kubernetes probes
- `POST /internal/agents/reload` admin endpoint
- Postgres `LISTEN/NOTIFY` hot reload + 5-min belt-and-braces resync
- ASGI middlewares: `X-Request-ID`, `X-Internal-Secret` auth, `X-Tenant-Id` → `request.state.metadata`

## Reference consumer

The default consumer that ships in this repo lives in
[`../agno-agent`](../agno-agent) — it wraps `create_app` with env-driven
settings and is what runs in the `agno-agent` devcontainer service. ZP and
nexus install this lib from PyPI and write their own thin consumer.
