FiuAI SDK Agent 1.0
这是一个 provider-free 的 Agent 基础 SDK。业务 chat 调用必须通过
LLMGatewayClient 发送到 fiuai-ai Gateway;SDK 不创建 ChatOpenAI、模型实例、
provider client、callback 或 usage log writer。
安装
pip install fiuai-sdk-agent==1.0.0
pip install fiuai-sdk-agent[embedding]
pip install fiuai-sdk-agent[vector]
0.5.x 是 legacy 版本,只供尚未迁移的 fiuai-agent 使用。World 业务使用 1.x,
升级时由应用显式更新依赖和 lock 文件。
Gateway 调用
from fiuai_sdk_agent import AgentRuntime, LLMGatewayClient, SkillRegistry
client = LLMGatewayClient(base_url="http://fiuai-ai:8000")
runtime = AgentRuntime(
context=business_context,
skill_registry=SkillRegistry(),
gateway_client=client,
)
model = runtime.get_chat_model(role="semantic.document_summary", model="auto")
response = await model.ainvoke([
{"role": "user", "content": "请摘要这份文档"},
])
print(response.content)
Gateway 负责 provider/model 路由、重试、fallback、deadline、认证上下文校验和
llm.llm_usage_log。调用方负责 evidence、结构化结果校验和业务防火墙。
SDK 边界
SDK 提供:
LLMGatewayClient、LLMGatewayResponse、LLMGatewayErrorGatewayAgent、AgentRuntime、Skill、Plan、Event 和 Graph 抽象- 独立 embedding 与 vector 能力
- 纯协议类型、token 限制、价格计算和响应解析 helper
SDK 不提供:
- provider key、base URL 或本地模型 catalog
LLMManager、ChatOpenAI和旧 callback- 本地 chat retry/fallback 或 usage database writer
- World、Chat、Agent 的业务对象和 prompt
Embedding
Embedding 是独立能力,可以按需启用 embedding extra。Embedding 配置不依赖
chat runtime,也不写 Gateway chat usage log。
未来流式协议
1.0 首期只实现非流式 Gateway chat。SSE、thinking/text/tool-call 事件和
astream() 将在 fiuai-agent 后续迁移中单独发布,不影响当前 1.0 contract。
Metadata
Release files for fiuai-sdk-agent 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fiuai_sdk_agent-1.0.1.tar.gz | 72.8 kB | Without provenance | Details for fiuai_sdk_agent-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fiuai_sdk_agent-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for fiuai_sdk_agent-1.0.1-py3-none-any.whl |
Total release size: 173.5 kB
Release files / fiuai_sdk_agent-1.0.1.tar.gz
| Download URL | fiuai_sdk_agent-1.0.1.tar.gz |
|---|---|
| Size | 72.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97fa4572efe29fcd9ab95c43e6c0abe6d69ff2216287223e68fbaefe1af39e61
|
|
BLAKE2b-256 checksum How to use checksums |
6194d282027d70101c88cf723fc8f24076cc4983ac6122925a7c1be3638d2942
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / fiuai_sdk_agent-1.0.1-py3-none-any.whl
| Download URL | fiuai_sdk_agent-1.0.1-py3-none-any.whl |
|---|---|
| Size | 100.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
859be9aead11e1d6f95856d11e7a94188b6a4314fba0d2e95d132076ed611ad0
|
|
BLAKE2b-256 checksum How to use checksums |
e38e3fe86eb6a64f86d39c19d06dd12eed44256036ea5266fea87a92bcb97a51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for fiuai-sdk-agent 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.