Metadata-Version: 2.4
Name: ai37-agent-host
Version: 0.1.0a2
Summary: AI37 agent host (Python): A2A + AG-UI + MCP + file-aware store backends поверх a2a-sdk и ai37-agent-sdk. Порт @ai37/agent-host.
License: Apache-2.0
License-File: LICENSE
Author: AI37
Requires-Python: >=3.11,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Provides-Extra: redis
Requires-Dist: a2a-sdk (>=1.0.0)
Requires-Dist: ai37-agent-sdk (>=0.1.0a1,<0.2.0)
Requires-Dist: anyio (>=4.4)
Requires-Dist: fastapi (>=0.110)
Requires-Dist: httpx (>=0.27,<0.29)
Requires-Dist: redis (>=5.0) ; extra == "redis"
Requires-Dist: sse-starlette (>=2.0)
Requires-Dist: starlette (>=0.37)
Description-Content-Type: text/markdown

# ai37-agent-host (Python)

Host-слой A2A-агентов экосистемы **AI37** (Python). Порт TS-пакета `@ai37/agent-host`
поверх официального **`a2a-sdk`** (Starlette) и базового **`ai37-agent-sdk`** (auth/billing/context).

Разработчик агента реализует **один** контракт `AgentHandler.run(req) -> AgentResult` и вызывает
`create_agent_host(...)`, а host даёт весь транспорт (A2A JSON-RPC/REST, AG-UI SSE, опц. MCP),
JWT-guard, content-negotiation A2UI, file-aware store-backends и Langfuse-трассировку.

> Base-SDK (`ai37-agent-sdk`) — синхронный; host — async. На стыке billing/auth sync-вызовы
> оборачиваются в `anyio.to_thread.run_sync`, чтобы не блокировать event-loop.

## Статус

Порт в работе (Фаза 2). Готово:

- `types` — контракты (`AgentHandler`/`AgentInput`/`AgentEvent`/`AgentResult`/`ContextFile`/`A2uiComponent`/…);
- `als` — request-scope на `contextvars` (`current_ctx`/`current_bearer`/`current_supported_catalog_ids`/…).

В работе: `parse`, `build_task`, `a2a_executor`, `auth_guard`, `output_modes`, `a2ui`,
`create_agent_host`, `store_backend` (+`read_raw`), `agui`, `mcp`, `relay`, `observability/langfuse`.

