spectre — zsh — en

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

github.com/elchemista/spectre
spectre/README.md

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.

support_agent.ex elixir

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
$ spectre trace --this-site

Every article below arrived through this path.

telegram / mcp — authenticated administrator
└── spectre_beam — channel boundary, identity
└── spectre — routing, state, policy, effects
├── skills — reader · editorial · operations
├── spectre_prism — fast · balanced · deep tier
├── spectre_kinetic — action language → typed action
├── spectre_lens — audits the rendered page
└── policy — confirmation → effect
└── writer → git → ets — the page you are reading
$ why --like-this

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

8 libraries

Also running under this site: vettore, ex_fastembed, ex_gram.

ls -lat posts/

Latest posts

Notes written while building all of the above.

0 files
stderr

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