← Code Exchange
MCP + Temporal Durable Agents
This project shows how to build durable AI agents using four production-grade components:
- OpenAI Agents SDK — agent runtime and coordination
- Temporal Python SDK — durable workflows, retries, and long-running tasks
- Model Context Protocol (MCP) — standard interface for tools and data sources
- (Optional) Pydantic Logfire — unified observability (logs, traces, metrics) with native LLM & agent instrumentation
If you’re tired of debugging Celery tasks, running into scalability limits, or wrestling with LangGraph dependency issues, this project is for you.
The included example (“financial research agent”) runs a planner → parallel web search → writer → verifier flow. Agent steps are executed inside Temporal Activities and orchestrated by a Temporal Workflow, so each step is persisted, replayable, and automatically retried on failure. Temporal UI lets you visualize the orchestration end-to-end.