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

# Architecture

> Technical architecture and design principles

Synthra is built on a modular, three-layer architecture designed for high performance and reliability.

## System Layers

**Application Layer** - Handles user-facing operations including agent management, session control, and configuration.

**Processing Layer** - Manages context compression, rate limiting, and error handling for reliable message processing.

**Integration Layer** - Handles Solana blockchain, webhooks, and streaming connections for Web3 capabilities.

## Core Components

### Agent Manager

Primary interface for interacting with Synthra. Handles session lifecycle, message routing, and configuration.

**Performance:**

* Session creation: under 5ms
* Message routing: under 2ms
* Configuration updates: under 1ms

### Session Manager

Manages isolated conversation contexts with automatic lifecycle management.

| Tier       | Max Sessions | Context Window |
| ---------- | ------------ | -------------- |
| Free       | 10           | 4,096 tokens   |
| Pro        | 100          | 8,192 tokens   |
| Enterprise | Unlimited    | 32,768 tokens  |

### Context Compression

Three strategies for managing context windows:

* **FIFO** - Removes oldest messages (under 10ms)
* **Priority** - Removes lowest priority messages (under 30ms)
* **Semantic** - Removes redundant content (under 50ms)

### Rate Limiter

Token bucket and sliding window algorithms with sub-millisecond check time.

## Message Processing

1. Rate limit check
2. Session lookup
3. Token counting
4. Compression (if needed)
5. AI processing
6. Response storage

**Average Latency:** under 100ms end-to-end

## Security

* TLS 1.3 for all communication
* AES-256 encryption for stored data
* JWT-based authentication
* Role-based access control

## Performance

| Metric                | Value   |
| --------------------- | ------- |
| Requests/sec          | 10,000  |
| Concurrent sessions   | 100,000 |
| Message latency (p50) | 45ms    |

<Note>
  Synthra does not store message content by default. Enable persistence explicitly via configuration.
</Note>
