Metadata-Version: 2.4
Name: pdz-agent-core
Version: 0.1.2
Summary: Unified Agent Core — declarative agent manifests, pluggable registries, and interfaces for the AgentForge harness.
Author: pdz1804
License: MIT
Project-URL: Homepage, https://github.com/pdz1804/agentforge
Project-URL: Repository, https://github.com/pdz1804/agentforge
Project-URL: Documentation, https://github.com/pdz1804/agentforge/tree/main/docs
Project-URL: Issues, https://github.com/pdz1804/agentforge/issues
Keywords: agents,llm,langgraph,agent-framework,ai,openai,anthropic
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic>=2.6
Requires-Dist: pyyaml>=6.0
Requires-Dist: langgraph>=0.2
Requires-Dist: langgraph-checkpoint-sqlite>=2.0
Requires-Dist: httpx>=0.27
Requires-Dist: asyncpg>=0.29
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.39; extra == "anthropic"
Provides-Extra: openai
Requires-Dist: openai>=1.40; extra == "openai"
Provides-Extra: mem0
Requires-Dist: mem0ai>=0.1; extra == "mem0"
Provides-Extra: mcp
Requires-Dist: mcp>=1.0; extra == "mcp"
Provides-Extra: postgres
Requires-Dist: pgvector>=0.3.6; extra == "postgres"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pgvector>=0.3.6; extra == "dev"
Dynamic: license-file

# agent-core

**Unified Agent Core** — a declarative, provider-agnostic runtime for building
LLM agents from YAML manifests. It's the shared core that powers
[AgentForge](https://github.com/pdz1804/agentforge) and, unmodified, the
naturalist assistant in [FloraLens](https://github.com/pdz1804/floralens) —
proving one runtime can serve very different products.

## Features

- **Declarative manifests** — define an agent (model, prompt, tools, limits,
  guardrails, io-schema) in YAML; load + validate fail-fast.
- **Pluggable registries** — register model providers, tools, prompts, memory
  backends, and guardrails; extend without editing the core.
- **LangGraph ReAct runtime** with **live token streaming** over an SSE-friendly
  trace bus.
- **Model providers** — OpenAI, Anthropic, and an offline Echo provider for
  deterministic tests.
- **Built-in tools** — web search, HTTP fetch, sandboxed code execution,
  embedding search; plus MCP auto-binding for external tool servers.
- **Multi-agent supervisor** — expose sub-agents to a supervisor as tools.
- **Guardrails & io-schema** enforced at runtime; **memory** (in-memory / mem0);
  opt-in durable **SQLite checkpointer** for multi-turn threads.
- **Evaluation harness** — dev/held-out suites, programmatic/rubric/LLM-judge
  scoring, and a regression gate.

## Install

```bash
pip install "pdz-agent-core[openai]"   # + OpenAI provider; imported as `agent_core`
# extras: [anthropic] [mem0] [mcp] [dev]
```

## Quickstart

```python
from agent_core import build_default_registries, compile_agent, load_manifest_dict

manifest = {
    "id": "echo_agent",
    "model": {"provider": "echo", "name": "test-model"},
    "prompt_ref": "prompts/echo_agent.md",
    "tools": [],
}
agent = compile_agent(load_manifest_dict(manifest), build_default_registries())

async for event in agent.astream("hello"):
    print(event.type, event.detail)
```

## Documentation

Full architecture, API, and the cross-product reuse write-up live in the
AgentForge repo under [`docs/`](https://github.com/pdz1804/agentforge/tree/main/docs).

## License

MIT © pdz1804
