Arboretum is a powerful dynamic agent architecture built with Elixir and Phoenix for creating, managing, and scaling autonomous agents that interact with Large Language Models (LLMs). It excels at both individual agent operations and large-scale batch processing with up to hundreds of concurrent agents.
- Dynamic Agent System: Create, configure, and deploy LLM agents on demand
- Batch Processing: Run hundreds of concurrent agent operations with built-in rate limiting
- Phoenix LiveView UI: Real-time interface for agent management and monitoring
- Provider Abstraction: Support for multiple LLM providers with a unified API
- Rate Limiting: Smart rate limiting to respect API provider constraints
- Resilient Architecture: Built with OTP principles for maximum reliability
- Elixir 1.15+
- Erlang 26+
- PostgreSQL 13+
- Node.js 18+ (for asset compilation)
For a step-by-step setup walkthrough see docs/SETUP.md.
# Clone the repository
git clone https://github.com/alanwilhelm/arboretum.git
cd arboretum
# Install dependencies
mix setup
# Reset and seed the database
./scripts/reset_and_seed_db.sh
# Start the Phoenix server
mix phx.server
Then visit localhost:4000
to explore the application.
arboretum/
├── lib/
│ ├── arboretum/ # Core business logic
│ │ ├── abilities/ # Agent abilities
│ │ ├── agents/ # Agent management
│ │ ├── batch_results/ # Batch operation results
│ │ └── ...
│ ├── arboretum_web/ # Web interface
│ │ ├── live/ # LiveView components
│ │ ├── controllers/ # Web controllers
│ │ └── ...
│ └── examples/ # Example use cases
├── priv/
│ ├── repo/ # Database migrations and seeds
│ └── static/ # Static assets
├── test/ # Test suite
├── scripts/ # Utility scripts
└── docs/ # Documentation and planning
Arboretum's agent system is built on Elixir's GenServer and OTP principles:
- AgentServer: Individual agent processes that can perform LLM operations
- AgentServerManager: Supervises and coordinates agent lifecycles
- Registry & DynamicSupervisor: Core OTP components for managing dynamic processes
The batch processing system enables large-scale concurrent operations:
- BatchManager: Coordinates batch operations across multiple agents
- BatchResults: Stores and retrieves operation results
- Rate Limiting: Prevents API rate limit violations
The LLM client system provides a unified interface to language models:
- LLMClient: Core client with provider abstraction
- Middleware: Extensible middleware system for request processing
- Error Handling: Robust error handling with retries
The web interface is built with Phoenix LiveView for real-time interactions:
- Agent Management: Create, configure, and monitor agents
- Batch Operations: Launch and track batch operations
- Results Viewer: Analyze operation results
For more detailed documentation:
- See the docs/ directory for planning and architecture documents
- Review the GitHub Wiki for guides and tutorials
- Check out examples/ for sample implementations
Arboretum is under active development. Current focus areas:
- Building a monitoring dashboard
- Adding streaming support
- Implementing API key management
- Developing a comprehensive test suite
For a detailed roadmap, see our GitHub Project or Issues.
# Run the test suite
mix test
# Run with detailed output
mix test --trace
# Format code
mix format
# Check formatting
mix format --check-formatted
# Run migrations
./scripts/migrate.sh
# Reset and seed the database
./scripts/reset_and_seed_db.sh
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.