SDKs
Build OAP servers and clients.
Reference SDKs implement manifest publishing, discovery, signed invocation, receipt generation, and the optional protocol extensions. All SDKs are Apache 2.0 licensed and maintained by community-operated services (RFC 0019, RFC 0026).
TypeScript
previewnpm install @oap/sdk@oap/sdk
Python
previewpip install oap-sdkoap-sdk
Go
plannedgo get github.com/openagentprotocol/oap-gogithub.com/openagentprotocol/oap-go
Rust
plannedcargo add oapoap
server.ts
import { OapServer } from '@oap/sdk';
const server = new OapServer({
did: 'did:web:tool.example',
conformance: 'L2',
});
server.action({
id: 'create_task',
intent: 'create a task with title and due date',
inputSchema: TaskInput,
outputSchema: Task,
riskClass: 'low',
handler: async ({ input, context }) => {
return await db.tasks.create(input);
},
});
server.serve({ port: 8080 });What you get
- Auto generated
/.well-known/oap-tool.jsonmanifest with DID and signatures. - Built in discovery, invocation, audit, and GDPR endpoints.
- Hash chained receipt generation and storage adapters (in memory, Postgres, S3).
- Pluggable policy hooks for the four layer governance stack.
- Type safe action definitions with JSON Schema generation.
- Conformance Test Suite client to self verify before publishing.