openai-cookbook
Examples and guides for using the OpenAI API
Learn to implement out-of-band transcription with OpenAI Realtime sessions. Generate verbatim transcripts without altering conversation state by setting conversation none in response create.
How to Build Tool-Using Agents with LangChainLearn to build tool-using agents with LangChain. Implement a ReAct loop using custom prompts, structured output, and AgentExecutor to let LLMs use external tools dynamically.
Implementing Self-Evolving Agents with Autonomous Retraining: A Complete GuideBuild self-evolving agents with autonomous retraining using OpenAI's Assistants API and reflection logging for continuous improvement. Automate model fine-tuning without human intervention.
Best Practices for Context Engineering in the OpenAI Agents SDKMaster context engineering for OpenAI Agents SDK with best practices. Learn to chunk knowledge, compose structured prompts, and leverage the reasoning field for clearer AI responses. Enhance your agent's performance today.
How to Evaluate Image Inputs with the OpenAI Evals API: A Complete GuideLearn to evaluate image inputs with the OpenAI Evals API. Get a complete guide to automating end-to-end model evaluation with structured, reproducible scores using LLM-based grading.
Building Supply Chain Copilots with Databricks MCP Servers: A Complete Implementation GuideBuild supply chain copilots with Databricks MCP servers and OpenAI Agents SDK. Query live data, leverage vector search, and Unity Catalog with LLM tools for powerful automation.
Using the Seed Parameter for Reproducible Outputs in OpenAI's APIAchieve reproducible outputs with OpenAI API using the seed parameter. Learn how to anchor random number generation for consistent results with the system fingerprint for detecting changes.
Implementing Multi-Tool Orchestration with RAG Using the OpenAI Responses APIImplement multi-tool orchestration with RAG to dynamically route queries across vector stores, web search, and file indexes for advanced information retrieval. Learn more.
Building Temporal Agents with Knowledge Graphs for Retrieval: A Complete GuideLearn to build temporal agents using knowledge graphs for retrieval. This guide shows how to store time-aware facts in a SQLite graph that invalidates stale predictions and tracks entity evolution.
How to Use Prompt Caching to Reduce OpenAI API CostsReduce OpenAI API costs with prompt caching. Learn how this technique cuts input token costs by up to 90% and slashes latency for long prompts.
Implementing Code Execution Plans with Codex CLI and PLANS.md: A Complete GuideAutomate multi-step development with Codex CLI and PLANS.md. Store milestones and commands in PLANS.md for iterative code planning, editing, validation, and repair.
Building Voice Agents with the OpenAI Realtime API: Architecture and Code ExamplesLearn to build voice agents with the OpenAI Realtime API. Explore a production-ready reference implementation with ESP-32, Deno, and React. Get code examples now.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →