Prompt Structure
GAIA prompts are Python strings inapp/agents/prompts/ that define:
- Identity: Who the agent is
- Purpose: What the agent does
- Behavior: How the agent responds
- Constraints: What the agent should avoid
- Context: Information available to the agent
Comms Agent Prompt
Fromapp/agents/prompts/comms_prompts.py, the comms agent has a conversational personality:
Key Elements
- Personality Definition: Clear identity and tone
- Style Guidelines: Specific response patterns
- Message Formatting: Using
NEW_MESSAGE_BREAKERfor chat bubbles - Constraints: What to avoid
Creating a Custom Prompt
1. Create Prompt File
Createapp/agents/prompts/my_agent_prompts.py:
2. Use Dynamic Variables
Incorporate runtime context:Prompt Injection
Inject prompts into agents via system prompt nodes:Workflow-Specific Prompts
Fromapp/agents/prompts/workflow_prompts.py:
Tool Usage Instructions
Guide agents on when to use tools:Multi-Agent Prompts
For subagents with specific roles:Testing Prompts
Evaluate prompt effectiveness:Common Patterns
Conversational Tone
Conversational Tone
Structured Output
Structured Output
Error Handling
Error Handling
Context Awareness
Context Awareness
Next Steps
Testing Agents
Learn how to test your prompts and agents
Creating Tools
Build tools that work with your prompts