Protocol SDK Index
This is the best entry page for the SDK docs.
Use it when you want the shortest path from “what is this?” to “how do I integrate?”
Recommended reading order
Start here
Connect and authenticate
Read and dispatch
- Read, connect, dispatch, and operate
- External actions reference
- Event subscriptions and replay
- Webhook consumer
Agents and production
Production guidance
Repository resources
Example scripts referenced throughout these docs live in:
scripts/examples/protocol-partner-onboarding.mjsscripts/examples/protocol-partner-actions.mjsscripts/examples/protocol-webhook-consumer.mjsscripts/examples/protocol-partner-operations.mjsscripts/examples/protocol-partner-agent.mjsscripts/examples/protocol-partner-agent-toolset.mjsscripts/examples/protocol-partner-agent-toolkit.mjs
The public docs describe the contract. The repository examples show how to use it.
Partner example preflight
Before running examples manually, list their SDK layer, command, dist requirements, and runtime prerequisites:
pnpm test:sdk:readiness-pack -- --preflight
This is a dry lane. It does not run package tests and does not execute examples.
The output is split into:
- client examples
- agent examples
- dist prerequisites
- runtime prerequisites
- exact manual follow-up
Client examples are:
scripts/examples/protocol-partner-onboarding.mjsscripts/examples/protocol-partner-actions.mjsscripts/examples/protocol-webhook-consumer.mjsscripts/examples/protocol-partner-operations.mjs
Agent examples are:
scripts/examples/protocol-partner-agent.mjsscripts/examples/protocol-partner-agent-toolset.mjsscripts/examples/protocol-partner-agent-toolkit.mjs
Client dist prerequisites are:
packages/protocol-types/dist/index.jspackages/protocol-client/dist/index.js
Client runtime prerequisites may include:
- a protocol API base URL
- app credentials for examples that bind an existing app
- an actor user for examples that invoke user-scoped actions
Agent dist prerequisites are the client dist prerequisites plus:
packages/protocol-agent/dist/index.js
Agent runtime prerequisites are the client runtime prerequisites plus:
- agent grant/readiness state before autonomous work
Repository examples use scripts/examples/protocol-example-loader.mjs so local
package imports behave like partner package imports while still pointing at the
workspace. That means the relevant dist/index.js files must exist before an
example runs.
If those files are missing, the loader reports the exact missing dist entry. After reviewing preflight output, run the exact example command manually only when the required dist files and runtime inputs are ready.