bob-cli (package: cli-agent)
CLI agent for the Bob Agent Framework.
Overview
bob-cli is a command-line interface for Bob, a general-purpose AI agent framework. It provides:
- Interactive REPL: Chat through
AgentLoopwith built-in slash commands and session reset shortcuts - Multi-Model Support: Works with OpenAI, Anthropic, Google, and other LLM providers
- Tool Integration: Connect to MCP servers for file operations, shell commands, and more
- Skill System: Load and apply predefined skills for specialized tasks
Installation
From Source
# Clone the repository
# Build and run
Binary Release
# Download from GitHub releases
# (Coming soon)
Configuration
Create an agent.toml file in the project root:
[]
= "openai:gpt-4o-mini"
= 12
= 90000
= "native_preferred"
# Optional: Configure MCP servers
[]
[[]]
= "filesystem"
= "npx"
= ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
= 15000
# Optional: Configure skills
[]
= 3
= 0.1
[[]]
= "directory"
= "./skills"
= false
# Optional: Persist session state/checkpoints/artifacts across restarts
[]
= "./.bob/sessions"
# Optional: Configure policies
[]
= ["local/shell_exec"]
= ["local/read_file", "local/write_file"]
= false
# Optional: Configure approval guardrails
[]
= "allow_all"
= ["local/shell_exec"]
# Optional: Configure per-session token budget
[]
= 10000
When [store] is set, budget accounting is also persisted, so restarting the
CLI does not reset per-session token limits.
dispatch_mode supports native_preferred and prompt_guided.
Environment Variables
Set your LLM provider API key:
# For OpenAI
# For Anthropic
# For Google
Usage
Starting the Agent
The agent will start an interactive REPL:
Bob agent ready (model: openai:gpt-4o-mini)
Type a message and press Enter. /help for commands.
> Summarize the latest meeting notes in this folder
REPL Commands
- Type your message and press Enter to send
/quitor/exitto exit the agent/helpor/hto show available commands/usageto inspect cumulative session token usage/toolsto list all available tools/tool.describe <tool-name>to print a tool schema/tape.info,/tape.search <query>,/anchors, and/handoff [name]for session tape inspection/newor/resetto start a fresh session context
Example Session
> Read docs/design.md and explain it in simple terms
I'll read docs/design.md for you...
[uses filesystem tool to read the document]
The design document describes...
> Translate this explanation into Chinese
[agent produces translated output]
Here is the translated explanation...
Features
Multi-Model Support
Works with any LLM provider supported by genai:
- OpenAI:
openai:gpt-4o,openai:gpt-4o-mini - Anthropic:
anthropic:claude-3-5-sonnet-20241022 - Google:
google:gemini-2.0-flash-exp - Groq:
groq:llama-3.3-70b-versatile - And more...
Tool Integration
Connect to MCP servers for extended capabilities:
- Filesystem: Read, write, and manage files
- Shell: Execute shell commands
- Database: Query databases
- Custom: Build your own MCP servers
Skill System
Apply predefined skills for specialized tasks:
- Knowledge extraction
- Summarization and transformation
- Workflow automation
- Domain-specific orchestration
Session Persistence
Sessions are persisted in-memory (development) or can be configured for persistent storage.
Development
# Run in development mode
# Build release binary
# Run tests
Architecture
The CLI agent is the composition root that:
- Loads configuration from
agent.toml - Wires up adapters (LLM, tools, storage, events)
- Creates the runtime
- Runs the REPL loop
See the main.rs for the implementation.
Related Crates
- bob-core - Domain types and ports
- bob-runtime - Runtime orchestration
- bob-adapters - Adapter implementations
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.