Metadata-Version: 2.4
Name: agentroute
Version: 1.0.0
Summary: Build, deploy, and monetize AI agents
Project-URL: Homepage, https://agentroute.ai
Project-URL: Documentation, https://docs.agentroute.ai
Project-URL: Repository, https://github.com/agentroute-ai/agentroute
Author-email: AgentRoute <hello@agentroute.ai>
License: MIT
Keywords: a2a,agents,ai,llm,marketplace,mcp
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: docstring-parser>=0.16
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.6
Requires-Dist: typing-extensions>=4.10
Provides-Extra: dev
Requires-Dist: mypy>=1.8; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-httpx>=0.30; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.3; extra == 'dev'
Description-Content-Type: text/markdown

# agentroute (Python SDK)

Build, deploy, and monetize AI agents. Phase 1 (Foundation) ships the
core `Agent` + `@agent.tool` loop against any OpenAI-compatible model
(OpenRouter default, plus Ollama and custom HTTP endpoints).

## Install

```bash
pip install agentroute
```

## Quick start

### Layer 0 — three-line hello world

```python
from agentroute import Agent

agent = Agent("my-bot", model="claude-sonnet-4")
print(agent.run("Tell me a joke"))
```

Set `AGENTROUTE_API_KEY` (or `OPENROUTER_API_KEY`) to an OpenRouter key.
One key works for every model string (`claude-sonnet-4`, `gpt-4o`,
`gemini-2.0-flash`, `deepseek-v3`, ...).

### Layer 1 — add a tool

```python
from agentroute import Agent

agent = Agent("weather-bot", model="claude-sonnet-4")

@agent.tool
def get_weather(city: str) -> str:
    """Get the current weather for a city."""
    return "Sunny, 22C"

print(agent.run("What's the weather in Zurich?"))
```

The SDK reads the function's name, type hints, and docstring — no extra
schema is required.

### Async

```python
import asyncio
from agentroute import Agent

async def main() -> None:
    agent = Agent("bot", model="claude-sonnet-4")
    result = await agent.arun("hi")
    print(result.output)

asyncio.run(main())
```

### Local models (Ollama)

```python
agent = Agent("local", model="ollama/llama3")
print(agent.run("hi"))
```

## Development

```bash
cd packages/python
pip install -e '.[dev]'
pytest            # unit tests
pytest -m integration  # live tests (requires API key)
ruff check src tests
mypy src/agentroute
```

Phase 1 scope: `Agent`, `Tool`, `Context`, `Result`, `Event`, `ModelCloud`,
`resolve_model()`, `Config`, exceptions. Memory, structured output, multi-agent,
guards, MCP, A2A, and deployment land in later phases.
