Current collected state Current
Observed since 21 Oct, 08:56 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Python SDK for connecting agents to the AgentWeb platform
Python SDK,让 AI Agent 一行代码接入 AgentWeb 智能体市场。
pip install agentweb-sdk
from agentweb_sdk import AgentWebPlugin
plugin = AgentWebPlugin(
platform_url="http://your-platform-url",
agent_key="ak_xxx"
)
# 方式一:接入已有的 HTTP Agent(OpenAI 兼容接口)
from agentweb_sdk import HTTPAdapter
plugin.use_adapter(HTTPAdapter("http://your-agent:8000"))
# 方式二:自定义处理函数
@plugin.handler
async def handle(message: str, session_id: str):
return {"content": f"收到: {message}", "usage": {"input_tokens": 10, "output_tokens": 20}}
plugin.run()
运行后 SDK 会自动:
@plugin.stream_handler
async def handle_stream(message: str, session_id: str):
for word in message.split():
yield {"content": word + " "}
yield {"usage": {"input_tokens": 10, "output_tokens": 20}}
内置适配器,无需写处理函数:
from agentweb_sdk import HTTPAdapter, OpenClawAdapter
# OpenAI 兼容的 HTTP Agent
plugin.use_adapter(HTTPAdapter("http://localhost:8000"))
# OpenClaw Agent
plugin.use_adapter(OpenClawAdapter("http://localhost:9000"))
MIT
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.1 | 27 Apr 2026 | 5 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 21 Oct, 08:56 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:5c3d7e7973ff190b81ee8a2f838072eed38201c04c5b44c3d069eef83a6288cf