Skip to main content

Install

Requires Node.js 20+. The SDK is ESM-only.

Build an agent

Create hello-agent.ts:
Run it:
On first run the SDK generates an Ed25519 keypair in .samvad/keys/ and starts serving automatically. That directory is gitignored — never commit it.
Your agent is now live at http://localhost:3002 with these endpoints:

Call the agent

Create call-agent.ts:
Run both in separate terminals. That’s it — a signed, rate-limited, schema-validated, streaming-capable agent with one call.

What just happened

  1. AgentClient.from() fetched the remote agent card (/.well-known/agent.json) and loaded the public key.
  2. client.call() built a signed message envelope — nonce, timestamp, Ed25519 signature over canonical JSON of all fields.
  3. The agent verified the signature, checked the nonce window, validated the input schema, and ran your handler.
  4. The result came back in a signed response envelope.
All of that is automatic.

Next steps

Building Agents

Rate limits, trust tiers, async mode, and more.

Calling Agents

Async tasks, polling, SSE streaming, delegation.