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.1.tar.gz
(55.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.1-py3-none-any.whl
(57.0 kB
view details)
File details
Details for the file bp_agent-0.5.1.tar.gz.
File metadata
- Download URL: bp_agent-0.5.1.tar.gz
- Upload date:
- Size: 55.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 |
1e613062a0be82e6ff90e6d07fe89a4dd235737b5b1871ec41369d2b4e4938a5
|
|
| MD5 |
633a8cab880c5daa480e1a7b98531742
|
|
| BLAKE2b-256 |
8904a2dddd06456480aa2a4c4ec2ab2c0eb80b1961278e956749432bc2edeed8
|
File details
Details for the file bp_agent-0.5.1-py3-none-any.whl.
File metadata
- Download URL: bp_agent-0.5.1-py3-none-any.whl
- Upload date:
- Size: 57.0 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 |
6f244b35e11ea44efaefe2b1061ceae046ce3c598dd972c83ba19168b8906cc5
|
|
| MD5 |
60ee51fd9c3e20bcf1ac42bdbf96526f
|
|
| BLAKE2b-256 |
d6d4d7e0f7f7af4231bdbcdcce1d20240032837e6092d7122b04aecbdbf3cd82
|