AgentHub 是 AI Skill Hub 本期精选Agent工作流之一。综合评分 8.5 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
AgentHub 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
AgentHub 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:pip 安装(推荐)
pip install agenthub
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install agenthub
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/Prism-Shadow/agenthub
cd agenthub
pip install -e .
# 验证安装
python -c "import agenthub; print('安装成功')"
# 命令行使用
agenthub --help
# 基本用法
agenthub input_file -o output_file
# Python 代码中调用
import agenthub
# 示例
result = agenthub.process("input")
print(result)
# agenthub 配置文件示例(config.yml) app: name: "agenthub" debug: false log_level: "INFO" # 运行时指定配置文件 agenthub --config config.yml # 或通过环境变量配置 export AGENTHUB_API_KEY="your-key" export AGENTHUB_OUTPUT_DIR="./output"
[!NOTE] We recommend using the stateful interface when calling the AgentHub SDK.
TypeScript Example:
typescript import { AutoLLMClient } from "@prismshadow/agenthub";
process.env.OPENAI_API_KEY = "your-openai-api-key";
async function main() { const client = new AutoLLMClient({ model: "gpt-5.5" }); for await (const event of client.streamingResponseStateful({ message: { role: "user", content_items: [{ type: "text", text: "Say 'Hello, World!'" }] }, config: {} })) { console.log(event); } }
main().catch(console.error); // {'role': 'assistant', 'event_type': 'delta', 'content_items': [{'type': 'text', 'text': 'Hello'}], 'usage_metadata': null, 'finish_reason': null} // {'role': 'assistant', 'event_type': 'delta', 'content_items': [{'type': 'text', 'text': ','}], 'usage_metadata': null, 'finish_reason': null} // {'role': 'assistant', 'event_type': 'delta', 'content_items': [{'type': 'text', 'text': ' World'}], 'usage_metadata': null, 'finish_reason': null} // {'role': 'assistant', 'event_type': 'delta', 'content_items': [{'type': 'text', 'text': '!'}], 'usage_metadata': null, 'finish_reason': null} // {'role': 'assistant', 'event_type': 'stop', 'content_items': [], 'usage_metadata': {'cached_tokens': 0, 'prompt_tokens': 12, 'thoughts_tokens': 0, 'response_tokens': 8}, 'finish_reason': 'stop'} ```
AgentHub provides detailed token usage information through the usage_metadata field in streaming events.
The usage_metadata object contains four fields: - cached_tokens: Cached input tokens - prompt_tokens: Non-cached input tokens - thoughts_tokens: Chain-of-thought output tokens - response_tokens: Non-chain-of-thought output tokens
You can calculate the total token usage as follows: - input_tokens = cached_tokens + prompt_tokens - output_tokens = thoughts_tokens + response_tokens - total_tokens = input_tokens + output_tokens
█████████████ ░░░░░░░░░░░░░ → LLM → ███████████████ ░░░░░░░░░░░░░░░
cached_tokens prompt_tokens thoughts_tokens response_tokens
input_tokens output_tokens
UniConfig is an object that contains the configuration for LLMs.
Example UniConfig:
{
"max_tokens": 1024,
"temperature": 1.0,
"tools": [
{
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
}
},
"required": ["location"]
}
}
],
"thinking_summary": true,
"thinking_level": "none | low | medium | high",
"tool_choice": "auto | required | none",
"system_prompt": "You are a helpful assistant.",
"prompt_caching": "enable | disable | enhance",
"image_config": {"aspect_ratio": "4:3", "image_size": "1K"},
"tts_config": [{"voice": "Kore"}],
"trace_id": null
}
AgentHub is the LLM API Hub for the Agent era, built for high-precision autonomous agents.
Using a coding agent? Install the AgentHub SKILL files from skills/ so it can use AgentHub correctly in generated code.
📢 Follow us on X: or join our Discord Community
AutoLLMClient is the main class for interacting with the AgentHub SDK. It provides the following methods:
(async) streaming_response(messages, config): Streams the response of LLMs in a stateless manner.(async) streaming_response_stateful(message, config): Streams the response of LLMs in a stateful manner.clear_history(): Clears the history of the stateful LLM client.get_history(): Returns the history of the stateful LLM client.set_history(history): Replaces the history of the stateful LLM client with a copy of the provided list.<details><summary><strong>Python Example</strong></summary>
import asyncio
import os
from agenthub import AutoLLMClient
os.environ["OPENAI_API_KEY"] = "your-siliconflow-api-key"
os.environ["OPENAI_BASE_URL"] = "https://api.siliconflow.cn/v1"
async def main():
client = AutoLLMClient(model="Qwen/Qwen3.6-35B-A3B", client_type="openai")
async for event in client.streaming_response_stateful(
message={
"role": "user",
"content_items": [{"type": "text", "text": "Say 'Hello, World!'"}]
},
config={}
):
print(event)
asyncio.run(main())
</details> <details><summary><strong>TypeScript Example</strong></summary>
import { AutoLLMClient } from "@prismshadow/agenthub";
process.env.OPENAI_API_KEY = "your-siliconflow-api-key";
process.env.OPENAI_BASE_URL = "https://api.siliconflow.cn/v1";
async function main() {
const client = new AutoLLMClient({
model: "Qwen/Qwen3.6-35B-A3B",
clientType: "openai",
});
for await (const event of client.streamingResponseStateful({
message: {
role: "user",
content_items: [{ type: "text", text: "Say 'Hello, World!'" }],
},
config: {}
})) {
console.log(event);
}
}
main().catch(console.error); </details>
<details><summary><strong>Python Example</strong></summary>
import asyncio
import os
from agenthub import AutoLLMClient
os.environ["OPENAI_API_KEY"] = "your-siliconflow-api-key"
os.environ["OPENAI_BASE_URL"] = "https://api.siliconflow.cn/v1"
async def main():
client = AutoLLMClient(model="Qwen/Qwen3-Embedding-0.6B", client_type="openai")
async for event in client.streaming_response_stateful(
message={
"role": "user",
"content_items": [{"type": "text", "text": "Hello world"}],
},
config={},
):
print(event)
asyncio.run(main()) </details>
<details><summary><strong>TypeScript Example</strong></summary>
import { AutoLLMClient } from "@prismshadow/agenthub";
process.env.OPENAI_API_KEY = "your-siliconflow-api-key";
process.env.OPENAI_BASE_URL = "https://api.siliconflow.cn/v1";
async function main() {
const client = new AutoLLMClient({
model: "Qwen/Qwen3-Embedding-0.6B",
clientType: "openai",
});
for await (const event of client.streamingResponseStateful({
message: {
role: "user",
content_items: [{ type: "text", text: "Hello world" }],
},
config: {},
})) {
console.log(event);
}
}
main().catch(console.error); </details>
| Model Name | Vendor | Example Model ID | Input Modalities | Output Modalities |
|---|---|---|---|---|
| Gemini 3-3.5 | Official/Google Vertex AI | gemini-3.5-flash | Text, Image | Text, Image, Speech, Embedding |
| Claude 4.6-4.8 | Official/Amazon Bedrock/UModelVerse | claude-opus-4-8 | Text, Image | Text |
| GPT-5.4/5.5 | Official/UModelVerse | gpt-5.5 | Text, Image | Text, Embedding |
| Kimi-K2.5/K2.6 | Official/OpenRouter/SiliconFlow | kimi-k2.6 | Text, Image | Text |
| DeepSeek V4 | Official/OpenRouter/SiliconFlow | deepseek-v4-pro | Text | Text |
| GLM-5.1 | Official/OpenRouter/SiliconFlow | glm-5.1 | Text | Text |
| Qwen3.6 | OpenRouter/SiliconFlow/vLLM | qwen/qwen3.6-35b-a3b | Text, Image | Text, Embedding |
Install from PyPI:
```bash uv add agenthub-python
Install from npm:
npm install @prismshadow/agenthub
Build from source:
cd src_ts && make install && make build
See src_ts/README.md for comprehensive usage examples and API documentation.
高质量的AI工作流SDK,支持多LLM
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
经综合评估,AgentHub 在Agent工作流赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | agenthub |
| Topics | aianthropicclaudedeepseekpython |
| GitHub | https://github.com/Prism-Shadow/agenthub |
| License | Apache-2.0 |
| 语言 | Python |
收录时间:2026-06-01 · 更新时间:2026-06-01 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端