Expand description
§Tinytown
A simple, fast multi-agent orchestration system using Redis for message passing.
Tinytown takes the best ideas from complex orchestration systems and distills them into a minimal, fast, and easy-to-use library. It uses Redis with Unix socket communication for blazing-fast local message passing between agents.
§Key Features
- Simple: 5 core types, 1 config file, 3 commands
- Fast: Redis with Unix socket for sub-millisecond message passing
- Reliable: Agents persist work in git worktrees, survive crashes
- Observable: Built-in activity logging and status monitoring
§Quick Example
use tinytown::{Town, Agent, Task, Result};
#[tokio::main]
async fn main() -> Result<()> {
// Connect to town (auto-starts Redis if needed)
let town = Town::connect("./mytown").await?;
// Create an agent
let agent = town.spawn_agent("worker-1", "claude").await?;
// Assign a task
let task = Task::new("Fix the bug in auth.rs");
agent.assign(task).await?;
// Wait for completion
agent.wait().await?;
Ok(())
}Re-exports§
pub use agent::Agent;pub use agent::AgentId;pub use agent::AgentState;pub use agent::AgentType;pub use channel::Channel;pub use config::Config;pub use error::Error;pub use error::Result;pub use global_config::GlobalConfig;pub use message::Message;pub use message::MessageId;pub use message::MessageType;pub use message::Priority;pub use plan::TaskEntry;pub use plan::TasksFile;pub use plan::TasksMeta;pub use task::Task;pub use task::TaskId;pub use task::TaskState;pub use town::Town;
Modules§
- agent
- Agent definitions and lifecycle management.
- channel
- Redis-based message passing channels.
- config
- Configuration management for tinytown.
- error
- Error types for tinytown.
- global_
config - Global configuration stored in ~/.tt/config.toml
- message
- Message types for inter-agent communication.
- plan
- Task planning DSL - Simple TOML-based task definitions.
- task
- Task definitions and state management.
- town
- Town - the central orchestration hub.