Tech
[程序员] [开源] 做了一个 Go Runtime 的 Python Agent SDK,附一轮与 Claude Agent SDK 的对照测试
最近给 Nexus 的 Agent Runtime 做了 Python 封装,叫 nexus-agent-sdk-python 。
Python 侧负责接入,实际调用模型、执行工具和管理上下文的是 Go 写的 nxs 。可以用它给自己的程序接一个能读文件、改代码、跑命令的 Agent ,也可以接自定义工具。
支持单次任务和多轮会话,提供 MCP 、Hooks 和工具权限配置。模型可以通过 Anthropic 兼容接口接入,也支持 OpenAI Chat Completions / Responses 。平台 wheel 带了 nxs 和 rg ,覆盖 macOS 、Linux 、Windows 的 x86_64 和 ARM64 。
项目在这里。
GitHub
Python SDK 文档
Python 3.11+,先安装并配置模型 Key 。
pip install nexus-agent-sdk-python
export ANTHROPIC_API_KEY="你的 API Key"
下面这个例子读取当前目录的 README ,不...
Read the full discussion on V2EX
This article was aggregated from V2EX. Click to join the conversation.
View on V2EX