Answers from the documentation; checking which model is on duty
Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
agent-development - Skill - OpenSmartRoute
Skillv1.0.0
agent-development
Use when the user needs to build AI agents — tool use patterns, memory management, planning strategies, multi-agent coordination, evaluation, and safety guardrails.
Imported from pixel-process-ug/superkit-agents (templates/skills/agent-development/SKILL.md). Install upstream with npx skills add pixel-process-ug/superkit-agents --skill agent-development. Copyright stays with the author.
Agent Development
Overview
Design and build AI agents that effectively use tools, manage memory, plan multi-step tasks, coordinate with other agents, and operate within safety guardrails. This skill covers the full agent development lifecycle from architecture through evaluation, with emphasis on observable, testable, and safe agent behavior.
STOP — Run smoke tests on the agent loop before adding complexity.
Tool Use Patterns
Tool Definition Best Practices
Principle
Rule
Example
Clear naming
verb-noun format
search_documents, create_file
Detailed descriptions
Include when to use AND when NOT to use
"Use for keyword search. Do NOT use for semantic similarity."
Well-typed parameters
Descriptions and examples on every param
query: string // "e.g., 'user authentication'"
Predictable returns
Consistent format across tools
Always return { success, data, error }
Self-correcting errors
Help agent recover
"Invalid date format. Expected ISO 8601: YYYY-MM-DD"
Tool Selection Strategy
Given a task:
1. Identify required information and actions
2. Map to available tools
3. Determine tool call order (dependencies)
4. Execute with result validation
5. Retry or try alternative tool on failure
Tool Design Principles
Composable: small tools that combine for complex tasks
Idempotent: safe to retry without side effects (where possible)
Observable: return enough context for the agent to verify success
Bounded: timeouts and size limits on all operations
Documented: every parameter and return value described
Memory Management
Memory Type Decision Table
Type
Duration
Storage
Use Case
Working Memory
Current turn
Context window
Active reasoning
Short-term Memory
Current session
In-context or buffer
Recent conversation
Long-term Memory
Across sessions
Database/file
Learned patterns, user prefs
Episodic Memory
Specific events
Indexed store
Past task outcomes
Semantic Memory
Knowledge
Vector DB
Domain knowledge retrieval
Context Window Management
Strategy: Sliding window with importance-based retention
1. Always retain: system prompt, tool definitions, current task
2. Summarize: older conversation turns into compressed summaries
3. Evict: least relevant context when approaching limit
4. Retrieve: pull relevant long-term memory on demand
Budget allocation:
System prompt + tools: ~20%
Current task context: ~40%
Conversation history: ~25%
Retrieved memory: ~15%
Memory Update Triggers
Trigger
Action
User correction
Update learned patterns
Task completion
Store outcome and approach
Error recovery
Record what failed and what worked
New domain knowledge
Index for future retrieval
Planning Strategies
Hierarchical Task Decomposition
1. Break high-level goal into sub-goals
2. For each sub-goal, identify required actions
3. Order actions by dependencies
4. Execute with checkpoints between phases
5. Re-plan if intermediate results change the approach
ReAct Pattern (Reason + Act)
Thought: I need to find the user's recent orders to answer their question.
Action: search_orders(user_id="123", limit=5)
Observation: Found 5 orders, most recent is #456 from yesterday.
Thought: The user asked about order #456. I have the details now.
Action: respond with order details
Plan-and-Execute Pattern
1. Create a complete plan before any action
2. Execute each step, checking preconditions
3. After each step, validate the result
4. If a step fails, re-plan from current state
5. Never modify the plan mid-step (finish or abort first)
Reflection Pattern
After completing a task:
1. Was the result correct?
2. Was the approach efficient?
3. What could be improved?
4. Should any memory be updated?
Phase 3: Evaluation and Safety
Build evaluation harness with test scenarios
Measure accuracy, efficiency, and safety metrics
Test edge cases and adversarial inputs
Add monitoring and logging
Implement circuit breakers for runaway behavior
STOP — All safety guardrails must be tested before deployment.
{ "test_cases": [ { "id": "tc_001", "input": "Find all orders over $100 from last week", "expected_tools": ["search_orders"], "expected_output_contains": ["order_id", "amount"], "category": "retrieval", "difficulty": "easy" } ]}
Safety Guardrails
Input Guardrails
Detect and reject prompt injection attempts
Validate all user inputs before processing
Rate limit requests per user/session
Content filtering for harmful requests
Output Guardrails
Validate tool call arguments before execution
Check outputs for sensitive information (PII, secrets)
Enforce response format constraints
Prevent infinite tool call loops
Operational Guardrails
Maximum tool calls per task (circuit breaker)
Maximum tokens per response
Timeout for total task duration
Escalation to human when confidence is low
Audit logging for all actions
Circuit Breaker Thresholds
Condition
Threshold
Action
Max tool calls per task
20
Stop execution, return error
Max consecutive errors
3
Stop, log, return graceful error
Max task duration
5 minutes
Timeout, return partial result
Max tokens generated
10,000
Stop generation
Pattern repeats
5 identical errors
Open circuit, alert operator
Prompt Engineering for Agents
System Prompt Structure
1. Identity and purpose (who the agent is)
2. Available tools (what it can do)
3. Constraints (what it must not do)
4. Output format (how to respond)
5. Examples (few-shot demonstrations)
6. Error handling (what to do when stuck)
Key Prompt Patterns
Scratchpad: encourage step-by-step reasoning before action
Self-correction: "If your first approach fails, try..."
Confidence calibration: "Only proceed if you are confident"
Graceful degradation: "If you cannot complete the task, explain why"
Anti-Patterns / Common Mistakes
Anti-Pattern
Why It Is Wrong
What to Do Instead
Calling tools without reasoning
Wastes calls, misses context
Use ReAct pattern (think first)
No max iteration limit
Infinite loops, runaway costs
Set circuit breaker thresholds
Trusting all tool outputs
Corrupted data propagates
Validate tool results
Hardcoded tool sequences
No adaptability to failures
Dynamic tool selection based on state
No error recovery strategy
Agent gets stuck on first failure
Implement retry with alternatives
Apologizing instead of acting
Wastes user time
Take corrective action, then report
Over-reliance on single tool
Fragile if that tool fails
Provide fallback tools
No evaluation framework
Shipping blind, no quality signal
Build eval harness before deployment
Unlimited context growth
Context overflow, degraded quality
Implement memory management
Integration Points
Skill
Integration
mcp-builder
MCP servers provide tools for agents
planning
Agent planning uses structured plan generation
autonomous-loop
Ralph-style loops are a specialized agent pattern
dispatching-parallel-agents
Multi-agent coordination pattern
circuit-breaker
Operational safety for agent loops
verification-before-completion
Agent output validation
test-driven-development
TDD for agent tool implementations
Skill Type
FLEXIBLE — Adapt the agent architecture, memory strategy, and coordination patterns to the specific use case. Safety guardrails and evaluation frameworks are strongly recommended for all production agents.
Installed into a catalogue, chosen by a router
Install agent-development and it becomes one more candidate the router can pick - when it fits.
A listing is a routing target with a manifest: what it does, which domains it covers, what it costs and who publishes it. Once installed it sits beside your own models and tools, is scored like any other candidate for each request, and shows up in the trace when it wins. Ratings come from workspaces that installed it, one per account.
When a provider is down or over quota the request moves on; the trace says it did.
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
# after Install: the listing is in your workspace's routing pool - a plan picks it for its slotcurl-s-X POST https://api.opensmartroute.ai/api/v1/route -H 'Authorization: Bearer $OSR_API_KEY' -H 'Content-Type: application/json' -d '{"text": "...", "plan": true}'
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.
{
"ocm": "1",
"id": "pixel-process-ug-superkit-agents-agent-development",
"kind": "skill",
"name": "agent-development",
"description": "Use when the user needs to build AI agents — tool use patterns, memory management, planning strategies, multi-agent coordination, evaluation, and safety guardrails. Triggers: user says \"agent\", \"build an agent\", \"tool use\", \"agent loop\", \"multi-agent\", \"memory management\", \"guardrails\", \"agent evaluation\".",
"publisher": "pixel-process-ug",
"version": "1.0.0",
"capabilities": {
"domains": [
"coding",
"data_analysis"
],
"tags": [
"skill-md",
"skills-sh"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"Use when the user needs to build AI agents — tool use patterns, memory management, planning strategies, multi-agent coordination, evaluation, and safety guardrails. Triggers: user says \"agent\", \"build an agent\", \"tool use\", \"agent loop\", \"multi-agent\", \"memory management\", \"guardrails\", \"agent evaluation\"."
],
"primary": false,
"metadata": {
"source": {
"provider": "skills.sh",
"repository": "https://github.com/pixel-process-ug/superkit-agents",
"path": "templates/skills/agent-development/SKILL.md",
"ref": "HEAD",
"url": "https://github.com/pixel-process-ug/superkit-agents/blob/HEAD/templates/skills/agent-development/SKILL.md",
"key": "pixel-process-ug/superkit-agents/templates/skills/agent-development/SKILL.md"
}
},
"instructions": "# Agent Development\n\n## Overview\n\nDesign and build AI agents that effectively use tools, manage memory, plan multi-step tasks, coordinate with other agents, and operate within safety guardrails. This skill covers the full agent development lifecycle from architecture through evaluation, with emphasis on observable, testable, and safe agent behavior.\n\n## Phase 1: Agent Design\n\n1. Define the agent's purpose and scope\n2. Identify required tools and capabilities\n3. Design memory architecture (short-term, long-term)\n4. Plan agent loop structure (observe, think, act)\n5. Define safety boundaries and guardrails\n\n**STOP — Present agent design to user for approval before implementation.**\n\n### Agent Architecture Decision Table\n\n| Agent Type | When to Use | Loop Pattern | Complexity |\n|---|---|---|---|\n| Single-turn tool user | Simple queries with tool calls | Request -> Tool -> Response | Low |\n| ReAct agent | Multi-step reasoning tasks | Thought -> Action -> Observation -> loop | Medium |\n| Plan-and-execute | Complex tasks with dependencies | Plan -> Execute steps -> Validate | Medium-High |\n| Multi-agent orchestrator | Parallel/specialized sub-tasks | Dispatch -> Collect -> Synthesize | High |\n| Autonomous loop (Ralph-style) | Long-running iterative development | Plan -> Build -> Verify -> Exit gate | High |\n\n## Phase 2: Implementation\n\n1. Build the agent loop with tool dispatch\n2. Implement memory management (context window, persistence)\n3. Add planning and decomposition logic\n4. Integrate error recovery and retry patterns\n5. Implement output validation\n\n**STOP — Run smoke tests on the agent loop before adding complexity.**\n\n### Tool Use Patterns\n\n#### Tool Definition Best Practices\n\n| Principle | Rule | Example |\n|---|---|---|\n| Clear naming | verb-noun format | `search_documents`, `create_file` |\n| Detailed descriptions | Include when to use AND when NOT to use | \"Use for keyword search. Do NOT use for semantic similarity.\" |\n| Well-typed parameters | Descriptions and examples on every param | `query: string // \"e.g., 'user authentication'\"` |\n| Predictable returns | Consistent format across tools | Always return `{ success, data, error }` |\n| Self-correcting errors | Help agent recover | \"Invalid date format. Expected ISO 8601: YYYY-MM-DD\" |\n\n#### Tool Selection Strategy\n\n```\nGiven a task:\n1. Identify required information and actions\n2. Map to available tools\n3. Determine tool call order (dependencies)\n4. Execute with result validation\n5. Retry or try alternative tool on failure\n```\n\n#### Tool Design Principles\n\n- **Composable**: small tools that combine for complex tasks\n- **Idempotent**: safe to retry without side effects (where possible)\n- **Observable**: return enough context for the agent to verify success\n- **Bounded**: timeouts and size limits on all operations\n- **Documented**: every parameter and return value described\n\n### Memory Management\n\n#### Memory Type Decision Table\n\n| Type | Duration | Storage | Use Case |\n|---|---|---|---|\n| Working Memory | Current turn | Context window | Active reasoning |\n| Short-term Memory | Current session | In-context or buffer | Recent conversation |\n| Long-term Memory | Across sessions | Database/file | Learned patterns, user prefs |\n| Episodic Memory | Specific events | Indexed store | Past task outcomes |\n| Semantic Memory | Knowledge | Vector DB | Domain knowledge retrieval |\n\n#### Context Window Management\n\n```\nStrategy: Sliding window with importance-based retention\n\n1. Always retain: system prompt, tool definitions, current task\n2. Summarize: older conversation turns into compressed summaries\n3. Evict: least relevant context when approaching limit\n4. Retrieve: pull relevant long-term memory on demand\n\nBudget allocation:\n System prompt + tools: ~20%\n Current task context: ~40%\n Conversation history: ~25%\n Retrieved memory: ~15%\n```\n\n#### Memory Update Triggers\n\n| Trigger | Action |\n|---|---|\n| User correction | Update learned patterns |\n| Task completion | Store outcome and approach |\n| Error recovery | Record what failed and what worked |\n| New domain knowledge | Index for future retrieval |\n\n### Planning Strategies\n\n#### Hierarchical Task Decomposition\n\n```\n1. Break high-level goal into sub-goals\n2. For each sub-goal, identify required actions\n3. Order actions by dependencies\n4. Execute with checkpoints between phases\n5. Re-plan if intermediate results change the approach\n```\n\n#### ReAct Pattern (Reason + Act)\n\n```\nThought: I need to find the user's recent orders to answer their question.\nAction: search_orders(user_id=\"123\", limit=5)\nObservation: Found 5 orders, most recent is #456 from yesterday.\nThought: The user asked about order #456. I have the details now.\nAction: respond with order details\n```\n\n#### Plan-and-Execute Pattern\n\n```\n1. Create a complete plan before any action\n2. Execute each step, checking preconditions\n3. After each step, validate the result\n4. If a step fails, re-plan from current state\n5. Never modify the plan mid-step (finish or abort first)\n```\n\n#### Reflection Pattern\n\n```\nAfter completing a task:\n1. Was the result correct?\n2. Was the approach efficient?\n3. What could be improved?\n4. Should any memory be updated?\n```\n\n## Phase 3: Evaluation and Safety\n\n1. Build evaluation harness with test scenarios\n2. Measure accuracy, efficiency, and safety metrics\n3. Test edge cases and adversarial inputs\n4. Add monitoring and logging\n5. Implement circuit breakers for runaway behavior\n\n**STOP — All safety guardrails must be tested before deployment.**\n\n### Multi-Agent Coordination\n\n#### Coordination Pattern Decision Table\n\n| Pattern | Description | Use When |\n|---|---|---|\n| Orchestrator | Central agent delegates to specialists | Clear task hierarchy |\n| Pipeline | Agents process in sequence | Linear workflows |\n| Debate | Agents propose and critique | Need diverse perspectives |\n| Voting | Multiple agents, majority wins | Uncertainty in approach |\n| Supervisor | One agent monitors others | Safety-critical tasks |\n\n#### Communication Protocol\n\n```\nAgent-to-Agent message:\n{\n \"from\": \"planner\",\n \"to\": \"executor\",\n \"type\": \"task_assignment\",\n \"content\": { \"task\": \"...\", \"context\": \"...\", \"constraints\": \"...\" },\n \"priority\": \"high\",\n \"deadline\": \"2025-01-15T10:00:00Z\"\n}\n```\n\n#### Coordination Rules\n\n- Define clear ownership boundaries\n- Use structured messages between agents\n- Implement deadlock detection\n- Set timeouts for inter-agent communication\n- Log all inter-agent messages for debugging\n\n### Evaluation Framework\n\n#### Metrics Decision Table\n\n| Metric | What It Measures | How to Measure | Target |\n|---|---|---|---|\n| Task Success Rate | Correct completions / total | Automated + human eval | > 90% |\n| Efficiency | Steps vs optimal path | Step count comparison | < 2x optimal |\n| Tool Accuracy | Correct tool calls / total | Log analysis | > 95% |\n| Safety | Violations / total interactions | Guardrail checks | 0 violations |\n| Latency | Time to complete task | Wall clock | < SLA |\n| Cost | Token usage per task | API usage tracking | Within budget |\n\n#### Evaluation Dataset Structure\n\n```json\n{\n \"test_cases\": [\n {\n \"id\": \"tc_001\",\n \"input\": \"Find all orders over $100 from last week\",\n \"expected_tools\": [\"search_orders\"],\n \"expected_output_contains\": [\"order_id\", \"amount\"],\n \"category\": \"retrieval\",\n \"difficulty\": \"easy\"\n }\n ]\n}\n```\n\n### Safety Guardrails\n\n#### Input Guardrails\n\n- Detect and reject prompt injection attempts\n- Validate all user inputs before processing\n- Rate limit requests per user/session\n- Content filtering for harmful requests\n\n#### Output Guardrails\n\n- Validate tool call arguments before execution\n- Check outputs for sensitive information (PII, secrets)\n- Enforce response format constraints\n- Prevent infinite tool call loops\n\n#### Operational Guardrails\n\n- Maximum tool calls per task (circuit breaker)\n- Maximum tokens per response\n- Timeout for total task duration\n- Escalation to human when confidence is low\n- Audit logging for all actions\n\n#### Circuit Breaker Thresholds\n\n| Condition | Threshold | Action |\n|---|---|---|\n| Max tool calls per task | 20 | Stop execution, return error |\n| Max consecutive errors | 3 | Stop, log, return graceful error |\n| Max task duration | 5 minutes | Timeout, return partial result |\n| Max tokens generated | 10,000 | Stop generation |\n| Pattern repeats | 5 identical errors | Open circuit, alert operator |\n\n### Prompt Engineering for Agents\n\n#### System Prompt Structure\n\n```\n1. Identity and purpose (who the agent is)\n2. Available tools (what it can do)\n3. Constraints (what it must not do)\n4. Output format (how to respond)\n5. Examples (few-shot demonstrations)\n6. Error handling (what to do when stuck)\n```\n\n#### Key Prompt Patterns\n\n- **Scratchpad**: encourage step-by-step reasoning before action\n- **Self-correction**: \"If your first approach fails, try...\"\n- **Confidence calibration**: \"Only proceed if you are confident\"\n- **Graceful degradation**: \"If you cannot complete the task, explain why\"\n\n## Anti-Patterns / Common Mistakes\n\n| Anti-Pattern | Why It Is Wrong | What to Do Instead |\n|---|---|---|\n| Calling tools without reasoning | Wastes calls, misses context | Use ReAct pattern (think first) |\n| No max iteration limit | Infinite loops, runaway costs | Set circuit breaker thresholds |\n| Trusting all tool outputs | Corrupted data propagates | Validate tool results |\n| Hardcoded tool sequences | No adaptability to failures | Dynamic tool selection based on state |\n| No error recovery strategy | Agent gets stuck on first failure | Implement retry with alternatives |\n| Apologizing instead of acting | Wastes user time | Take corrective action, then report |\n| Over-reliance on single tool | Fragile if that tool fails | Provide fallback tools |\n| No evaluation framework | Shipping blind, no quality signal | Build eval harness before deployment |\n| Unlimited context growth | Context overflow, degraded quality | Implement memory management |\n\n## Integration Points\n\n| Skill | Integration |\n|---|---|\n| `mcp-builder` | MCP servers provide tools for agents |\n| `planning` | Agent planning uses structured plan generation |\n| `autonomous-loop` | Ralph-style loops are a specialized agent pattern |\n| `dispatching-parallel-agents` | Multi-agent coordination pattern |\n| `circuit-breaker` | Operational safety for agent loops |\n| `verification-before-completion` | Agent output validation |\n| `test-driven-development` | TDD for agent tool implementations |\n\n## Skill Type\n\n**FLEXIBLE** — Adapt the agent architecture, memory strategy, and coordination patterns to the specific use case. Safety guardrails and evaluation frameworks are strongly recommended for all production agents.",
"cost": {
"context_tokens": 2680
}
}
Fetch it by URL: GET /api/v1/registry/pixel-process-ug-superkit-agents-agent-development/manifest?version=1.0.0
Reviews
Star ratings from people who tried it. One review per account; edit yours any time.
No reviews yet. Install it, try it, and be the first to rate it.