OpenAI AgentKit Tutorial: Step-by-Step Guide to Building AI Agents (2025)
On October 6, 2025, OpenAI launched AgentKit at DevDay 2025—a complete platform for building, deploying, and optimizing AI agents. This step-by-step tutorial covers everything you need: pricing and free tier access, real-world cost calculations, AgentKit vs Zapier/n8n comparisons, and hands-on examples to build production-ready agents. Learn Agent Builder's visual canvas, embed ChatKit interfaces, manage MCP connectors, and deploy with confidence using workflow automation best practices.
Core Components
DevDay 2025 Launch
Platform Fees
Pricing Model
Key Takeaways
Understanding OpenAI AgentKit
On October 6, 2025, OpenAI unveiled AgentKit at DevDay 2025—a comprehensive platform designed to democratize AI agent development. Whether you're a developer building customer support systems, an enterprise automating workflows, or a product team adding conversational experiences, AgentKit provides the tools you need to build production-ready AI agents.
AgentKit represents OpenAI's vision for making AI agents accessible to developers and enterprises of all sizes. Instead of requiring deep machine learning expertise or complex infrastructure setup, AgentKit provides a visual interface for composing agent logic, pre-built components for common patterns, and integrated tools for optimization.
What Makes AgentKit Different
Unlike traditional automation platforms that rely on rigid if-then logic, AgentKit puts AI reasoning at the center of every workflow. This enables:
AgentKit is included with standard API pricing—no additional platform fees or subscriptions required. You only pay for the API calls your agents make, making it cost-effective for projects of any size.
Four Core Components
AgentKit consists of four interconnected components that work together to provide a complete agent development platform:
Drag-and-drop interface for building multi-agent workflows with nodes, tools, and guardrails. Includes preview runs, inline eval configuration, and full versioning.
Simple embeddable chat interface that handles streaming responses, manages threads, shows model thinking, and provides engaging in-chat experiences.
Consolidates data sources into a single admin panel across ChatGPT and API. Includes pre-built connectors and third-party MCP support.
Four evaluation capabilities: datasets, trace grading, automated prompt optimization, and third-party model support.
Agent Builder: Visual Workflow Design
Agent Builder provides a visual canvas for designing agentic workflows without writing code. Every agent consists of nodes (individual processing steps) that can be connected in sequential or parallel patterns.
Key Features
Visual node-based interface for composing agent logic. Connect Agent nodes (powered by GPT models), tool nodes (actions), and logic nodes (conditions, loops) in any order.
Add custom guardrails between nodes to prevent sensitive data leaks, validate outputs, or enforce business rules. Insert PII protection automatically.
Test workflows directly in the builder with live preview runs. See agent reasoning, inspect node outputs, and debug issues before deployment.
Full versioning support for workflows. Roll back changes, compare versions, and safely test modifications without affecting production agents.
Multi-Agent Architecture
Agent Builder supports complex multi-agent workflows where multiple AI agents collaborate to solve problems. A common pattern uses three specialized agents:
1. Extraction Agent (GPT-5, Minimal Reasoning)
Parses input data into structured JSON output. Fast processing with low reasoning requirements.
2. Analysis Agent (GPT-5, Low Reasoning)
Analyzes structured data and generates insights. References upstream agent outputs using bracket notation: {{input.output_text}}
3. Action Agent (GPT-5 + Tools, Minimal Reasoning)
Takes action based on analysis. Can use web search, API calls, or database operations. Outputs widget-formatted results.
Context Variables
Agents can reference data from previous nodes using bracket notation:
// Reference workflow input
{{workflow.input_as_text}}
// Reference previous node output
{{input.output_text}}
// Reference specific fields
{{extraction_agent.skills}}
{{analysis_agent.recommendations}}ChatKit: Embeddable Chat Experiences
ChatKit makes it simple to embed chat-based agents that feel native to your product. Deploying chat UIs for agents can be surprisingly complex—handling streaming responses, managing threads, showing the model thinking, and designing engaging in-chat experiences.
ChatKit solves these challenges with a pre-built React component that you can customize and embed in minutes.
Key Features
- Streaming Responses: Real-time message streaming with proper loading states and animations
- Thread Management: Automatic conversation thread handling with history and context retention
- Model Thinking Display: Shows agent reasoning and decision-making process to users
- In-Chat Experiences: Widget support for rich content like charts, tables, and interactive elements
- Customizable Theming: Use ChatKit Studio's playground to generate custom theme configurations
- Session Management: Schema-based configuration for user sessions and authentication
Quick Start with ChatKit
Setting up ChatKit takes less than 5 minutes:
Step 1: Clone Starter Template
git clone https://github.com/openai/chatkit-starter
cd chatkit-starterStep 2: Configure Workflow ID
# .env.local
NEXT_PUBLIC_CHATKIT_WORKFLOW_ID=your_workflow_id_here
OPENAI_API_KEY=your_api_key_hereGet your workflow ID from Agent Builder's "Code" section after publishing your workflow.
Step 3: Install and Run
npm install
npm run devCustom Integration Example
For custom implementations, integrate ChatKit directly:
import { ChatKit } from '@openai/chatkit-react';
export default function AgentChat() {
return (
<ChatKit
workflowId={process.env.NEXT_PUBLIC_CHATKIT_WORKFLOW_ID}
apiKey={process.env.OPENAI_API_KEY}
theme={{
primaryColor: '#3b82f6',
backgroundColor: '#ffffff',
fontSize: '14px'
}}
onMessage={(message) => {
console.log('User message:', message);
}}
onResponse={(response) => {
console.log('Agent response:', response);
}}
/>
);
}Connector Registry & MCP
The Connector Registry consolidates data sources into a single admin panel across ChatGPT and the OpenAI API. This unified approach makes it easy for administrators to manage how data sources and tools connect across all OpenAI products.
Pre-Built Connectors
AgentKit includes pre-built connectors for popular enterprise services:
- Dropbox
- Google Drive
- OneDrive
- Box
- Microsoft Teams
- SharePoint
- Slack
- Notion
- GitHub
- GitLab
- Jira
- Linear
Model Context Protocol (MCP)
Model Context Protocol (MCP) is an open standard for connecting AI models to external data sources and tools. The Connector Registry supports third-party MCP connectors, enabling you to integrate any hosted MCP server with your agents.
What MCP Enables
- Connect agents to internal APIs and proprietary data sources
- Integrate with databases (PostgreSQL, MySQL, MongoDB)
- Access CRM systems (Salesforce, HubSpot, Zoho)
- Perform real-world actions (send emails, create tickets, update records)
- Use community-built connectors from the MCP ecosystem
Enterprise Data Security
The Connector Registry provides centralized control over data access:
- Role-Based Access Control: Define who can access which connectors and data sources
- Audit Logging: Track all data access and connector usage for compliance
- Encrypted Credentials: API keys and secrets stored with AES-256 encryption
- Secure Token Management: OAuth tokens automatically refreshed and rotated
Evals for Agent Optimization
AgentKit includes powerful evaluation tools to help you improve agent performance. The Evals feature provides four key capabilities for optimization:
Rapidly build agent evals by uploading sample prompts matching input/output variable names. Test agents against real-world scenarios.
End-to-end assessment of agentic workflows. Evaluate cross-agent dependencies and complex multi-step behaviors.
Generate improved prompts based on your annotations. The system suggests prompt improvements automatically.
Evaluate models from other providers. Compare performance across different AI models in your workflows.
Single Agent Optimization
To optimize a single agent in your workflow:
1. Access Evals from Agent Builder
Select an agent node and click "Evaluate" to launch the Evals datasets feature directly from the builder.
2. Upload Sample Prompts
Create a dataset by uploading sample prompts that match your agent's input/output variable names. Include edge cases and challenging scenarios.
3. Generate Model Responses
Run your agent against the dataset to generate responses. The system records all inputs, outputs, and reasoning steps.
4. Add Human Annotations
Review responses and add ratings, feedback, or corrections. Your annotations guide the optimization process.
5. Create Model Graders
Set up automated evaluation criteria using model graders. The system learns from your annotations to assess future responses.
Full Workflow Optimization
Use trace grading to assess end-to-end performance across multiple agents:
- Multi-Agent Evaluation: Test how agents work together in complex workflows
- Cross-Agent Dependencies: Identify bottlenecks and issues in data flow between agents
- End-to-End Metrics: Measure overall workflow success rate, latency, and token usage
- A/B Testing: Compare different workflow configurations to find optimal setups
Building Your First AI Agent
Let's build a practical example: a career development assistant that analyzes resumes and recommends courses. This workflow uses three specialized agents working together.
Step 1: Set Up Agent Builder
Access Agent Builder
1. Navigate to https://platform.openai.com/agent-builder
2. Log in with OpenAI credentials
3. Ensure billing details are added
4. Verify your organization in account settingsStep 2: Create Resume Extraction Agent
Configuration:
- Model: GPT-5
- Reasoning Level: Minimal
- Purpose: Parse uploaded resumes into structured JSON
Output Schema:
{
"skills": ["JavaScript", "React", "Node.js"],
"experience": [
{
"title": "Software Engineer",
"company": "Tech Co",
"years": 3
}
],
"education": {
"degree": "BS Computer Science",
"school": "University Name"
}
}Step 3: Create Career Analysis Agent
Configuration:
- Model: GPT-5
- Reasoning Level: Low
- Input: References extraction agent output using
{{input.output_text}} - Purpose: Analyze skill gaps relative to target roles
Prompt Example:
Analyze the following resume data and identify skill gaps
for senior software engineering roles:
{{input.output_text}}
Provide:
1. Current skill level assessment
2. Missing skills for target role
3. Recommended learning path
4. Estimated time to proficiencyStep 4: Create Course Recommendation Agent
Configuration:
- Model: GPT-5
- Reasoning Level: Minimal
- Tools: Web search capability enabled
- Output Format: Widget-formatted recommendations
This agent searches for courses that address the identified skill gaps and formats results as interactive cards with pricing, duration, and platform information.
Step 5: Test and Deploy
Preview Run
Use the built-in preview feature to test your workflow with sample resumes. Inspect each agent's output to verify correct data flow.
Add Guardrails
Insert PII protection between the extraction and analysis agents to prevent sensitive personal information from being logged or exposed.
Publish Workflow
Click "Publish" to generate your workflow ID. Copy this ID for use with ChatKit or direct API integration.
Deployment & Integration
AgentKit provides multiple deployment options depending on your use case and infrastructure requirements:
Deploy your agent as an embedded chat interface in your existing web application:
// Install ChatKit
npm install @openai/chatkit-react
// Embed in your app
import { ChatKit } from '@openai/chatkit-react';
<ChatKit
workflowId="your-workflow-id"
apiKey={process.env.OPENAI_API_KEY}
/>Call your agent workflows directly via the OpenAI API:
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.OPENAI_API_KEY
});
const response = await client.workflows.run({
workflow_id: 'your-workflow-id',
input: {
user_message: 'Analyze this resume...',
context: { user_id: '123' }
}
});
console.log(response.output);Deploy as a standalone chat application using the ChatKit starter template:
# Clone starter template
git clone https://github.com/openai/chatkit-starter
cd chatkit-starter
# Configure
echo "NEXT_PUBLIC_CHATKIT_WORKFLOW_ID=your-workflow-id" > .env.local
echo "OPENAI_API_KEY=your-api-key" >> .env.local
# Deploy
vercel deployVersion Management
Agent Builder includes full version control for workflows:
- Version History: Track all changes to your workflow configuration
- Rollback Support: Revert to previous versions if issues arise
- Version Comparison: Compare different versions side-by-side
- Safe Testing: Test changes in preview mode before deploying to production
- Deployment Tags: Tag specific versions for production, staging, and development
Pricing & Availability
As of October 6, 2025, AgentKit tools are included with standard OpenAI API pricing. There are no additional platform fees, subscriptions, or usage charges for using Agent Builder, ChatKit, Connector Registry, or Evals.
What's Included
- ChatKit: Available to all developers with API access
- Evals: Complete evaluation toolkit including datasets, trace grading, and optimization
- Standard API: All OpenAI models accessible via standard pricing
- Agent Builder: Visual workflow designer in beta
- Connector Registry: Beginning rollout for API, Enterprise, and Edu customers
- Advanced Features: Priority access for enterprise customers
Cost Structure
You only pay for the OpenAI API calls your agents make:
| Model | Input (per 1M tokens) | Output (per 1M tokens) |
|---|---|---|
| GPT-5 | $3.00 | $15.00 |
| GPT-4.1 | $2.50 | $10.00 |
| GPT-4o-mini | $0.15 | $0.60 |
Getting Started
To start building with AgentKit:
1. OpenAI Account
Sign up at platform.openai.com with billing enabled
2. Access Agent Builder
Navigate to platform.openai.com/agent-builder (beta access)
3. Build Your Workflow
Use the visual canvas to create and test your agent workflow
4. Deploy with ChatKit
Embed in your application or deploy as standalone chat interface
Real-World Use Cases
AgentKit enables a wide range of practical applications across industries. Here are proven use cases that demonstrate the platform's versatility:
Build intelligent support agents that handle tier-1 queries, route complex issues, and maintain conversation context:
- Ticket Triage: Automatically classify and route support tickets based on content and urgency
- Knowledge Base Search: Find relevant help articles using semantic search and summarization
- Escalation Logic: Detect when human intervention is needed and seamlessly transfer conversations
Create agents that analyze data, generate insights, and produce automated reports:
- SQL Query Generation: Convert natural language questions into optimized database queries
- Visualization Creation: Generate charts and dashboards based on data patterns
- Trend Detection: Identify anomalies and trends in business metrics
Build workflows for creating, reviewing, and optimizing content at scale:
- Multi-Step Generation: Research topics, draft content, fact-check, and optimize for SEO
- Brand Compliance: Ensure content matches brand voice and style guidelines
- Translation Pipeline: Translate and localize content while preserving meaning
Automate software development workflows with AI-powered agents:
- GitHub Issue Analysis: Scan repositories, classify issues, and detect duplicates
- Code Review: Analyze pull requests for bugs, security issues, and best practices
- Documentation Generation: Auto-generate docs from code and keep them synchronized
Intelligent agents for qualifying leads and automating sales workflows:
- Lead Scoring: Analyze lead data and assign priority scores based on fit and intent
- Personalized Outreach: Generate customized emails based on prospect research
- Meeting Scheduling: Coordinate calendars and send reminders automatically
Process legal documents, ensure compliance, and extract structured data:
- Contract Analysis: Extract key terms, deadlines, and obligations from legal documents
- Regulatory Compliance: Check documents against compliance requirements automatically
- Invoice Processing: Extract data from invoices and match to purchase orders
Building AI agents with AgentKit requires thoughtful workflow design, proper tool integration, and ongoing optimization. Digital Applied specializes in implementing AI-powered automation solutions that can accelerate your AgentKit deployment.
AgentKit Implementation Services
- AI Transformation Strategy: Assess your business processes and identify high-impact opportunities for AgentKit workflows—from customer support automation to data analysis pipelines
- CRM Integration & Automation: Connect AgentKit agents with HubSpot or Zoho CRM using MCP connectors for seamless customer data access, automated lead scoring, and intelligent follow-up workflows
- Workflow Design Best Practices: Learn proven multi-agent architectures, proper reasoning level configuration, and effective eval strategies to optimize both performance and cost
- Custom MCP Connector Development: Build third-party MCP connectors to integrate AgentKit with your proprietary systems, databases, or internal APIs
Common AgentKit Use Cases We Support:
- Customer support triage with automated ticket routing and knowledge base search
- Sales pipeline automation with lead qualification and personalized outreach
- Content workflows with research, drafting, fact-checking, and SEO optimization
- Data analysis agents that generate SQL queries, visualizations, and automated reports
Frequently Asked Questions
Conclusion
OpenAI AgentKit represents a significant leap forward in making AI agents accessible to developers and enterprises. Launched at DevDay 2025, the platform combines visual workflow design, embeddable chat interfaces, unified data source management, and powerful optimization tools—all included with standard API pricing.
Whether you're building customer support bots, automating content workflows, or creating intelligent data analysis tools, AgentKit provides the components you need to build production-ready agents quickly. The visual Agent Builder eliminates complex coding, ChatKit handles all UI concerns, the Connector Registry simplifies data integration, and Evals ensure your agents improve over time.
With beta access rolling out and core features available now, this is the perfect time to explore AgentKit for your next AI-powered project. Start building at platform.openai.com/agent-builder.