JeevesAgent¶
Production-ready async agent harness. Multi-tenant by default, typed outputs, retries on transient errors, model-agnostic, MCP-native.
import asyncio
from pydantic import BaseModel
from jeevesagent import Agent
class WeatherReport(BaseModel):
city: str
temp_c: float
conditions: str
async def main():
agent = Agent("Be precise.", model="gpt-4.1-mini")
r = await agent.run("Hi, my name is Alice.", user_id="alice")
print(r.output)
r = await agent.run(
"Weather in Tokyo: sunny, 22°C, light wind. Extract.",
user_id="alice",
session_id="conv_42",
output_schema=WeatherReport,
)
report: WeatherReport = r.parsed # typed, validated
print(f"{report.city}: {report.temp_c}°C — {report.conditions}")
asyncio.run(main())
Why pick this¶
user_idis a first-class typed primitive. OneAgent+ oneMemorypartitions automatically across N tenants. No more “forgot to namespace” data leaks.output_schema=accepts any Pydantic model. Framework augments the system prompt, parses, validates, retries with feedback on failure. Typed outputs by default.Network model adapters auto-wrapped with a typed error taxonomy
retry policy. Rate limits, 5xx, network blips don’t blow up your run. Resilient by default.
session_idis a real conversation handle. Reuse it and prior turns rehydrate as real chat history. No reducer protocol.Twelve agent-loop architectures shipped behind one
Agentconstructor. One kwarg flips the iteration pattern.
Get started
- Quickstart
- Setup
- 1. Hello, agent (no API keys, no infrastructure)
- 2. Real models
- 3. Tools
- 4. Streaming events
- 5. MCP servers
- 6. Jeeves Gateway (one line)
- 7. Memory: pick a backend
- 8. Bi-temporal facts
- 9. Durable replay
- 10. Telemetry (OpenTelemetry)
- 11. Audit log
- 12. Permissions + hooks
- 13. Sandbox (filesystem)
- 14. Budget
- Putting it all together
- Recipes
- Architecture
Migrating from
Reference