Metadata-Version: 2.4
Name: axeon-atrest
Version: 0.2.0
Summary: Agent Task Runtime & State Transport — middleware for AI agent communication, memory, and task lifecycle
License-Expression: MIT
Keywords: ai,agents,multi-agent,orchestration,middleware,llm
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: redis>=5.0
Requires-Dist: neo4j>=5.0
Requires-Dist: httpx>=0.27
Requires-Dist: rich>=13.0
Requires-Dist: python-dotenv>=1.0
Requires-Dist: pydantic>=2.0
Requires-Dist: openai>=1.0
Provides-Extra: api
Requires-Dist: fastapi>=0.100; extra == "api"
Requires-Dist: uvicorn>=0.22; extra == "api"
Provides-Extra: all
Requires-Dist: fastapi>=0.100; extra == "all"
Requires-Dist: uvicorn>=0.22; extra == "all"

# AT Rest — Agent Task Runtime & State Transport

Middleware untuk agent communication, memory, dan task lifecycle.

4 agent built-in (planner, researcher, reviewer, mentor) via Redis Streams bus.
Neo4j task persistence. FastAPI REST API server. Qdrant + Neo4j knowledge retrieval.

## Quick Start

```bash
pip install atrest
```

```python
from atrest import Agent, generate, search

class MyAgent(Agent):
    channel = "researcher"

    def handle_request(self, msg):
        goal = msg["payload"]["goal"]
        results = search(goal, limit=3)
        summary = generate(f"Summarize: {goal}\n\nContext: {results}")
        return {"summary": summary, "sources": []}

MyAgent().run()
```

## Available Imports

```python
from atrest import Agent, ATRestClient, AgentBus, TaskStore, generate, embed, search
```

- `Agent` — base class for custom agents
- `ATRestClient` — HTTP client for AT Rest API
- `AgentBus` — Redis Streams pub/sub
- `TaskStore` — Neo4j AgentTask persistence
- `generate()` — Ollama LLM call
- `embed()` — Ollama embedding
- `search()` — Qdrant vector search

## Optional: API Server

```bash
pip install atrest[api]
python -m api.server
```

## Architecture

```
User → REST API / Agent SDK → Agent Bus (Redis Streams)
  → Planner → Researcher / Reviewer / Mentor
  → Task Store (Neo4j) → Broadcast
  → Knowledge (Qdrant + Neo4j)
```

## License

MIT
