Install
Build an agent
Createhello-agent.ts:
On first run the SDK generates an Ed25519 keypair in
.samvad/keys/ and starts serving automatically. That directory is gitignored — never commit it.http://localhost:3002 with these endpoints:
| Endpoint | Purpose |
|---|---|
GET /.well-known/agent.json | Machine-readable agent card |
GET /agent/intro | Human-readable introduction |
GET /agent/health | Liveness check |
POST /agent/message | Synchronous calls |
POST /agent/task | Async tasks |
GET /agent/task/:taskId | Task status polling |
POST /agent/stream | SSE streaming |
Call the agent
Createcall-agent.ts:
What just happened
AgentClient.from()fetched the remote agent card (/.well-known/agent.json) and loaded the public key.client.call()built a signed message envelope — nonce, timestamp, Ed25519 signature over canonical JSON of all fields.- The agent verified the signature, checked the nonce window, validated the input schema, and ran your handler.
- The result came back in a signed response envelope.
Next steps
Building Agents
Rate limits, trust tiers, async mode, and more.
Calling Agents
Async tasks, polling, SSE streaming, delegation.