BYOE - Bring Your Own Executive AI
An AI developer-team orchestration tool by byoe.net
BYOE combines a lightweight coding Agent with a Crew orchestration layer, so every developer can have an AI crew standing by at all times.
Website: https://www.byoe.net | Install: pip install byoe
重要更新(1.0.0)
Python 库 API 全面开放
BYOE 现在是一个可编程 Python 库,不再只是 CLI 工具:
pip install byoe
import byoe
# 工厂函数,自动从环境变量读取配置
agent = byoe.create_agent()
# 三种调用方式
result = agent.chat("解释向量数据库") # 同步
stream = agent.stream("写一首诗") # 流式
for tok in stream:
print(tok, end="", flush=True)
poem = stream.result # 完整文本
import asyncio
result = asyncio.run(agent.achat("重构这段代码")) # asyncio 异步
产品功能特点(1.0.0)
| 特性 | 说明 |
|---|---|
| 🐍 Python 库 API | from byoe import Agent, LLM, Tool, create_agent |
| 📦 结构化输出 | agent.chat("...", response_model=MyModel) 返回 pydantic 实例 |
| 🔗 模型降级链 | fallback_models=["gpt-4o-mini"] 自动切换备用模型 |
| 💾 会话持久化 | agent.save() / agent.load(path) 跨进程恢复对话 |
| 🧠 语义记忆 | BYOE_EMBEDDING_MODEL 启用向量搜索,零新依赖 |
| 🔀 Swarm 并行分组 | parallel_groups=[["安全","性能"],["主管"]] scatter-gather |
| 🔌 工具插件系统 | pip 包通过 entry-point 自动注册工具 |
| 🔄 MCP 双向集成 | byoe mcp-server 暴露工具;create_agent(mcp_servers=[...]) 接入外部 MCP 工具 |
| 🖼️ 多模态图片输入 | chat/stream/achat(images=[...]) 支持图片理解,内置 read_image 工具 |
| 🛡️ CLI Git 安全确认 | risky Git 操作交互确认,危险操作默认拒绝 |
| 🌐 Helm Web UI | 内置前端界面,支持会话、工具轨迹与状态可视化 |
📊 byoe metrics |
Token 用量与费用统计 |
🗂️ byoe memory |
命令行直接搜索/管理记忆 |
升级命令:
pip install -U byoe
企业级功能(v1.4.0)
密钥管理
# 设置加密密钥(首次使用自动生成)
byoe secrets set OPENAI_API_KEY sk-...
# 列出已存储的密钥
byoe secrets list
# 查看密钥值
byoe secrets get OPENAI_API_KEY
# 删除密钥
byoe secrets rm OPENAI_API_KEY
密钥使用 Fernet 加密存储于 ~/.byoe/secrets.json,自动降级到 XOR 加密(无需额外依赖)。
API Key 认证
# 生成 API Key
byoe auth create --name "my-app" --role admin
# 列出所有 Key
byoe auth list
# 吊销 Key
byoe auth revoke <key-id>
HTTP 网关
# 安装企业依赖
pip install byoe[enterprise]
# 启动 HTTP 网关(默认端口 8000)
byoe serve
# 指定端口和主机
byoe serve --port 8080 --host 0.0.0.0
# 调用示例
curl -H "X-API-Key: <key>" -H "Content-Type: application/json" \
-d '{"q":"解释二分查找"}' \
http://localhost:8000/chat
A2A 协议(v2.2.0)
byoe agent 可作为 A2A(Agent2Agent,Linux Foundation 开放标准) 的对等节点被发现与调用:
- 发现:
GET /.well-known/agent.json—— AgentCard(身份/能力/技能/端点) - 同步任务:
POST /v1/a2a,JSON-RPCmessage/send→ Task(submitted→working→completed, 产物 artifacts + 对话 history) - 流式任务:
message/stream(SSE)——逐 token message 帧 + statusUpdate + artifactUpdate(lastChunk),事件顺序 = 生成顺序 - 失败语义:引擎异常 → Task(state=failed, status.message 带原因);未知任务 → -32001; 方法归一同时接受 0.3 snake_case 与 1.0 TitleCase
curl http://localhost:8010/.well-known/agent.json
curl -X POST http://localhost:8010/v1/a2a -H "content-type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"message/send",
"params":{"message":{"role":"user","parts":[{"kind":"text","text":"hi"}]}}}'
任意 A2A 客户端(含第三方框架 agent)即可把 byoe agent 当远程专家协作——
与 MCP(工具侧)、AG-UI(前端侧,/v1/agui)构成完整互操作三件套。
沙箱代码执行(v2.1.0)
LLM 生成的代码在可插拔沙箱后端中执行,隔离强度按需选择:
| 后端 | 隔离等级 | 依赖 | 选择方式 |
|---|---|---|---|
subprocess(缺省) |
独立子进程 + 精简 env + 超时强杀 | 零依赖 | 缺省 |
inprocess |
进程内(共享状态延续,仅可信代码) | 零依赖 | BYOE_SANDBOX=inprocess |
docker |
容器(无网络 + 内存/CPU 配额 + no-new-privileges) | docker CLI | BYOE_SANDBOX=docker |
e2b |
云 microVM(Firecracker 级硬件隔离) | pip install e2b-code-interpreter + E2B_API_KEY |
BYOE_SANDBOX=e2b |
tool = PythonReplTool(backend="docker") # 或环境变量全局选择
agent = byoe.create_agent(model=..., tools=[tool], ...)
配套 2.0 能力:Langfuse trace 树(byoe[langfuse] + BYOE_LANGFUSE=1)、评测骨架
(byoe.engine.evals)、Agent checkpoint 断点续聊、工具超时+熔断、成本感知路由、
PII/密钥自动脱敏。
OpenTelemetry 可观测性(v1.6.0+)
pip install byoe[tracing]
import byoe
byoe.setup_tracing(service_name="my-app")
或通过环境变量一键启用:
export BYOE_TRACING=1
export OTEL_SERVICE_NAME=byoe
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
自动追踪:LLM 调用 (span: llm.chat)、工具执行 (span: tool.execute.<name>)、Agent 回合 (span: agent.turn)。
Java 客户端 SDK(v1.6.0+)
java/ 目录提供官方 Java 客户端,支持 pipe 协议和 HTTP 网关:
<dependency>
<groupId>net.byoe</groupId>
<artifactId>byoe-client</artifactId>
<version>1.6.0</version>
</dependency>
ByoeClient client = new ByoeClient(ByoeConfig.fromEnv());
String response = client.chat("解释二分查找");
client.chat("写一首诗", token -> System.out.print(token));
client.close();
详细文档见 java/README.md。
历史更新 (0.7.3)
- 技术栈更新和工具集成: CLI 中使用
byoe sober即可通过原生多文件正则实现项目代码扫描检测,提供console/md两种输出模式! - 修复: 更新了 PyPI 的项目页面元信息,确保链接准确指向
www.byoe.net - 升级命令:
bash pip install -U byoe
Features
- AI Coding Agent — reads/writes files, runs bash commands, searches the web
- Web UI (Helm) — React frontend with dark/light theme, session history, token usage
- CLI —
byoe chatfor terminal-first workflows - Crew Orchestration — plan and track multi-agent project workflows
- Any LLM — OpenAI, Anthropic, DeepSeek, Ollama, or any OpenAI-compatible API
- Deep Integration — auto-injects INSTRUCTIONS.md and crew.yaml into the system prompt
- Session Memory — save and restore conversations with full token accounting
- Custom Skills — extend the agent with your own tools
Installation
pip install byoe
Development install:
git clone https://github.com/byoenet/byoe
cd byoe
pip install -e .
Quick Start
Web UI
export OPENAI_API_KEY=sk-...
export BYOE_MODEL=deepseek-chat
byoe web
Open http://localhost:7860 in your browser.
CLI Chat
export OPENAI_API_KEY=sk-...
export BYOE_MODEL=deepseek-chat
byoe chat
BYOE Hosted Service
export BYOE_API_KEY=<your-token>
export BYOE_BASE_URL=https://api.byoe.net
byoe web
Configuration
Config file: ~/.byoe/config.yaml
provider: openai # openai | anthropic | deepseek | byoe | ollama
api_key: sk-...
model: gpt-4o
base_url: "" # optional: custom endpoint
Environment variables:
export BYOE_PROVIDER=openai
export BYOE_API_KEY=sk-...
export BYOE_MODEL=gpt-4o
Supported Providers
| Provider | --provider value | Notes |
|---|---|---|
| OpenAI | openai | GPT-4o, o1, etc. |
| Anthropic | anthropic | Claude 3.5 Sonnet, etc. |
| DeepSeek | deepseek | deepseek-chat, deepseek-coder |
| Ollama | ollama | Local models |
| BYOE | byoe | Hosted service at byoe.net |
| Any OpenAI-compat | openai + --base-url | LM Studio, vLLM, etc. |
Crew Commands
byoe init # Initialize project (creates INSTRUCTIONS.md + crew.yaml)
byoe plan "<goal>" # Generate a sprint plan
byoe status # Show current sprint / task status
byoe release # Tag and document a release
byoe run # Execute the next planned task
byoe agents # List available specialist agents
License
MIT (c) byoe.net
Metadata
Release files for byoe 2.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| byoe-2.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / byoe-2.2.1-py3-none-any.whl
| Download URL | byoe-2.2.1-py3-none-any.whl |
|---|---|
| Size | 445.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
abb6ed9b10b37e4bc769c6cdca9e7b22ea2ac1bb834b5160f4f5b391506fd938
|
|
BLAKE2b-256 checksum How to use checksums |
7aa2bffabcc3c17c0d5dc11c52f6028074d2a1a3ca30b3546ab7ba2975546588
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.7
|