PPIO Agent Runtime SDK
PPIO Agent Runtime SDK 是一个轻量级的 AI 智能体运行时框架,旨在为开发者提供简单易用的智能体部署解决方案。
核心特性
- 极简改造:最小化代码修改,只需添加装饰器即可
- 零配置启动:默认配置即可运行,无需复杂配置
- 容器化就绪:专为 Docker 容器化部署设计
- 流式响应:支持同步和异步流式输出
- 健康监控:内置健康检查机制
快速开始
安装
pip install ppio-agent-runtime
基础使用
from ppio_agent_runtime import PPIOAgentRuntimeApp
app = PPIOAgentRuntimeApp()
@app.entrypoint
def my_agent(request: dict) -> str:
"""简单的智能体函数"""
query = request.get("query", "")
return f"处理查询: {query}"
if __name__ == "__main__":
app.run()
流式响应
from ppio_agent_runtime import PPIOAgentRuntimeApp
app = PPIOAgentRuntimeApp()
@app.entrypoint
def streaming_agent(request: dict):
"""流式响应智能体"""
query = request.get("query", "")
for i in range(5):
yield f"步骤 {i+1}: 处理 {query}"
if __name__ == "__main__":
app.run()
异步智能体
import asyncio
from ppio_agent_runtime import PPIOAgentRuntimeApp
app = PPIOAgentRuntimeApp()
@app.entrypoint
async def async_agent(request: dict) -> str:
"""异步智能体函数"""
query = request.get("query", "")
# 模拟异步处理
await asyncio.sleep(1)
return f"异步处理完成: {query}"
if __name__ == "__main__":
app.run()
部署
使用 PPIO CLI 工具部署你的智能体:
# 配置项目
ppio-agent configure
# 部署智能体
ppio-agent deploy
文档
许可证
MIT License
Metadata
Release files for ppio-agent-runtime 0.1.0
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 |
|---|---|---|---|---|
| ppio_agent_runtime-0.1.0.tar.gz | 15.9 kB | Without provenance | Details for ppio_agent_runtime-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ppio_agent_runtime-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ppio_agent_runtime-0.1.0-py3-none-any.whl |
Total release size: 24.6 kB
Release files / ppio_agent_runtime-0.1.0.tar.gz
| Download URL | ppio_agent_runtime-0.1.0.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e042448b6e5a24aebb7ae31d0d1f694b1f7fa7d09ecd2b750c9fb5cc1bf2de84
|
|
BLAKE2b-256 checksum How to use checksums |
5193fba7b0145ab592b8387609af06a2d2bc3775072117818e6084c68690d7ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / ppio_agent_runtime-0.1.0-py3-none-any.whl
| Download URL | ppio_agent_runtime-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10cd3eeedae6a0c0b65e1fc93bb50bb818f18ed35367f9d56acc942d999c7ec3
|
|
BLAKE2b-256 checksum How to use checksums |
17dbb7949df04d50b6a2226be66608f836cd35b8fb40b5b9ba25df1d7433aab3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Security for ppio-agent-runtime 0.1.0
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.