System Prompt Configuration
Configure how your Dexto agent behaves and responds through system prompts that define personality, capabilities, and guidelines.
For complete field documentation and all configuration options, see agent.yml → System Prompt.
Overview
System prompts define your agent's personality, behavior, and capabilities. They serve as the foundational instructions that guide how your agent interprets and responds to user requests.
You can use either a simple string for basic scenarios or an advanced multi-contributor system for complex agents that need dynamic context, file-based instructions, or memory integration.
Key capabilities:
- Static instructions for consistent behavior
- Dynamic context (date/time, MCP resources)
- File-based documentation inclusion
- Priority-based content ordering
For user memory integration, use the top-level memories configuration instead of system prompt contributors.
Configuration Types
Simple String Prompt
For straightforward agents, use a single string:
systemPrompt: |
You are a helpful AI assistant with access to tools.
Use these tools when appropriate to answer user queries.
After each tool result, determine if you need more information or can provide a final answer.
Advanced Multi-Contributor System
For complex scenarios requiring multiple content sources:
systemPrompt:
contributors:
- id: core-behavior
type: static
priority: 1
content: |
You are a professional software development assistant.
You help with coding, documentation, and project management.
- id: current-time
type: dynamic
priority: 10
source: dateTime
- id: project-docs
type: file
priority: 20
files:
- "${{dexto.agent_dir}}/README.md"
- "${{dexto.agent_dir}}/CONTRIBUTING.md"
options:
includeFilenames: true
errorHandling: "skip"
# Memory is configured separately at the top level
memories:
enabled: true
limit: 10
Contributor Types
Static Contributors
Fixed text content for consistent instructions.
- id: guidelines
type: static
priority: 1
content: |
Always be helpful, respectful, and thorough.
Provide step-by-step solutions when possible.
Dynamic Contributors
Runtime-generated content:
dateTime- Current date and time contextresources- MCP server resources (disabled by default)
- id: timestamp
type: dynamic
priority: 10
source: dateTime
enabled: true
File Contributors
Include external documentation files (.md and .txt only):
- id: project-context
type: file
priority: 20
files:
- "${{dexto.agent_dir}}/docs/guidelines.md"
- "../README.md"
options:
includeFilenames: true
separator: "\n\n---\n\n"
maxFileSize: 50000
Path resolution: Relative paths are resolved from the config file location.
Priority Ordering
Contributors execute in ascending priority order (1 → 100+). Lower numbers appear first in the final system prompt.
Recommended ranges:
- 1-10: Core behavior and role definition
- 10-50: Dynamic context (time, resources)
- 50-100: File-based documentation
- 100+: Additional context and overrides
Use Cases
| Scenario | Recommended Approach |
|---|---|
| Simple chatbot | Single string prompt |
| Development assistant | Static + File contributors for guidelines |
| Customer support | Static + top-level memories config |
| Research agent | Static + Dynamic (resources) for live data |
| Personal assistant | Static + File + Dynamic + memories config |
Examples
Production Agent
systemPrompt:
contributors:
- id: core
type: static
priority: 1
content: |
You are a helpful AI assistant designed to work with tools and data.
Provide clear, accurate responses and use available tools effectively.
- id: timestamp
type: dynamic
priority: 10
source: dateTime
Customer Support Agent
systemPrompt:
contributors:
- id: role
type: static
priority: 1
content: |
You are a customer support assistant.
Always be polite, professional, and solution-oriented.
memories:
enabled: true
limit: 10
Best Practices
- Keep it focused - Clear, specific instructions work better than lengthy prompts
- Use priority ordering - Structure from general (role) to specific (context)
- Test behavior - Validate that prompts produce desired agent responses
- File contributors for docs - Keep large documentation in separate files
- Enable resources selectively - MCP resources can be large; only enable when needed
- Use top-level memories - Configure memory retrieval via the
memoriesconfig field
See Also
- agent.yml Reference → System Prompt - Complete field documentation
- Memory Configuration - Configure the memory system
- MCP Configuration - Set up resource providers