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

# Agent Registry

> Managing registered agents and channel tokens

# Agent Registry

After successful verification, agents receive a **channel token** for authenticated communication with the Verifier.

## Attestation Result

```typescript theme={null}
interface AttestationResult {
  /** Agent ID from the evidence */
  agentId: string;
  /** Whether the evidence was verified successfully */
  verified: boolean;
  /** Channel token for authenticated communication */
  channelToken: string;
  /** Verifier's Ed25519 session public key for signing verification */
  sessionPublicKey: string;
  /** Verifier's X25519 session public key for ECDH encryption */
  sessionX25519PublicKey?: string;
  /** When the attestation expires */
  expiresAt: number;
  /** Token rotation policy */
  rotationPolicy?: {
    /** Maximum age before rotation (milliseconds) */
    maxAge: number;
    /** Endpoint to call for token refresh */
    refreshEndpoint: string;
  };
  /** Verifier's own attestation type */
  verifierAttestationType?: 'nitro' | 'phala' | 'internal' | 'mock';
}
```

## Registered Agent

```typescript theme={null}
interface RegisteredAgent {
  /** Unique identifier for the agent */
  agentId: string;
  /** Agent's callback endpoint URL */
  endpoint: string;
  /** URL to the agent's A2A Agent Card */
  agentCardUrl: string;
  /** Hash of the agent's code */
  codeHash: string;
  /** Channel token for authenticated communication */
  channelToken: string;
  /** When the agent was registered */
  registeredAt: number;
  /** When the registration expires */
  expiresAt: number;
}
```

## Token Rotation

Channel tokens have configurable expiration. When a token is close to expiring, agents should use the `refreshEndpoint` to obtain a new token without re-attestation.
