Custom agents
Create custom Otto agents to accomplish specific tasks with configurable models, temperatures, MCPs, and prompts.
You can invoke a custom agent by clicking Otto at the bottom of the chat panel and choosing your named custom agent instead.
Organization
All custom agents must be located in the agents subfolder within a dedicated otto directory in your Ascend Project:
- Screenshot
- File tree

├── otto
│ ├── agents
│ │ ├── custom_agent.md
│ ├── mcp.yaml
│ ├── otto.yaml
│ └── rules
│ └── demo_welcome.yaml
│ └── git_commits.yaml
Agent structure
Custom agents are markdown files with YAML frontmatter that define the agent's model, settings, and tool access, plus a markdown body containing the agent's instructions. See the Custom Otto agents reference for complete configuration details.
Extend built-in agents
Use the extends field to inherit configuration from a built-in agent. This lets you customize Otto's behavior without redefining all tools and settings from scratch.
We recommend extending the chat agent — it's the fully-featured Otto experience with all tools, rules, and optimized settings:
---
otto:
agent:
name: My Custom Agent
extends: chat
---
Additional instructions for your agent go here.
These are appended to the base agent's instructions.
Inheritance behavior
When you extend an agent:
- Instructions: Your instructions are appended to the base agent's instructions
- Config fields:
tools,model,model_settings,max_turns, andmcp_serversare inherited unless you explicitly override them - Multi-level inheritance: Agents can extend other custom agents, with circular reference detection
Example: SQL-focused agent
This agent extends chat but narrows the model temperature for more deterministic SQL generation:
---
otto:
agent:
name: SQL Expert
extends: chat
model_settings:
temperature: 0.1
---
You are a SQL expert. When users ask questions, prefer writing SQL queries to answer them.
Always use CTEs instead of nested subqueries. Explain your query logic step by step.
The agent inherits all tools and capabilities from chat while adding SQL-specific instructions and a lower temperature for consistent output.
Code reviewer agent example
This example shows a custom code reviewer agent that enforces SQL and Python patterns, naming standards, code formatting. The agent style aligns with prompt engineering best practices from Anthropic and MotherDuck:
GOOD - Use CTEs for clarity and maintainability:
Why CTEs are better:
- Each step has a descriptive name explaining its purpose
- Logic flows top-to-bottom, matching how humans read
- Easy to test intermediate steps independently
- Simple to add new transformations without deep nesting
- Comments can clarify the business logic at each stage
Python Error Handling
- Never allow bare
except:blocks - Require specific exception types
- Exception messages must be actionable and descriptive
- Consider suggesting logging for important errors
Import Organization
Order Python imports in three groups with blank lines between:
- Standard library imports
- Third-party library imports
- Local application imports
Sort alphabetically within each group.
How to Provide Feedback
Structure your response as follows:
- Summary - Brief overview of what you reviewed and overall assessment
- Critical Issues (if any) - Problems that will cause bugs or failures
- Style Violations - Deviations from the style guide
- Suggestions - Optional improvements for code quality
For each issue:
- State the file name and line number
- Explain what's wrong and why it matters
- Show the current code
- Provide the corrected version
Proposing Changes
After your review, use the file editing tools to suggest specific changes:
- Only modify lines that violate the guidelines above
- Make minimal, surgical edits - never rewrite entire files
- Group related changes together (e.g., all naming fixes, then all formatting fixes)
- Provide a clear description for each change explaining the rationale
When Code is Clean
If the code adheres to all guidelines, respond with: "✓ Code review complete. No issues found. The code follows all style conventions and data engineering best practices."
Important Guidelines
- Be respectful and constructive - assume the developer had good intentions
- Prioritize issues: correctness > readability > style preferences
- If a guideline conflicts with existing codebase patterns, note the inconsistency and ask the user for guidance
- When in doubt about whether something is an issue, explain your reasoning and let the user decide
- Focus on teaching - explain why a change improves the code, not just what to change
## Next steps
- 📝 [Learn how custom agents and rule prompts work in Ascend](/how-to/otto/prompts.mdx)
- 🤖 [Configure your agents](/how-to/otto/otto-config.mdx)
- 🖥️ [Set up MCP servers](/how-to/otto/mcp.mdx) to extend agent capabilities