whoami
Spectre — OTP-native agent runtime for Elixir. This site runs on it.
cat manifesto.md
Agents that read like a map, not a magic trick.
The articles below were written over Telegram by an agent that asks before it writes. Here is how it works, and what it is built on.
$
man spectre
What Spectre is
An agent is a supervised system, not a prompt. Spectre gives it one owner per piece of state, explicit messages at every boundary, and recovery planned from the start — the way OTP treats everything else.
cat POLICY.md
Anything protected crosses one boundary:
- models and routes may propose work
- protected work must pass a deterministic policy
- approval changes state but does not execute the work
- execution happens only through an explicit host call
- every terminal outcome is returned as data
A Spectre agent should read like a map, not a magic trick.
The whole agent is one module: the model, the router, a protected action, and the policy guarding it.
defmodule MyApp.SupportAgent do
use Spectre.Agent
model(MyApp.LLM, purpose: :smart)
router(via: [:regex, :embedding, :llm_classifier])
actions MyApp.SupportActions do
protect(:delete_account, with: :delete_account_confirmation)
end
policy :delete_account_confirmation do
request(:confirm_delete_account)
accept(:confirmed_delete, regex: ~r/^yes, delete it$/i)
reject(:cancel_delete, regex: ~r/^(no|cancel)$/i)
attempts(3, then: :cancel_pending)
end
interrupt :HELP, regex: ~r/^(help|menu)$/i do
reply(:help)
end
end
Every article below arrived through this path.
Routing is a dial, not a dogma: regex, a dataset, or a full LLM classifier. What happens after the decision stays deterministic.
Borrowed from Phoenix routers, Ecto schemas, Oban workers and OTP supervision trees. Not a framework you disappear into.
No SQL here. GitHub keeps the content, Phoenix serves an ETS projection, and the agent asks before it writes.
github.com/elchemista/ex_blog — this site, open source
ls -1 spectre*
The ecosystem
Supervised Process Event Controller for Transition and Reasoning with Elixir. The runtime the rest plugs into.
github.com/elchemista/spectre
Semantic memory engine: ETS working memory, durable recall, typed observations and mental models.
github.com/elchemista/spectre_mnemonic
Elixir-first planning toolkit: Action Language in, validated tool calls out. No JSON schema in the prompt.
github.com/elchemista/spectre_kinetic
Transport-independent protocol for agents talking to other agents.
github.com/elchemista/spectre_pulse
An embeddable mission loop for Elixir agents.
github.com/elchemista/spectre_directive
Agent-first browser lens for Lightpanda, so an agent can read what it shipped.
github.com/elchemista/spectre_lens
Picks the model per request across OpenAI, OpenRouter, Ollama and Gemini, enforcing privacy, context, cost and latency limits before the call.
github.com/elchemista/spectre_prism
The external-channel boundary: it normalizes provider events and delivers messages idempotently.
github.com/elchemista/spectre_beam
Also running under this site: vettore, ex_fastembed, ex_gram.
ls -lat posts/
Latest posts
Notes written while building all of the above.
ls posts/
ls: no matching file for this selection
The next piece is already in the works. Come back soon, or subscribe to the feed.
exit status 1