Minimal task execution agent framework
Project description
bp-agent
For the developer's vision and thoughts behind this project, see HUMANS.md.
Minimal task execution agent framework with multi-provider LLM support.
Features
- Multi-provider: Gemini, Codex (OpenAI), Opus with automatic key rotation
- Streaming: Real-time token streaming for chat responses
- Tool system: Built-in tools (bash, read_file, write_file, list_dir) + custom tools
- Subagents: Spawn worker agents for parallel task execution
- Chat mode: Multi-turn conversation with tool support
- Task queue: Persistent JSON-based task scheduling
Install
pip install bp-agent
Quick Start
# Set API key
export GEMINI_API_KEY=your_key
# Interactive chat (streaming)
bp-chat
# Chat with a specific provider
bp-chat --provider codex
bp-chat --provider opus --model my-model
Providers
| Provider | Env Vars | Models |
|---|---|---|
| Gemini (default) | GEMINI_API_KEY |
gemini-3-flash-preview, gemini-3-pro-preview |
| Codex | CODEX_API_KEY or ~/.codex/auth.json |
gpt-5.2-codex, gpt-5.1-codex-mini, ... |
| Opus | OPUS_API_KEY + OPUS_BASE_URL |
configurable |
Multiple keys supported via GEMINI_API_KEY_2, _3, etc. or comma-separated GEMINI_API_KEYS.
Python API
from bp_agent import Agent, AgentConfig
# Task execution
agent = Agent("my-agent")
result = agent.execute("List all Python files in src/")
print(result.output)
# Multi-turn chat
response = agent.chat("What files are in this directory?")
print(response)
# Streaming chat
for chunk in agent.chat_stream("Explain this codebase"):
print(chunk, end="", flush=True)
# Custom tools
from bp_agent.tools import ToolSchema
agent.add_tool("greet", lambda name: f"Hello, {name}!", ToolSchema(
name="greet",
description="Greet someone",
parameters={"type": "object", "properties": {"name": {"type": "string"}}, "required": ["name"]},
))
License
GPL-3.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bp_agent-0.5.0.tar.gz
(57.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
bp_agent-0.5.0-py3-none-any.whl
(58.6 kB
view details)
File details
Details for the file bp_agent-0.5.0.tar.gz.
File metadata
- Download URL: bp_agent-0.5.0.tar.gz
- Upload date:
- Size: 57.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b14cd5e56bc794499112dc75b8d928f7735e50d46b1063c4a20d84771e3b6f3
|
|
| MD5 |
3f2a4f42209ce3b1e7b3564c52d840cb
|
|
| BLAKE2b-256 |
6c09745247e5e17d2fbb1f2293742e068ab6694072ddf1eab451d250a5df05b7
|
File details
Details for the file bp_agent-0.5.0-py3-none-any.whl.
File metadata
- Download URL: bp_agent-0.5.0-py3-none-any.whl
- Upload date:
- Size: 58.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb0c274ecc944b331e9495a5fb376a488af7aa122c08b46166244ebd880ff813
|
|
| MD5 |
bb7c6ec23bbdcdd05f1e1c562e6eba2c
|
|
| BLAKE2b-256 |
364cf7058ddb3621d0afd3946a2db04fade73701b8eb3a9e1470ac75c1307689
|