# AI Cookbook

> Step-by-step solutions that show you how to build reliable, production-ready AI systems with Temporal. Learn practical paradigms for prompts, tools, retries, and Workflow design.

- [Hello world](/ai-cookbook/hello-world-openai-responses-python): Call an LLM from a durable Temporal Workflow in Python using the OpenAI API library.
- [Structured outputs with Temporal and OpenAI](/ai-cookbook/structured-output-openai-responses-python): Use Temporal and the OpenAI Responses API to reliably request output conforming to a specific data structure.
- [Hello world with LiteLLM](/ai-cookbook/hello-world-litellm-python): Integrate LiteLLM into a durable Temporal Workflow in Python to call and switch between LLM providers.
- [Retry policy from HTTP responses](/ai-cookbook/http-retry-enhancement-python): Extract retry information from HTTP response headers and pass it to Temporal's retry mechanisms in Python.
- [Basic agentic loop with Claude and tool calling](/ai-cookbook/agentic-loop-tool-call-claude-python): Build a durable agentic loop in Python with Claude tool calling and Temporal.
- [Basic agentic loop with OpenAI and tool calling](/ai-cookbook/agentic-loop-tool-call-openai-python): Build a durable agentic loop in Python that calls a dynamic set of tools with Temporal and the OpenAI Responses API.
- [Durable MCP weather server](/ai-cookbook/hello-world-durable-mcp-server): Build a durable MCP server in Python that runs weather tools reliably with Temporal Workflows.
- [Tool calling agent](/ai-cookbook/tool-call-openai-python): Build a simple, non-looping Python agent that lets the LLM choose tools and then invokes the chosen tools with Temporal and OpenAI.
- [Durable agent with tools using the OpenAI Agents SDK](/ai-cookbook/openai-agents-sdk-python): Build a durable AI agent with the OpenAI Agents SDK and Temporal that chooses tools to answer user questions.
- [Human-in-the-loop AI agent](/ai-cookbook/human-in-the-loop-python): Add human-in-the-loop approval to a durable AI agent using Temporal Signals in Python.
- [Claim check pattern with Temporal](/ai-cookbook/claim-check-pattern-python): Use the Claim Check pattern with Temporal to keep large payloads out of Event History by offloading them to S3.
- [Deep research](/ai-cookbook/basic-openai-python): Build a multi-agent deep research system in Python with Temporal and the OpenAI Responses API.
