SDK and agents
@meshpoint/sdk
Section titled “@meshpoint/sdk”A fetch-based TypeScript client with no Node-only dependencies; runs in Node 22+, Bun, Deno and Workers.
npm i @meshpoint/sdkimport { MeshpointClient, projectIdFromRemote, redact } from "@meshpoint/sdk";
const client = new MeshpointClient({ baseUrl: "https://api.meshpoint.dev", token: process.env.MESHPOINT_TOKEN!, project: projectIdFromRemote("git@github.com:acme/web.git"), // github.com--acme--web branch: "master",});
// Session start: items now, teammates in the background.const { recall, presence } = await client.sessionStart({ budget: 3000 });inject(recall.items, recall.checkpoint);presence.then(showTeammates);
// During the session: buffered, sent every 60s and on close.client.capture({ body: turnText, paths: ["src/app.ts"] });client.checkpoint("what we are doing and why");
// Distilled knowledge, written directly.await client.putItems([{ id: "dec-1", kind: "decision", title: "Use KV for recall", body: "..." }]);
await client.close();Behaviour:
capture()never sends by itself. Turns go out everyflushIntervalMs(default 60 s), when the buffer reachesflushMaxTurns(default 200), onflush()and onclose(). A failed flush keeps the turns in order for the next attempt and reports toonError; after ten intervals of failure the oldest turns are dropped.recall()is served from the edge and can be up to 60 s stale at a distant region.recall({ fresh: true })reads the origin.sessionStart()returns recall and a presence promise that never rejects.capture(),checkpoint()andputItems()run every body throughredact()before sending, so credentials never leave the process.redact()is exported for your own use. See Data and privacy.projectIdFromRemote()flattens any clone URL of one repository to one id.
The setup skill
Section titled “The setup skill”Agents onboard a machine by fetching one file and following it:
Fetch https://meshpoint.dev/skills/meshpoint-setup/SKILL.md and follow it.The skill installs the CLI, signs in (device code when there is no browser), connects every harness it finds, runs meshpoint doctor, and reports. It never uses sudo and never asks for a token. Keep your own onboarding instructions pointing at it rather than copying its steps; it changes with the CLI.
Agent card and llms.txt
Section titled “Agent card and llms.txt”- meshpoint.dev/.well-known/agent.json: an A2A agent card describing the HTTP API, bearer authentication, and the setup, recall, items and presence skills.
- meshpoint.dev/llms.txt: the plain-text index agents read first.
- docs.meshpoint.dev/llms.txt: this documentation’s index.
Writing a harness adapter
Section titled “Writing a harness adapter”Every adapter translates a harness’s events onto five operations of one session object: start (inject recall and presence), user (spool the prompt), assistant (spool the reply and touched paths), nudge (ask for a checkpoint when due) and end (send the spool). Hook-style harnesses run meshpoint tap <harness> once per event with the payload on stdin; in-process harnesses call the same object directly.
If your harness runs shell hooks and speaks the Claude Code hook protocol (event names, additionalContext, Stop decision: block), meshpoint tap claude-code may already work; Codex did. Otherwise the pieces you need are: a session id, the working directory (for the project and branch), the prompt text, the reply text and edited paths, and events for session start, stop, compaction and end. The meshpoint skill goes wherever your harness loads skills from.
The adapters for the seven supported harnesses are the reference implementations; the CLI package ships them under dist/<harness>/.
