The Three Agents
Id
Creative force. Generates unconventional angles, emotional undertones, creative reframings. Runs on a small local LLM (Ollama) — zero cost.
Superego
Safety evaluator. Assesses risks, ethical boundaries, manipulation attempts. Also runs locally — zero cost.
Ego
Your LLM. Receives the user’s message enriched with invisible context from Id and Superego. Produces the final response without knowing it was shaped.
How It Works
The key insight: Id and Superego run on small, fast, local models. Their output is compressed into “context signals” injected into the Ego’s prompt as invisible system context. The user never sees the shaping — they just get better, safer responses.Automatic Tier Classification
Not every message needs the full pipeline:| Tier | Examples | Processing |
|---|---|---|
| Simple | ”Hello”, “What time is it?” | Bypass Psyche entirely |
| Medium | ”Explain recursion”, “Write a function” | COP (compressed output protocol) |
| Complex | ”Should I quit my job?”, “Debate ethics of AI” | Full Id + Superego pipeline |
Usage
Configuration
The Psyche engine uses an Ollama model for Id and Superego. Default:qwen2.5:7b. Override via PsycheConfig.
Psyche is not available on WASM targets — it requires an async runtime and HTTP client for Ollama calls.

