Spectre 0.4.0 / Elixir · OTP · GAM
Spectre 0.4 documentation
Start an agent in RAM, give it a command and observe which function answers. Your first run needs only Elixir and Spectre core.
With installed tools the architecture reads Stack → Agent → Server. Skip the Stack on your first run. To add your own library, follow the billing client example.
Your first run
- Start a conversation. Send “hello” to the generated agent and observe the Server reply.
- Follow an input from route to result. Copy a complete program, decline a request, then approve it and compare the output.
- Look up Server callbacks as you add a route, wait or Skill. Find dispatch order, arguments, options and return tuples.
Start with the architecture
Stack Agent Server
installed capabilities → routes and intents → application callbacks
models, memory, tools recognition evidence conversation + workers
│
governed proposal │
▼
Managed GAM
authority + human consent
│
admitted Act → execution
│
observed Outcome
Stack selects reusable capabilities. Agent declares recognition. Server owns the running conversation through ordinary OTP callbacks. Skills mounted with a server: binding have their own Server processes and state while sharing the root agent’s GAM Domain.
GAM means Governed Act Model. It defines the transition from a proposal to an authorized operation. Admission and execution are separate facts: permission to send an email does not prove that the email service accepted it. Read the GAM manifesto, then the architecture guide.
Choose a learning path
| Your goal | Read |
|---|---|
| Run the first conversation, without a model or database | Getting started |
| Understand ownership, workers and approval | Architecture and GAM |
| Combine patterns, similarity and model classification | Routing |
| Review examples, generate embeddings and train a classifier | Training |
| Ask a human through a different agent | Agent-to-agent |
| Implement a provider or application integration | Behaviours |
| Persist history, reduce historical RAM residency and recover | Storage |
| Generate and diagnose an application | Mix tasks |
| Choose optional libraries | Ecosystem |
| Build a complete workflow | Recipes |
| Verify behavior and operate the system | Testing and production |
| Upgrade an existing application | Migration from 0.3 |
What you need
Core requires Elixir ~> 1.19 and can run with neither a model nor a database. Add {:spectre, "~> 0.4.0"} to your dependencies. Models, browser drivers, transport credentials and database pools are host dependencies, installed only when needed.
The nine companion libraries are optional. Core does not require them to compile, run its tests or execute a RAM-only AgentServer. Their release versions are independent; consult the ecosystem installation notes before copying dependencies.
How to read examples
The first guide contains a complete model-free example. Later fragments explicitly identify the Stack, provider, prompt or effect registration they require. Names such as MyApp.Embeddings, MyApp.PrivateArchive and MyApp.MailClient describe application adapters; they are not modules shipped by Spectre.
These guides describe the 0.4 AgentServer path. The retained Instance, Run, Work/Vigil and definition-evolution APIs remain documented for existing applications, but do not replace the new Server lifecycle. See the versioned API reference for exact types and the 0.4 source guides for executable fixtures.