Skip to main content
Learn Temporal / AI

Temporal + AI.

Build Durable AI Agents that survive failures mid-conversation, or hand your AI coding assistant deep Temporal expertise.

AI Cookbook Recipes

Bite-sized Python recipes you can copy into a project today. Each one shows a single pattern - calling an LLM, looping with tool calls, signaling for human approval - and explains the Temporal design decisions behind it.

FoundationsOpenAIPython

Hello World

Call an LLM from a Workflow. The Temporal-flavored Hello World - generic Activity, retries handled by Temporal, not the OpenAI client.

View recipe
Tool CallingOpenAIPython

Tool calling agent

The foundational tool-calling pattern: LLM decides what tool to invoke, Temporal Activity runs it, result feeds back to the LLM.

View recipe
AgentsTool CallingOpenAIPython

Agentic loop (OpenAI)

Full agentic loop with dynamic Activities so tools are loosely coupled from agent logic. Conversation history threaded through each turn.

View recipe
AgentsTool CallingAnthropicPython

Agentic loop (Claude)

Same agentic loop pattern, but with Anthropic's Messages API and Claude's input_schema tool format.

View recipe
AgentsOpenAIPython

OpenAI Agents SDK

Use Temporal's OpenAI Agents SDK integration. Activities become tools via activity_as_tool - no manual LLM Activity required.

View recipe
MCPPython

Durable MCP server

Expose Temporal Workflows as MCP tools using FastMCP. Each tool invocation kicks off a durable Workflow.

View recipe
AgentsSignalsOpenAIPython

Human-in-the-loop

Pause an agent on risky actions, wait for human approval via Temporal Signal, then continue or cancel. Wait for hours or days with zero compute cost.

View recipe
PatternsPython

Claim check pattern

Offload large conversation history to S3 via a PayloadCodec so your Event History stays under the server size limit.

View recipe
AgentsDeep ResearchOpenAIPython

Deep research

Multi-agent research pipeline: planning, query generation, web search, report synthesis. Survives failures across dozens of LLM calls.

View recipe

See the full library at docs.temporal.io/ai-cookbook.

Use AI to Write Temporal Code

Install Temporal-aware skills and an MCP server into your AI coding assistant.

SKILL

Temporal Developer Skill

Hands AI coding agents (Claude Code, Cursor, Codex) expert knowledge of determinism rules, Activity patterns, retry policies, testing, versioning, and the pitfalls Temporal devs hit.

Claude Code/plugin install temporal@temporal-marketplace
Learn more
SKILL

Temporal Cloud Skill

Helps AI agents troubleshoot Temporal Cloud connectivity, authentication, and configuration. Useful when your agent is already writing Cloud-deployed apps.

Any agent (npx)npx skills add https://github.com/temporalio/skill-temporal-cloud
Learn more
MCP SERVER

Temporal Knowledge Base

Real-time MCP server compiled from docs, courses, the community forum, and Slack. Your AI assistant queries it for best practices instead of guessing.

Claude Codeclaude mcp add --scope user --transport http temporal-docs https://temporal.mcp.kapa.ai
Learn more

Setup instructions for Cursor, Codex, Claude Desktop, and manual installs live at docs.temporal.io/with-ai.

Get notified when we launch new educational content

New courses, tutorials, and learning resources - straight to your inbox.

Subscribe
Feedback