Back to Documentation
Your First Agent
Quick Start Guide
Create and deploy your first AI agent in under 5 minutes
What You'll Build
In this guide, you'll create a customer support agent that can:
- Answer common questions automatically
- Route complex issues to humans
- Learn from interactions
- Integrate with your existing tools
Step 1: Create the Agent
import { OneC } from '@1cplatform/sdk';
const client = new OneC({
apiKey: process.env.ONEC_API_KEY
});
const agent = await client.agents.create({
name: 'customer-support',
model: 'gpt-4',
instructions: `You are a helpful customer support agent.
Be friendly, concise, and always prioritize customer satisfaction.`,
tools: ['knowledge_base', 'ticket_creation']
});
console.log('Agent created:', agent.id);Step 2: Configure Agent Settings
await client.agents.update(agent.id, {
temperature: 0.7,
max_tokens: 500,
response_format: 'markdown',
fallback_behavior: 'escalate_to_human'
});Step 3: Test Your Agent
const response = await client.agents.chat(agent.id, {
message: 'How do I reset my password?'
});
console.log('Agent response:', response.message);Step 4: Deploy to Production
Once you're satisfied with your agent's performance:
await client.agents.deploy(agent.id, {
environment: 'production',
auto_scaling: true,
rate_limit: 1000 // requests per minute
});