Overview
Custom agents extend Junkie’s capabilities by adding specialized skills to the team. This guide shows how to create, configure, and integrate new agents.Agent Anatomy
An agent in Junkie consists of:- Identity: ID, name, and role
- Model: LLM configuration
- Tools: Functions the agent can call
- Instructions: System prompt and behavior guidelines
- Context: Date/time awareness and timezone
Basic Agent Structure
Step-by-Step: Creating an Agent
1. Define Agent Purpose
Determine what specialized task your agent will handle. Examples from Junkie:- Code Agent: Sandbox execution and file operations
- Perplexity Agent: Real-time web research
- Context Q&A Agent: Chat history analysis
2. Choose the Right Model
Select a model based on your agent’s requirements:3. Select or Create Tools
Tools define what your agent can do:tools/e2b_tools.py- Sandbox operationstools/history_tools.py- Chat history retrievaltools/bio_tools.py- User information
4. Write Instructions
Instructions guide the agent’s behavior:- Start with agent identity and purpose
- List capabilities clearly
- Provide tool usage guidelines
- Include critical instructions in CAPS
- Specify response format expectations
5. Configure Context Awareness
- Time-sensitive responses
- Understanding message timestamps
- Date calculations
Integration into Team
Once created, add your agent to the team:Delegation Configuration
Update the Team Leader’s delegation hierarchy insystem_prompt.md:
Example: Creating a Database Agent
Here’s a complete example:Testing Your Agent
-
Verify initialization:
-
Test in isolation:
-
Test delegation:
Best Practices
1. Single Responsibility
Each agent should have one clear purpose: ✅ Good: “Code Agent” - handles all sandbox execution❌ Bad: “Helper Agent” - does many unrelated tasks
2. Appropriate Model Selection
- Fast models (Groq): Quick, simple tasks
- Long-context models (Gemini): Large data analysis
- Advanced models (GPT-5): Complex reasoning
3. Tool Organization
4. Clear Instructions
- Use markdown formatting
- Include examples
- Highlight critical rules with CAPS
- Specify error handling
5. Resource Management
If your agent uses external resources:Advanced: Conditional Agents
Create agents only when needed:Next Steps
- System Prompts - Configure agent behavior
- Memory Management - Add memory to agents
- E2B Tools - Create custom tools