> ## Documentation Index
> Fetch the complete documentation index at: https://docs.samvad.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Protocol Overview

> SAMVAD v1.2 — language-agnostic wire protocol specification.

This section is the normative protocol specification. It describes what any compliant implementation must do, independent of programming language.

The reference implementation is [`@samvad-protocol/sdk`](https://www.npmjs.com/package/@samvad-protocol/sdk) (TypeScript). The [full spec](/spec/protocol-v1.2) and [JSON Schema definitions](https://github.com/w3rc/samvad/tree/main/schema/v1.2) are in the repository.

## Protocol version

Current version: **`1.2`**

The protocol version is declared in the agent card's `protocolVersion` field and returned in every `/agent/health` response. Receivers may reject requests from agents running incompatible versions.

## Conformance requirements

A compliant agent implementation must:

1. Host a valid agent card at `GET /.well-known/agent.json`
2. Expose all seven standard endpoints
3. Validate inbound envelope signatures against the sender's published public key
4. Reject envelopes older than 5 minutes or with a seen nonce
5. Enforce skill trust tiers after signature verification
6. Validate skill inputs against the declared `inputSchema`
7. Return standard error codes for all failure conditions
8. Retain async task results for at least 1 hour after completion

## Sections

<CardGroup cols={2}>
  <Card title="Agent Card" icon="id-card" href="/protocol/agent-card">
    The /.well-known/agent.json format — identity, skills, keys, rate limits.
  </Card>

  <Card title="Message Format" icon="envelope" href="/protocol/message-format">
    The signed request/response envelope shared by all three communication modes.
  </Card>

  <Card title="Communication Modes" icon="arrows-left-right" href="/protocol/communication-modes">
    Sync, async-with-webhook, and SSE streaming.
  </Card>

  <Card title="Error Codes" icon="circle-x" href="/protocol/error-codes">
    Standard error codes and their HTTP status mappings.
  </Card>

  <Card title="Discovery" icon="magnifying-glass" href="/protocol/discovery">
    Self-sovereign discovery and the optional public registry.
  </Card>
</CardGroup>
