Burrow
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<p align="center">
<img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="License">
<img src="https://img.shields.io/badge/python-3.10%2B-brightgreen.svg" alt="Python 3.10+">
<img src="https://img.shields.io/badge/status-alpha-orange.svg" alt="Status: Alpha">
</p>
<h1 align="center">๐Ÿฐ Burrow</h1>
<p align="center">
<strong>Open source AI agents you can run locally, modify freely, and control completely.</strong>
</p>
<p align="center">
Your AI, your rules โ€” no vendor lock-in, no data leaving your machine unless you want it to.
</p>
<p align="center">
<a href="#quickstart">Quickstart</a> ยท
<a href="#features">Features</a> ยท
<a href="#docker">Docker</a> ยท
<a href="#plugins">Plugins</a> ยท
<a href="#api">API</a> ยท
<a href="https://burrow.nanocorp.app">Cloud Hosting</a>
</p>
---
## What is Burrow?
Burrow is a lightweight, extensible AI agent framework that runs on your own machine. It connects to any OpenAI-compatible LLM API (OpenAI, Anthropic, Ollama, LM Studio, etc.) and gives your agent tools to interact with files, run shell commands, search the web, and more.
- **Privacy-first**: Your data stays on your machine. Zero telemetry, zero tracking.
- **Fully open source**: Apache 2.0 licensed. Fork it, modify it, ship it.
- **Extensible**: Add custom tools via a simple plugin system.
- **Batteries included**: Built-in web dashboard, REST API, and CLI.
> **Want managed hosting?** Skip the setup and deploy instantly with [Burrow Cloud](https://burrow.nanocorp.app) โ€” $19.99/mo with automatic updates and monitoring.
---
## Quickstart
### Prerequisites
- Python 3.10+
- An API key from [OpenAI](https://platform.openai.com/api-keys), or any OpenAI-compatible provider
### Install and run in 60 seconds
```bash
# Clone the repo
git clone https://github.com/nanocorp-hq/burrow.git
cd burrow/agent
# Install
pip install -e .
# Set your API key
export BURROW_API_KEY="sk-your-key-here"
# Start the agent
burrow start
```
That's it. Open **http://localhost:7700** to access the web dashboard.
### Or use the interactive CLI
```bash
burrow chat
```
```
๐Ÿฐ Burrow v0.1.0 โ€” Interactive Chat
Model: gpt-4o-mini | Tools: 6
Type 'quit' to exit, 'reset' to clear history.
you: What files are in the current directory?
burrow: Let me check... [uses file tools] Here are the files: ...
```
---
## Features
### ๐Ÿ”ง Built-in Tools
| Tool | Description |
|------|-------------|
| `shell` | Execute shell commands |
| `file_read` | Read file contents |
| `file_write` | Write/create files |
| `list_directory` | List directory contents |
| `web_search` | Search the web (configurable provider) |
| `python_eval` | Evaluate Python expressions |
### ๐ŸŒ Web Dashboard
Start with `burrow start` and open `http://localhost:7700` โ€” a clean, minimal chat interface for interacting with your agent in the browser.
### ๐Ÿ”Œ Plugin System
Drop a Python file in the `plugins/` directory and it's automatically loaded:
```python
# plugins/my_tool.py
from burrow.tools import Tool
def my_function(query: str) -> str:
return f"Result for: {query}"
def register(registry):
registry.register(Tool(
name="my_tool",
description="Does something useful",
parameters={
"type": "object",
"properties": {
"query": {"type": "string", "description": "The input"}
},
"required": ["query"],
},
function=my_function,
))
```
### ๐Ÿค– Works with Any Provider
Burrow works with any OpenAI-compatible API:
| Provider | Config |
|----------|--------|
| **OpenAI** | `BURROW_API_KEY=sk-...` |
| **Ollama** | `BURROW_API_BASE=http://localhost:11434/v1` |
| **LM Studio** | `BURROW_API_BASE=http://localhost:1234/v1` |
| **Anthropic** | Via OpenAI-compatible proxy |
| **Azure OpenAI** | Set `BURROW_API_BASE` to your Azure endpoint |
---
## Docker
The fastest way to run Burrow without installing Python:
```bash
cd agent
# Set your API key
echo "BURROW_API_KEY=sk-your-key-here" > .env
# Start with Docker Compose
docker compose up
```
Or build and run manually:
```bash
docker build -t burrow .
docker run -p 7700:7700 -e BURROW_API_KEY=sk-your-key burrow
```
Open **http://localhost:7700** to access the dashboard.
### Using with Ollama (fully local, no API key needed)
```bash
# Start Ollama first
ollama serve
# Run Burrow pointed at Ollama
docker run -p 7700:7700 \
-e BURROW_API_BASE=http://host.docker.internal:11434/v1 \
-e BURROW_API_KEY=ollama \
-e BURROW_MODEL=llama3.2 \
burrow
```
---
## Configuration
Burrow can be configured via environment variables, a config file, or CLI flags.
### Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| `BURROW_API_KEY` | โ€” | LLM API key (required) |
| `BURROW_MODEL` | `gpt-4o-mini` | Model name |
| `BURROW_PROVIDER` | `openai` | LLM provider |
| `BURROW_API_BASE` | โ€” | Custom API endpoint |
| `BURROW_HOST` | `0.0.0.0` | Server bind address |
| `BURROW_PORT` | `7700` | Server port |
| `BURROW_LOG_LEVEL` | `INFO` | Log level |
### Config File
```bash
burrow init # Creates ~/.burrow/config.json
```
```json
{
"provider": "openai",
"model": "gpt-4o-mini",
"api_key": "sk-...",
"temperature": 0.7,
"enabled_tools": ["shell", "file_read", "file_write", "web_search"],
"system_prompt": "You are a helpful assistant."
}
```
---
## API
The Burrow server exposes a simple REST API:
### `POST /api/chat`
Send a message and get a response:
```bash
curl -X POST http://localhost:7700/api/chat \
-H "Content-Type: application/json" \
-d '{"message": "What is 2 + 2?"}'
```
```json
{"response": "2 + 2 = 4"}
```
### `POST /api/reset`
Clear the conversation history:
```bash
curl -X POST http://localhost:7700/api/reset
```
### `GET /api/health`
Health check endpoint:
```bash
curl http://localhost:7700/api/health
```
---
## Programmatic Usage
Use Burrow as a Python library:
```python
from burrow import Agent
from burrow.config import BurrowConfig
# Create an agent
config = BurrowConfig.load()
agent = Agent(config=config)
# Chat
response = agent.chat("List the files in the current directory")
print(response)
# Add custom tools
from burrow.tools import Tool
agent.register_tool(Tool(
name="greet",
description="Greet someone by name",
parameters={
"type": "object",
"properties": {"name": {"type": "string"}},
"required": ["name"],
},
function=lambda name: f"Hello, {name}!",
))
response = agent.chat("Greet Alice")
print(response)
```
---
## Project Structure
```
agent/
โ”œโ”€โ”€ burrow/ # Core Python package
โ”‚ โ”œโ”€โ”€ __init__.py # Package exports
โ”‚ โ”œโ”€โ”€ agent.py # Agent logic (tool-calling loop)
โ”‚ โ”œโ”€โ”€ cli.py # CLI commands (start, chat, init)
โ”‚ โ”œโ”€โ”€ config.py # Configuration management
โ”‚ โ”œโ”€โ”€ plugins.py # Plugin loader
โ”‚ โ”œโ”€โ”€ server.py # HTTP server + web dashboard
โ”‚ โ””โ”€โ”€ tools.py # Tool registry + built-in tools
โ”œโ”€โ”€ plugins/ # Drop-in plugins (auto-loaded)
โ”œโ”€โ”€ tests/ # Test suite
โ”œโ”€โ”€ examples/ # Usage examples
โ”œโ”€โ”€ Dockerfile # Container support
โ”œโ”€โ”€ docker-compose.yml # One-command deployment
โ””โ”€โ”€ pyproject.toml # Python project config
```
---
## Burrow Cloud
Don't want to self-host? **[Burrow Cloud](https://burrow.nanocorp.app)** gives you the same open source agent with managed infrastructure:
- โœ… Automatic updates and security patches
- โœ… Uptime monitoring and alerts
- โœ… No server management
- โœ… Cancel anytime โ€” your data is always exportable
**$19.99/month** โ†’ [Get started at burrow.nanocorp.app](https://burrow.nanocorp.app)
---
## Contributing
We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
Key areas where we need help:
- New tools and plugins
- Additional LLM provider support
- Documentation and examples
- Tests and bug fixes
---
## License
Apache 2.0 โ€” see [LICENSE](LICENSE) for details. Use it, modify it, ship it.
---
<p align="center">
Built by <a href="https://burrow.nanocorp.app">Burrow</a> โ€” open source AI agents for everyone.
</p>

All Source Files

Complete source code of the Burrow agent framework. Self-hosted โ€” no GitHub required.