Fine-tune your agents with the right model, temperature, and prompt configuration to achieve optimal performance for your specific use case.
| Model | Best For | Speed | Cost |
|---|---|---|---|
| claude-sonnet-4-20250514 | Complex reasoning, writing, analysis | Medium | $$ |
| claude-3-haiku | Simple tasks, high volume | Fast | $ |
| gpt-4o | Multimodal, general purpose | Fast | $$ |
| gpt-4o-mini | Cost-effective, most tasks | Fast | $ |
| deepseek-r1 | Reasoning, math, code | Medium | $ |
Factual tasks, data extraction, code generation, following strict rules
Balanced tasks, customer support, general writing, analysis
Creative writing, brainstorming, marketing copy, storytelling
{
"modelConfig": {
"maxTokens": 4096, // Max tokens in response
"maxInputTokens": 100000, // Max context (model dependent)
"stopSequences": ["\n\nHuman:", "END"] // Stop generation triggers
}
}Tip: Set maxTokens based on expected output. Short answers (500), detailed responses (2000), long-form content (4000+).
The system prompt is the most critical configuration. It defines your agent's identity, capabilities, and constraints.
Clearly state who the agent is and its primary function.
List what the agent CAN do.
Define boundaries and what the agent should NOT do.
Define tone, format, and interaction patterns.
{
"name": "advanced-agent",
"modelConfig": {
"provider": "anthropic",
"model": "claude-sonnet-4-20250514",
"temperature": 0.7,
"maxTokens": 4096,
"topP": 0.9, // Nucleus sampling
"topK": 40, // Top-K sampling
"frequencyPenalty": 0.5, // Reduce repetition
"presencePenalty": 0.3 // Encourage new topics
},
"contextConfig": {
"includeHistory": true,
"historyLimit": 20, // Max conversation turns
"includeSystemTime": true,
"includeUserContext": true
},
"retryConfig": {
"maxRetries": 3,
"retryDelay": 1000, // ms between retries
"exponentialBackoff": true
},
"streamingConfig": {
"enabled": true,
"chunkSize": 100 // Characters per chunk
},
"cachingConfig": {
"enabled": true,
"ttl": 3600, // Cache TTL in seconds
"keyPrefix": "agent-cache"
}
}