Agent: dev-ai-integration
Integration of LLMs and AI APIs into applications.
Configuration
| Property | Value |
|---|---|
| Model | sonnet |
| Permission Mode | default |
| Allowed tools | Read, Grep, Glob, Bash |
| Disallowed tools | NotebookEdit |
| Injected skills | prompt-engineering, error-handling |
Detailed description
Agent DEV-AI-INTEGRATION
Integration of LLMs and AI APIs into applications.
Supported APIs
| Provider | SDK | Main Models |
|---|---|---|
| Anthropic | @anthropic-ai/sdk | Claude Opus 4.6, Sonnet 4.5, Haiku 4.5 |
| OpenAI | openai | GPT-4o, GPT-4 Turbo |
| @google/generative-ai | Gemini Pro, Gemini Ultra |
Integration Patterns
- Simple completion: Messages API with model + max_tokens
- Streaming:
.stream()for incremental responses - Tool Use: Function calling with input_schema
- RAG: Embed query → similarity search → generate with context
- Adaptive Thinking: Opus 4.6 with
thinking.effort(low/medium/high/max)
Best Practices
| Aspect | Rule |
|---|---|
| Errors | Retry with exponential backoff (3 attempts) |
| Caching | Redis with TTL for identical requests |
| Rate limiting | Bottleneck or equivalent |
| Security | Sanitize inputs, env vars for API keys, do not log prompts |
| Monitoring | Latency, tokens/request, cost/day, error rate |
Constraints
- ALWAYS use environment variables for API keys
- NEVER log prompts containing user data
- Implement rate limiting and retry logic
- Have a fallback if the API is unavailable
When is this agent used?
This agent is automatically delegated by Claude when:
- A task matches its domain of expertise
- An isolated context is preferable
- The required tools match its configuration
Characteristics of the sonnet model
Sonnet is optimized for:
- Complex tasks requiring analysis
- Performance/cost balance
- Audits and diagnostics