AgentFly — AI Agent 客制化配置中心
统一管理多 AI Agent 配置,一键启动。
pip install agentfly
# 一键安装 Tab 补全
agentfly completion --install
source ~/.bashrc
快速开始
# 1. 添加 Provider(自动探测接口类型 + 拉取模型列表)
agentfly provider add deepseek --api-key '${DEEPSEEK_API_KEY}'
# 2. 测试所有模型(流式输出: 延迟 + TTFT + 吞吐)
agentfly test deepseek # Provider 所有模型
agentfly test deepseek deepseek-v4-pro # 指定模型
agentfly test # 全部 Provider
agentfly test deepseek -p 8 -t 15 # 8 并发 + 15s 超时
agentfly test deepseek --refresh # 强制重探接口类型
# 3. 启动 AI Agent
agentfly launch claude # 默认配置
agentfly launch claude --provider deepseek # 指定 Provider
agentfly launch claude --model deepseek-v4-pro # 指定模型
agentfly launch claude --provider deepseek -- --continue # 透传 Agent 参数
命令
| 命令 | 作用 |
|---|---|
agentfly launch |
启动 AI Agent,自动注入环境变量 |
agentfly test |
测试模型延迟 / TTFT / 吞吐 |
agentfly provider |
管理服务提供商 (add/list/show/reload/remove) |
agentfly doctor |
配置健康检查 |
agentfly completion |
安装命令补全 (--install 一键安装) |
支持的 Agent
claude · cline · codex · droid · opencode · openclaw · pi
支持的 Provider
内置厂商(自动填 BASE_URL):
deepseek— https://api.deepseek.comanthropic— https://api.anthropic.comopenai— https://api.openai.com
任意 OpenAI / Anthropic 兼容端点:
agentfly provider add --api-base http://10.0.0.1:3000 --api-key '${MY_KEY}'
agentfly provider add my-proxy --api-base http://10.0.0.1:3000 --models "model-a,model-b"
配置
# ~/.config/agentfly/config.yaml
providers:
deepseek:
name: deepseek
api_key: ${DEEPSEEK_API_KEY}
endpoints:
openai: https://api.deepseek.com
anthropic: https://api.deepseek.com/anthropic # 不同接口可用不同 URL
models:
deepseek-v4-pro: ''
deepseek-v4-flash: ''
default_model: deepseek-v4-pro
my-proxy:
name: custom
api_key: ${MY_KEY}
endpoints:
openai: https://my-gateway.com
anthropic: https://my-gateway.com
models:
claude-opus-4-6: anthropic # test 探测出的接口类型 (空=未探测)
deepseek-chat: anthropic,openai # 两个都通, 速度快的在前
gpt-5.5: openai
default_model: claude-opus-4-6
endpoints 是「api_type → Base URL」映射(openai/anthropic 可指向不同 URL)。
models 是「模型名 → api_type」映射:agentfly test 对每个模型探测所有已配接口
(anthropic 优先),把跑通的写回 api_type (多个用逗号分隔, 速度快的在前),Total/TTFT/TPS
显示最快接口。后续测试按缓存顺序探测;--refresh 清空缓存强制重探。
Agent 环境变量从 GitHub 远程配置自动获取,无需手动配置。 离线时使用包内默认配置降级。
安全
API Key 支持环境变量引用 ${VAR},禁止明文存储:
agentfly provider add deepseek --api-key '${DEEPSEEK_API_KEY}'
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file agentfly-0.7.1.tar.gz.
File metadata
- Download URL: agentfly-0.7.1.tar.gz
- Upload date:
- Size: 45.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e44ee36720aea3f63e7f3d176d7c3e110a01c04ce15f85d6eb9d9f65301b6fd
|
|
| MD5 |
8077950a59e87f00213e5c774aaae5c2
|
|
| BLAKE2b-256 |
e5b5575a3267880c0ac7af9cf1ad5e1f6876db527e4fd80ec0014df3aba1a0d3
|
Provenance
The following attestation bundles were made for agentfly-0.7.1.tar.gz:
Publisher:
publish.yml on laomou/agentfly
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentfly-0.7.1.tar.gz -
Subject digest:
8e44ee36720aea3f63e7f3d176d7c3e110a01c04ce15f85d6eb9d9f65301b6fd - Sigstore transparency entry: 2084280814
- Sigstore integration time:
-
Permalink:
laomou/agentfly@1f1c2b963caf69affd8d9b159dcdae834e3bdb55 -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/laomou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1f1c2b963caf69affd8d9b159dcdae834e3bdb55 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agentfly-0.7.1-py3-none-any.whl.
File metadata
- Download URL: agentfly-0.7.1-py3-none-any.whl
- Upload date:
- Size: 45.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e250098f5230bad29fb15f9c97fbbe6ee2a5a50c7a97a18843288f480903a730
|
|
| MD5 |
4004225ef2d2e481851433bfd7ae9960
|
|
| BLAKE2b-256 |
b55d68186e4b2f84e5c25ba7fd221a66ee3afee5e7e62181e9dd4f8b779981a8
|
Provenance
The following attestation bundles were made for agentfly-0.7.1-py3-none-any.whl:
Publisher:
publish.yml on laomou/agentfly
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentfly-0.7.1-py3-none-any.whl -
Subject digest:
e250098f5230bad29fb15f9c97fbbe6ee2a5a50c7a97a18843288f480903a730 - Sigstore transparency entry: 2084280819
- Sigstore integration time:
-
Permalink:
laomou/agentfly@1f1c2b963caf69affd8d9b159dcdae834e3bdb55 -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/laomou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1f1c2b963caf69affd8d9b159dcdae834e3bdb55 -
Trigger Event:
push
-
Statement type: