Build on Synap
The doors into a Synap pod, and which one to use for an app, a script, an integration or an agent.
A pod is a backend first. Everything the apps do goes through the same doors you can use: the same records, the same permissions and the same governance. An agent or an app that writes through any door gets the same proposal and approval rules.
This section is for developers: apps, scripts and integrations that read and write a pod. To connect an AI client such as Claude Code or Cursor, see Connect your AI instead.
In this section
Apps and scripts
SDK first query
Install the typed SDK, create a client for your pod and read your first entities.
Build a website on your pod
Pick how your site talks to a pod, then build a Next.js app that people connect to their own pod.
Pod-app sign-in
Reference for @synap-core/sdk/connect: options, routes, permissions, the connection, results and error codes.
API keys
Create, scope, grant and revoke the keys that apps, scripts and agents use to call your pod.
Webhooks
Have your pod POST a signed request to your URL when something changes.
Chat stream
Stream an AI conversation backed by your pod, from any script or app, with one API key.
Skill invocation
List and invoke skills on your pod over HTTP with an API key.
With other tools
n8n
Connect n8n workflows to a pod with an API key, a webhook subscription and the Hub REST API.
Coding with agents
Point Claude Code, Cursor and other coding agents at these docs, and connect them to your pod.
The doors
| Door | Path on the pod | Use it for | Auth |
|---|---|---|---|
| tRPC API, through the SDK | /trpc | TypeScript and React apps that act as a signed-in person | Sign-in session (cookie or session token); no API keys |
| Hub REST API | /api/hub/* | Scripts, agents, integrations in any language | API key (hub-protocol.read / .write) |
| MCP | /mcp | AI clients: Claude Code, Codex, Cursor, ChatGPT and others | API key or OAuth |
| Webhooks | your URL | Being told when something changes | HMAC signature |
| External chat | /api/external/chat/* | Streaming an AI conversation backed by your pod | API key (chat.stream) |
| External skills | /api/external/skills/* | Listing and invoking skills | API key (skills.invoke) |
Every pod publishes the OpenAPI description of its Hub REST API at /api/hub/openapi.json.
The packages
| Package | What it is |
|---|---|
@synap-core/sdk | Typed tRPC client for apps where a person signs in. See SDK. |
@synap-core/react | React provider and hooks over the SDK (TanStack Query). |
@synap-core/hub-rest-client | Zero-dependency client for the Hub REST API, for agents and scripts that hold an API key. |
@synap-core/sdk-realtime | Socket.IO client for change notifications. |
@synap-core/api-types | The pod's tRPC AppRouter type. |
@synap-core/types | Domain types and schemas. |
@synap-core/cli | The user CLI: connects computers and agents to a pod. |
Where to start
- An app people connect to their own pod: Build a website on your pod, then the pod-app sign-in reference.
- An app in TypeScript where a person signs in: SDK first query.
- A script, a site or an integration: an API key and the Hub REST API.
- React to changes in another system: Webhooks.
- A coding agent that writes code against Synap: Coding with agents.
- An AI agent: Connect your AI, then MCP and agent skills.
- How the data model works: Kind and facets.