44[ ![ Context7] ( https://img.shields.io/badge/Website-context7.com-blue )] ( https://context7.com/longcipher/bob )
55[ ![ crates.io] ( https://img.shields.io/crates/v/bob-core.svg )] ( https://crates.io/crates/bob-core )
66[ ![ docs.rs] ( https://docs.rs/bob-core/badge.svg )] ( https://docs.rs/bob-core )
7+ [ ![ License] ( https://img.shields.io/badge/license-Apache--2.0-blue.svg )] ( LICENSE.md )
8+ [ ![ Rust] ( https://img.shields.io/badge/rust-2024%20edition-orange.svg )] ( https://www.rust-lang.org/ )
79
810![ bob] ( https://socialify.git.ci/longcipher/bob/image?font=Source+Code+Pro&language=1&name=1&owner=1&pattern=Circuit+Board&theme=Auto )
911
10- Bob is an LLM-powered coding agent built in Rust with a hexagonal (ports & adapters) architecture. It connects to language models via the [ ` genai ` ] ( https://crates.io/crates/genai ) crate and to external tools via [ MCP] ( https://modelcontextprotocol.io/ ) servers using [ ` rmcp ` ] ( https://crates.io/crates/rmcp ) .
12+ ** Bob** is an LLM-powered coding agent built in Rust with a hexagonal (ports & adapters) architecture. It connects to language models via the [ ` genai ` ] ( https://crates.io/crates/genai ) crate and to external tools via [ MCP] ( https://modelcontextprotocol.io/ ) servers using [ ` rmcp ` ] ( https://crates.io/crates/rmcp ) .
13+
14+ ## Features
15+
16+ - 🤖 ** Multi-Model Support** : Works with OpenAI, Anthropic, Google, Groq, and more
17+ - 🔧 ** Tool Integration** : Connect to MCP servers for file operations, shell commands, and custom tools
18+ - 🎯 ** Skill System** : Load and apply predefined skills for specialized tasks
19+ - 💬 ** Interactive REPL** : Chat with the AI agent through a terminal interface
20+ - 🔄 ** Streaming Responses** : Real-time streaming of LLM responses
21+ - 📊 ** Observability** : Built-in tracing and event logging
22+ - 🏗️ ** Clean Architecture** : Hexagonal (ports & adapters) design for extensibility
23+
24+ ## Crates
25+
26+ This workspace contains the following crates:
27+
28+ | Crate | Description | Links |
29+ | -------| -------------| -------|
30+ | ** [ bob-core] ( https://crates.io/crates/bob-core ) ** | Core domain types and port traits | [ ![ docs.rs] ( https://docs.rs/bob-core/badge.svg )] ( https://docs.rs/bob-core ) |
31+ | ** [ bob-runtime] ( https://crates.io/crates/bob-runtime ) ** | Runtime orchestration layer | [ ![ docs.rs] ( https://docs.rs/bob-runtime/badge.svg )] ( https://docs.rs/bob-runtime ) |
32+ | ** [ bob-adapters] ( https://crates.io/crates/bob-adapters ) ** | Adapter implementations | [ ![ docs.rs] ( https://docs.rs/bob-adapters/badge.svg )] ( https://docs.rs/bob-adapters ) |
33+ | ** cli-agent** | CLI application | - |
1134
1235## Architecture
1336
@@ -18,38 +41,116 @@ crates/bob-runtime — Scheduler FSM, prompt builder, action parser, Composite
1841crates/bob-adapters — Concrete adapter implementations (genai, rmcp, in-memory store, tracing)
1942```
2043
44+ ``` text
45+ ┌─────────────────────────────────────────────────────────────┐
46+ │ CLI Agent (bin) │
47+ │ ┌─────────────────────────────────────────────────────┐ │
48+ │ │ DefaultAgentRuntime │ │
49+ │ │ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │ │
50+ │ │ │Scheduler │→ │Prompt │→ │Action Parser │ │ │
51+ │ │ │ FSM │ │Builder │ │ │ │ │
52+ │ │ └──────────┘ └──────────┘ └──────────────────┘ │ │
53+ │ └─────────────────────────────────────────────────────┘ │
54+ └─────────────────────────────────────────────────────────────┘
55+ ↓ uses ports (traits) from bob-core
56+ ┌─────────────────────────────────────────────────────────────┐
57+ │ Adapters (bob-adapters) │
58+ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
59+ │ │GenAI LLM │ │MCP Tools │ │In-Memory │ │ Tracing │ │
60+ │ │ │ │ │ │ Store │ │ Events │ │
61+ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
62+ └─────────────────────────────────────────────────────────────┘
63+ ```
64+
2165See [ docs/design.md] ( docs/design.md ) for the full design document.
2266
2367## Quick Start
2468
2569### Prerequisites
2670
2771``` bash
28- # Install Rust (nightly for formatting )
29- rustup install nightly
72+ # Install Rust (stable )
73+ rustup install stable
3074
3175# Install dev tools
3276just setup
3377```
3478
79+ ### Installation
80+
81+ #### From Source
82+
83+ ``` bash
84+ # Clone the repository
85+ git clone https://github.com/longcipher/bob.git
86+ cd bob
87+
88+ # Build
89+ cargo build --release
90+
91+ # Run
92+ cargo run --release --bin cli-agent -- --config agent.toml
93+ ```
94+
95+ #### Using Cargo
96+
97+ ``` bash
98+ # Install the CLI agent
99+ cargo install --git https://github.com/longcipher/bob cli-agent
100+
101+ # Run
102+ cli-agent --config agent.toml
103+ ```
104+
35105### Configuration
36106
37- Create an ` agent.toml ` in the project root (see the included example) :
107+ Create an ` agent.toml ` in the project root:
38108
39109``` toml
40110[runtime ]
41- default_model = " gpt-4o-mini"
111+ default_model = " openai: gpt-4o-mini"
42112max_steps = 12
43-
44- # Optional: MCP tool server
45- # [mcp]
46- # [[mcp.servers]]
47- # id = "filesystem"
48- # command = "npx"
49- # args = ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
113+ turn_timeout_ms = 90000
114+ model_context_tokens = 128000
115+
116+ # Optional: Configure MCP tool servers
117+ [mcp ]
118+ [[mcp .servers ]]
119+ id = " filesystem"
120+ command = " npx"
121+ args = [" -y" , " @modelcontextprotocol/server-filesystem" , " /tmp" ]
122+ tool_timeout_ms = 15000
123+
124+ # Optional: Configure skills
125+ [skills ]
126+ max_selected = 3
127+ token_budget_ratio = 0.1
128+
129+ [[skills .sources ]]
130+ source_type = " directory"
131+ path = " ./skills"
132+ recursive = false
133+
134+ # Optional: Configure policies
135+ [policy ]
136+ deny_tools = [" local/shell_exec" ]
137+ allow_tools = [" local/read_file" , " local/write_file" ]
50138```
51139
52- Set your LLM provider API key as an environment variable (e.g. ` OPENAI_API_KEY ` ).
140+ ### Environment Variables
141+
142+ Set your LLM provider API key:
143+
144+ ``` bash
145+ # For OpenAI
146+ export OPENAI_API_KEY=" sk-..."
147+
148+ # For Anthropic
149+ export ANTHROPIC_API_KEY=" sk-ant-..."
150+
151+ # For Google
152+ export GEMINI_API_KEY=" ..."
153+ ```
53154
54155### Run
55156
@@ -59,7 +160,59 @@ cargo run --bin cli-agent -- --config agent.toml
59160
60161The REPL prints ` > ` when ready. Type a message and press Enter. Use ` /quit ` to exit.
61162
62- ### Development
163+ ### Example Session
164+
165+ ``` text
166+ > Read the main.rs file and explain what it does
167+
168+ I'll read the main.rs file for you...
169+
170+ [uses filesystem tool to read the file]
171+
172+ The main.rs file implements the CLI agent composition root. It loads
173+ configuration, wires up adapters (LLM, tools, storage, events), creates
174+ the runtime, and runs the REPL loop.
175+
176+ > Now add error handling to that function
177+
178+ [agent modifies the code]
179+
180+ I've added error handling to the function. The changes include:
181+ - Using `Result` return type
182+ - Adding context with `.wrap_err()`
183+ - Handling specific error cases
184+ ```
185+
186+ ## Supported LLM Providers
187+
188+ Bob supports all providers available through [ ` genai ` ] ( https://crates.io/crates/genai ) :
189+
190+ | Provider | Model Examples | Configuration |
191+ | ----------| ---------------| ---------------|
192+ | ** OpenAI** | ` gpt-4o ` , ` gpt-4o-mini ` | Set ` OPENAI_API_KEY ` |
193+ | ** Anthropic** | ` claude-3-5-sonnet-20241022 ` | Set ` ANTHROPIC_API_KEY ` |
194+ | ** Google** | ` gemini-2.0-flash-exp ` | Set ` GEMINI_API_KEY ` |
195+ | ** Groq** | ` llama-3.3-70b-versatile ` | Set ` GROQ_API_KEY ` |
196+ | ** Cohere** | ` command-r-plus ` | Set ` COHERE_API_KEY ` |
197+
198+ ## MCP Tools
199+
200+ Bob integrates with [ Model Context Protocol (MCP)] ( https://modelcontextprotocol.io/ ) servers:
201+
202+ ### Official MCP Servers
203+
204+ - ** Filesystem** : ` @modelcontextprotocol/server-filesystem `
205+ - ** GitHub** : ` @modelcontextprotocol/server-github `
206+ - ** PostgreSQL** : ` @modelcontextprotocol/server-postgres `
207+ - ** Slack** : ` @modelcontextprotocol/server-slack `
208+
209+ ### Custom MCP Servers
210+
211+ You can build custom MCP servers in any language that supports the protocol.
212+
213+ ## Development
214+
215+ ### Development Commands
63216
64217``` bash
65218# Format code
@@ -75,6 +228,22 @@ just test
75228just ci
76229```
77230
231+ ### Project Structure
232+
233+ ``` text
234+ .
235+ ├── bin/
236+ │ └── cli-agent/ # CLI application
237+ ├── crates/
238+ │ ├── bob-core/ # Domain types and ports
239+ │ ├── bob-runtime/ # Runtime orchestration
240+ │ └── bob-adapters/ # Adapter implementations
241+ ├── docs/
242+ │ └── design.md # Architecture design
243+ ├── specs/ # Task specifications
244+ └── .opencode/ # AI development skills
245+ ```
246+
78247## Workspace Configuration
79248
80249### Linting Philosophy
@@ -98,6 +267,68 @@ cargo add <crate> --workspace
98267cargo add < crate> -p < crate-name>
99268```
100269
270+ ## Publishing
271+
272+ ### Publishing to crates.io
273+
274+ Each library crate can be published independently:
275+
276+ ``` bash
277+ # Publish bob-core
278+ cargo publish -p bob-core
279+
280+ # Publish bob-runtime
281+ cargo publish -p bob-runtime
282+
283+ # Publish bob-adapters
284+ cargo publish -p bob-adapters
285+ ```
286+
287+ ### Documentation
288+
289+ Documentation is automatically generated on [ docs.rs] ( https://docs.rs ) when published to crates.io:
290+
291+ - [ bob-core docs] ( https://docs.rs/bob-core )
292+ - [ bob-runtime docs] ( https://docs.rs/bob-runtime )
293+ - [ bob-adapters docs] ( https://docs.rs/bob-adapters )
294+
295+ ## Contributing
296+
297+ Contributions are welcome! Please read our contributing guidelines before submitting PRs.
298+
299+ 1 . Fork the repository
300+ 2 . Create a feature branch
301+ 3 . Make your changes
302+ 4 . Run ` just ci ` to ensure all checks pass
303+ 5 . Submit a pull request
304+
305+ ## Roadmap
306+
307+ - [ ] Persistent session storage (SQLite, PostgreSQL)
308+ - [ ] Web UI for agent interaction
309+ - [ ] Multi-agent collaboration
310+ - [ ] Custom skill marketplace
311+ - [ ] Agent memory and context management
312+ - [ ] Tool composition and chaining
313+ - [ ] More MCP server integrations
314+
101315## License
102316
103- MIT
317+ Licensed under the Apache License, Version 2.0. See [ LICENSE.md] ( LICENSE.md ) for details.
318+
319+ ## Acknowledgments
320+
321+ - [ genai] ( https://crates.io/crates/genai ) - Unified LLM API
322+ - [ rmcp] ( https://crates.io/crates/rmcp ) - MCP client implementation
323+ - [ agent-skills] ( https://crates.io/crates/agent-skills ) - Skill system
324+ - [ Model Context Protocol] ( https://modelcontextprotocol.io/ ) - Tool integration protocol
325+
326+ ## Support
327+
328+ - ** Documentation** : [ docs.rs] ( https://docs.rs/bob-core )
329+ - ** Issues** : [ GitHub Issues] ( https://github.com/longcipher/bob/issues )
330+ - ** Discussions** : [ GitHub Discussions] ( https://github.com/longcipher/bob/discussions )
331+
332+ ---
333+
334+ ** Note** : This project is in active development. APIs may change between versions.
0 commit comments