Conversations
An append-only, portable S-expression record of messages, tool activity, and runtime events, including errors and crashes.
The Common Lisp agent that rewrites itself and rocks.
A self-modifying terminal programming agent inside a live image it can inspect, edit, break & recover, and shape to fit any use case.
nix run github:lambda-symbolics/autolithcurl -fsSL https://sh.lambda-symbolics.com/autolith | shgit clone https://github.com/lambda-symbolics/autolith && cd autolith && ./script/bootstrapLinux, macOS, FreeBSD, NetBSD, OpenBSD, and Windows. See more.
Autolith manages MCP connections, memories, tools, agendas, and language servers in one Lisp runtime. Some might say it's a monolith.
Common Lisp provides describe, conditions, restarts, CLOS protocols, and source forms at runtime. The agent uses them to inspect and change its own implementation.
File search uses the fff Rust library. Autolith can spawn and maintain persistent Lisp workers for experiments and scripts.
Prose, typed at the prompt. Autolith reads it as a call to (prompt). Talk to a specific agent using the :to parameter.
Try the reader below to see how a message becomes a Lisp form. This is a syntax demonstration, not a running agent. In Autolith, use :to to address a child agent.
Read as a call to (prompt), addressed to the primary agent.
You don't need to know Lisp.
Plain text works, and most people never need to type a Lisp form.
If you want to learn Lisp, start at the prompt. The agent sees the form you entered, its result, and any signaled condition, so you can ask it to explain an error.
Text, commands, tool calls, and Lisp forms share one input prompt. A Lisp form runs in the Autolith image, and the agent sees its result. Read a prompt from disk, fill in a template, or generate it from the program you are debugging.
;; a computed prompt (prompt (read-file "review-notes.org")) ;; a tool, called by hand (resource.read :uri "workspace:.") ;; introspection, right there (describe 'application)
Autolith keeps working while its children run. Talk to one to correct it while it's doing something. Its next text reply comes back to your terminal.
(prompt :to 'test-review
"Run the focused tests and
report only failures.") Autolith replaces complete functions, methods, classes, macros, conditions, and global settings in its image at runtime. The change is instantly live.
You decide which changes to persist. Trial changes last only for the current process unless you commit them.
self.redefine journals a complete definition before compiling and installing it in the image.
self.exercise runs assertions against a pending change to check its behavior.
self.diff lets Autolith review all pending changes.
self.discard restores the definitions or settings from before an unwanted trial change.
self.commit persists pending changes as a replay script in Autolith's private Git history, after checking the replay in a clean process. Your modified agent can then be rebuilt from source and that script.
After an update, overrides whose tracked source has moved on are skipped instead of silently replacing new code, and (fix-skipped-definitions) asks Autolith to rebuild them against the current source.
If you or Autolith somehow manage to crash the process, it will write a crash capsule, boot a separately built pristine image, and select a known-working generation from it.
Autolith restores the conversation and starts a read-only diagnosis turn to investigate the crash.
You decide whether to attempt a repair.
Note: Many Lisp errors can be handled through the debugger without ending the process. You and the model can inspect the condition and choose an available restart.
Every model has a hard limit on how much it can read at once.
For a log, codebase, or folder of documents too large to fit, Autolith can divide the material among recursive inference calls and combine their answers. The full input stays outside the main conversation.
The approach comes from Recursive Language Models, by Alex L. Zhang, Tim Kraska, and Omar Khattab. Autolith is a compromise between a traditional agent and Prime Agent (which also rocks, by the way!): a conventional agent with RLM tools it can use when needed.
It writes small programs to search and slice the material, sends selected parts to separate model conversations, and combines the answers. Those conversations can split their own work further.
Each run has limits on calls, tokens, and recursion depth. If it reaches a limit, its retained context and trace are available for follow-up work; the answer may be incomplete.
src/*.lisp filesinference:s2Wb1o2, which the agent can read like any other resource.:::. ::: AUTOLITH v0.67.5 ;;`;; ;;; ─────────────────────────────────────── ,[[ '[[, [[[ model gpt-6.1-sol (effort high) c$$$cc$$$c $$' workspace /root/demo/autolith/ 888 888,o88oo,.__ YMM ""` """"YUMMMDownload recording
:::. ::: AUTOLITH v0.67.5 ;;`;; ;;; ─────────────────────────────────────── ,[[ '[[, [[[ model gpt-6.1-sol (effort high) c$$$cc$$$c $$' workspace /root/demo/autolith/ 888 888,o88oo,.__ YMM ""` """"YUMMMDownload recording
root@lho-thinkpad: ~/demo/autolith # ./bin/autolith --permissions full :::. ::: AUTOLITH v0.67.5 ;;`;; ;;; ─────────────────────────────────────── ,[[ '[[, [[[ model gpt-6.1-sol (effort high) c$$$cc$$$c $$' workspace /root/demo/autolith/ 888 888,o88oo,.__Download recording
Every Autolith instance has an authenticated local endpoint on loopback, keyed by the session ID. You can (detach), and Autolith will continue your work in the background.
From any other terminal on the machine
$ autolith localgroup status $ autolith localgroup tell SESSION "use the staging config" $ autolith localgroup attach SESSION --read-only $ autolith localgroup attach SESSION --take-over $ autolith localgroup pause SESSION $ autolith localgroup kill SESSION
Use these commands to inspect, steer, or attach to running sessions. An opt-in management REPL gives authenticated clients direct Lisp access to the running image. Enable it only for clients you trust.
Editors can drive the same sessions over the Agent Client Protocol: point your editor at autolith acp and it gets streamed answers, reasoning, tool activity, approvals, steering, durable follow-ups, and job control.
We considered naming it after a rock formation, but none sounded right. Old Windows NT terminology it is.
$ autolith data export project.sexp --workspace ~/code/project $ autolith data import project.sexp --workspace ~/src/project
Export writes an S-expression archive of conversations, memories, agendas, plans, papercuts, and other session assets. Import it into the target workspace to continue there.
Rebuild a self-modified agent on another supported machine from source and its private replay script; a saved core itself is platform-specific.
Long-running work gets acceptance criteria you write, verification gates the harness runs, and hard limits on turns, tokens, and wall-clock time. The model can ask to be verified. Only the evidence can say yes.
For lighter work, (goal "…") sets an objective without the ceremony. Start a mission with (mission "start …") and watch it with (mission "status").
Deliver the accepted build
spentreserved
verified
Children edit and test in their own Git checkouts, report back in one standard shape, and wake the primary turn when they finish. Nobody sits there polling.
Give task.run an isolation object and the child works in a detached worktree at an exact baseline. It returns an engineering artifact: a patch or commit range with the paths it touched, the checks it ran, the evidence, open issues, and integration notes.
The parent checks each artifact against the target and applies them in the order it chooses, resolving conflicts on purpose instead of by accident.
After a restart, retained work is sorted into live, completed, safe to restart, or needing a decision. Autolith asks before it repeats anything with side effects.
lsp.semantic turns a language server's rename, code action, or file move into one retained proposal. Applying it checks every file's revision and rolls the whole set back if anything fails.Alongside prose memories, Autolith keeps structured facts with their sources and basis. Rules derive facts locally, contracts check tool requirements before execution, and repeated tool sequences can become procedures.
?leave = ?start - (?travel + ?buffer)
model requests 0
recomputed locally
A fact's basis follows its source. A file Autolith read is an observation; your words are a user assertion. Derived facts inherit the basis of their premises, so an assumption cannot become an observation through reasoning. Conflicting facts are both kept and marked as disputed.
(why "c4df") shows a fact's sources, rule, and premises; (what-changed) lists what moved since you last asked, with the cause.@ learned procedure make-sales-report from 3 turns
Make the sales report for q5.
@ learned procedure make-sales-report fits this request
procedure.run make-sales-report {"file":"q5"}sales.loadsales.reportnotify.send
calls chosen by the model 1
learned from 3 turns
When three turns repeat a matching tool sequence, Autolith can learn a procedure without a model request. Varying values become parameters matched to the changing words in your requests. For a later matching request, the agent receives a notice to use procedure.run. Each call inside it goes through its own approval checks.
stale-endpoint. Repair: update its endpoint.
model requests between probes 0
cause found
Before trying repairs, diagnosis.run takes up to four hypotheses and probes that distinguish them. It ranks probes by how well they separate the remaining hypotheses relative to their cost, then runs up to three without another model request. If the probes cannot settle the case, it reports it as open.
Autolith avoids polling for finished jobs and keeps bulky command output outside the model context. Fewer requests and smaller previews leave more of the token budget for the work.
Illustration: each block is a provider request carrying the conversation context. A completion notice wakes the agent without polling.
Illustrative output sizes. Captured output stays in a retained log that the model can page or search without rerunning the command. Capture and retention limits apply.
shell-log: reference, subject to capture and retention limits. The model sees a preview of up to 6,000 bytes, weighted toward the tail, and pages or searches the retained output on demand.lisp.eval runs a sequence of forms, and with host tools a Lisp program can call agent tools and branch on their results inside one evaluation. Executable skills turn repeated procedures into tested code.conversation: resources, so old details are fetched instead of carried.Commands go through authorization before execution.
Process isolation and scoped filesystem access limit accidental damage. This is not a security boundary for hostile code.
cl-exec-sandbox provides sandboxing on Linux, macOS, and Windows.no_new_privs, and seccomp. --immutable disables live self-modification operations.Conversations, memories, agendas, and plans serve different purposes. Replay scripts and saved images preserve changes to the agent itself.
An append-only, portable S-expression record of messages, tool activity, and runtime events, including errors and crashes.
Notes recalled for the current workspace, plus global notes shared across workspaces.
Long-term commitments, blockers, and decisions. Think of a small Kanban board shared across sessions.
A short-term checklist for the current task, with progress recorded as the agent works.
Complete replay scripts for durable definitions and settings.
We stole this from Nix. A generation pairs a saved Lisp core with the metadata needed to select and restore that version of the agent.
AL runs programs and experiments in heap-isolated Lisp workers. Save a useful worker image and restore it for later work.
Stores are append-only or transactional. Writes to shared state are serialized across processes, so multiple AL instances can use the same workspace.
Configure AL through files or Lisp forms, with help from the running agent.
SKILL.md files with frontmatter, or the native SKILL.sexp format. Native skills can load modifications into the AL image, so review them before use.~/.agents/skills directory. Executable skills run tested Lisp workflows in a disposable worker.directory-scopes.sexp..autolith/agents/ and choose each role's tools, model, and reasoning effort.define-context-contributor adds temporary context to provider requests. These ephemeral notes erode as they age, without rewriting the conversation history. Context rules add guidance only when a path, language, tool, or role matches.define-application-command defines a command as a Common Lisp function with metadata for help and completion. Test it by hand or ask AL to help debug it. Add small commands like pebbles on a beach.AGENTS.md supplies project instructions. AL can also create AUTOLITH.org for project-specific adaptations that other agents do not need to load.(settings) opens a grouped page where you change values in place, and (setf (config :model) ...) does the same from Lisp.(help) gives a compact overview by topic, and (help "resource.edit") explains any command, operation, or tool from its live schema.The high testosterone, high estrogen way to install Autolith.
curl -fsSL https://sh.lambda-symbolics.com/autolith | shInstalls or updates the packaged release for your platform. Then run autolith.
irm https://sh.lambda-symbolics.com/autolith.ps1 | iexImagine running a good agent harness directly in PowerShell with the default color scheme, huh.
Then sign in to a provider
Once you authenticate, it's time to have fun. Run autolith to get started.
(update) inside AL, autolith update from the CLI Yes, piping a URL into a shell is evil. Read the installer first, it's not so bad.
Nix is the preferred installation method on worthy operating systems.