User Guide¶
This guide covers all the features of Mamba Agents in detail.
Core Features¶
-
Agent Basics
Learn how to create and run agents, handle responses, and manage state.
-
Working with Tools
Use built-in tools and create custom tools for your agents.
-
Context Management
Manage conversation context and implement compaction strategies.
-
Token Tracking
Track token usage and estimate costs across requests.
-
Message Querying
Filter, analyze, and export conversation histories with rich analytics.
-
Display Rendering
Render analytics as Rich tables, plain text, or HTML for Jupyter.
-
Prompt Management
Create and manage Jinja2-based prompt templates with versioning.
Advanced Features¶
-
Workflows
Orchestrate multi-step agent execution with ReAct and custom patterns.
-
MCP Integration
Connect to Model Context Protocol servers for external tools.
-
Model Backends
Use local models with Ollama, vLLM, or LM Studio.
-
Error Handling
Implement retry logic and circuit breaker patterns.
-
Observability
Set up logging, tracing, and OpenTelemetry integration.
Quick Reference¶
| Feature | Module | Primary Classes |
|---|---|---|
| Agents | mamba_agents |
Agent, AgentConfig, AgentResult |
| Tools | mamba_agents.tools |
read_file, run_bash, glob_search |
| Context | mamba_agents.context |
ContextManager, CompactionConfig |
| Tokens | mamba_agents.tokens |
TokenCounter, UsageTracker, CostEstimator |
| Messages | mamba_agents |
MessageQuery, MessageStats, Turn |
| Display | mamba_agents.agent.display |
DisplayPreset, print_stats, RichRenderer |
| Prompts | mamba_agents.prompts |
PromptManager, PromptTemplate, TemplateConfig |
| Workflows | mamba_agents.workflows |
Workflow, ReActWorkflow |
| MCP | mamba_agents.mcp |
MCPClientManager, MCPServerConfig |
| Backends | mamba_agents.backends |
OpenAICompatibleBackend |
| Errors | mamba_agents.errors |
CircuitBreaker, AgentError |
| Observability | mamba_agents.observability |
setup_logging, RequestTracer |