What Are Agent Primitives?
Agent primitives are the fundamental building blocks that make up Agentbase agents. Understanding these primitives helps you build more sophisticated and capable agents.Environment
Execution environments where agents operate
Essentials
Core capabilities every agent needs
Extensions
Advanced features for specialized use cases
Environment Primitives
The runtime environment where agents execute tasks.Sandbox
Isolated, secure execution environment for each agent
File System
Persistent file storage and management
Computer
Full Linux environment with shell access
Browser
Web browser automation and interaction
Essential Primitives
Core capabilities that power agent functionality.Interaction & Control
Interaction & Control
- Prompts - Natural language instructions and system prompts
- Custom Tools - Extend agent capabilities with your own tools
- Hooks - Event-driven triggers and callbacks
State & Memory
State & Memory
- States - Manage agent state and variables
- Sessions - Persistent conversations and context
- Persistence - Long-term data storage
- Context Management - Optimize context window usage
Execution & Coordination
Execution & Coordination
- Multi-Agents - Coordinate multiple agents
- Parallelization - Run tasks concurrently
- Background - Long-running async operations
Reliability & Evolution
Reliability & Evolution
- Self-Healing - Automatic error recovery
- Self-Evolving - Agents that improve over time
- Versioning - Track and manage agent versions
Extension Primitives
Advanced features for specialized use cases.Intelligence & Learning
Intelligence & Learning
- Memory - Long-term memory and recall
- RAG - Retrieval-Augmented Generation
- Workflow - Complex multi-step workflows
- Orchestration - Coordinate complex agent systems
Data & Integration
Data & Integration
- Data Connectors - Connect to external data sources
- Integrations - Third-party service integrations
- MCP - Model Context Protocol support
Web & Content
Web & Content
- Web Search - Real-time web search
- Crawl & Scrape - Extract data from websites
- OCR - Extract text from images
- Email - Send and receive emails
User Experience
User Experience
- Voice - Voice interaction and synthesis
- Interface - UI components and widgets
- Authentication - User authentication and authorization
Automation & Scheduling
Automation & Scheduling
- Tasks - Structured task management
- Skills - Reusable agent capabilities
- Trigger - Event-based automation
- Scheduling - Time-based execution
How Primitives Work Together
Primitives combine to create powerful agent capabilities:Example: Research Agent
A research agent might use these primitives:1
Input via Prompts
User provides research query through natural language prompt
2
Web Search Extension
Agent uses web search to find relevant sources
3
Browser Environment
Navigates to websites and extracts content
4
RAG Extension
Stores and retrieves information from documents
5
File System
Saves research findings and generates report
6
Session Persistence
Maintains context across multiple queries
7
Traces
Logs all steps for debugging and optimization
Choosing the Right Primitives
Start Simple
Begin with essential primitives (prompts, sessions, file system)
Add as Needed
Incorporate extensions when requirements grow
Consider Performance
More primitives = more complexity (balance capability vs. efficiency)
Test Thoroughly
Use traces and evals to validate primitive interactions
Common Patterns
Pattern 1: Simple Task Execution
Primitives: Prompts + Sandbox + TracesPattern 2: Stateful Conversation
Primitives: Prompts + Sessions + Context ManagementPattern 3: Research & Analysis
Primitives: Web Search + Browser + RAG + File SystemPattern 4: Automated Workflow
Primitives: Scheduling + Tasks + Hooks + EmailPattern 5: Multi-Agent System
Primitives: Multi-Agents + Orchestration + ParallelizationLearning Path
1
Start with Environment
Understand the sandbox, file system, and computer primitives
2
Master Essentials
Learn prompts, sessions, and custom tools
3
Add Extensions
Explore extensions like web search, RAG, and memory as needed
4
Optimize & Monitor
Use traces, evals, and versioning