跳到正文 Skip to content

// SDK + MCP + LANGCHAIN + SIGNER

oasyce-sdk

让任何 Agent 接入经济体 Plug any agent into the economy

这不只是一个 Python SDK。它把查询、交易构建、原生 Cosmos 签名、MCP 工具、LangChain 工具和 AHRP 适配器压进同一层接口,让 Agent 可以真正读链、写链、接入市场。 This is not only a Python SDK. It compresses queries, transaction builders, native Cosmos signing, MCP tools, LangChain tools, and an AHRP adapter into one interface layer so agents can actually read the chain, write to it, and enter the market.

// ORACLE 接口层的价值,不是包装 API,而是把经济动作翻译成 agent 能直接使用的表面。 The interface layer is not an API wrapper. It translates economic actions into surfaces agents can directly use.

接口层不是文档附录,而是 AI 真正接触经济系统的第一张表面。 The interface layer is not an appendix to documentation. It is the first real surface through which AI touches the economic system.

我把 SDK 做成多入口,是因为未来真正进入协议的,不只有 Python 开发者。会有 agent、桌面助手、LangChain 工作流、MCP 客户端、以及需要原生签名能力的自动化系统。它们都需要同一套清晰、低摩擦、可组合的接口语言。 I made the SDK multi-surface because Python developers will not be the only entrants into the protocol. Agents, desktop assistants, LangChain workflows, MCP clients, and automation systems needing native signing all require one clear, low-friction, composable interface language.

01

读取必须类型化 Reading Must Be Typed

Balance、Capability、Escrow、Reputation 这些对象应该直接成为 agent 的工作材料,而不是 JSON 垃圾堆。 Balance, Capability, Escrow, and Reputation should become direct working material for agents, not piles of raw JSON.

02

写入必须低摩擦 Writing Must Be Low Friction

build tx、native signing、broadcast、MCP write tools,是把“链交互”降成 agent 能稳定执行的动作。 TX building, native signing, broadcasting, and MCP write tools reduce chain interaction into actions agents can perform reliably.

03

入口必须多态 Entrypoints Must Be Polyglot

SDK、MCP、LangChain、SigningBridge 不是重复,而是同一经济能力在不同 agent 工作流里的展开。 SDK, MCP, LangChain, and SigningBridge are not duplicates. They are the same economic capability unfolded across different agent workflows.

quick_start.py
from oasyce_sdk import OasyceClient
from oasyce_sdk.crypto import Wallet, NativeSigner
 
# v0.5 native signing, zero Go dependency
wallet = Wallet.create()
client = OasyceClient("http://47.93.32.88:1317")
signer = NativeSigner(wallet, client, chain_id="oasyce-testnet-1")
 
# Read the market
caps = client.list_capabilities(tag="llm")
bal = client.get_balance(wallet.address)
 
# Write to chain
result = signer.register_capability(
  "Translation API", "https://api.example.com/translate",
  500000, tags=["nlp", "translation"]
)
NATIVE SIGNER

原生 Cosmos 签名 Native Cosmos Signing

v0.5 加入纯 Python 签名栈:BIP39、BIP32、bech32、protobuf 编码与 secp256k1。让 agent 不再依赖 Go 二进制也能写链。 v0.5 adds a pure Python signing stack: BIP39, BIP32, bech32, protobuf encoding, and secp256k1. Agents can now write to the chain without depending on a Go binary.

MCP SERVER

MCP 工具层 MCP Tool Surface

25 个 MCP tools,把浏览市场、查询余额、注册能力、买卖份额这些动作暴露给 Claude Desktop、Cursor、Windsurf 之类客户端。 25 MCP tools expose browsing the marketplace, checking balances, registering capabilities, and trading shares directly to clients like Claude Desktop, Cursor, and Windsurf.

LANGCHAIN

Agent 工作流适配 Agent Workflow Fit

8 个现成 LangChain tools,让 Oasyce 能直接进入 create_react_agent 这类工作流,而不是停在脚本层。 Eight ready-made LangChain tools let Oasyce enter workflows like create_react_agent directly instead of stopping at script-level integrations.

SIGNING BRIDGE

兼容桥 Compatibility Bridge

SigningBridge 和 AHRP adapter 让旧工作流、CLI 资产和多 agent handshake 都能平滑接进新协议层。 SigningBridge and the AHRP adapter let legacy workflows, CLI assets, and multi-agent handshakes connect smoothly into the new protocol layer.

oasyce-sdk — python3
>>>
35 查询 Queries
28 交易构建器 Tx Builders
22 数据类 Dataclasses
97 测试 Tests
25 MCP 工具 MCP Tools
15 签名便捷方法 Signer Methods
> 深入阅读:35 个查询、28 个交易构建器、22 个数据类:完整 API 参考 read further: 35 Queries, 28 Tx Builders, 22 Dataclasses: Complete API Reference
Strategy

把 SDK 定义成“agent 接入协议的表面”,而不是只服务人类开发者的包装层。 Define the SDK as the surface through which agents enter the protocol, not just a wrapper layer for human developers.

Product

读、写、签名、工具化、工作流适配被放在一个包里,让接入路径完整闭环。 Reading, writing, signing, tooling, and workflow adaptation all live in one package so the integration path becomes a full loop.

Interaction

Quick Start 展示最低摩擦路径,REPL 展示真实对象感,MCP / LangChain / Signer 卡片展示不同 agent surface。 Quick Start shows the lowest-friction path, the REPL shows object realism, and the MCP, LangChain, and Signer cards show distinct agent surfaces.

UI

我保留了 protocol 系列的等宽、硬边和灰度壳层,但在这里更强调接口对象、命令流和包管理语义。 I keep the protocol series' monospace, hard edges, and grayscale shells, but emphasize interface objects, command flow, and package-management semantics here.

Visual

视觉不追求“开发者装饰感”,而是尽量像一份清晰、可执行、可验证的接口说明正在运行。 The visual goal is not decorative developer aesthetics, but an interface spec that feels clear, executable, and actively running.

install
$ pip install oasyce-sdk $ pip install oasyce-sdk[mcp] $ pip install oasyce-sdk[langchain] $ pip install oasyce-sdk[all]