Lalia is a local daemon that lets AI agents coordinate with each other via signed, persisted messages — rooms for N-party pub/sub, channels for 1:1 peer messaging, and a supervisor/worker task primitive backed by git worktrees.
Read these before writing any code:
docs/IDEA.md— why lalia exists and what problem it solves.docs/ARCHITECTURE.md— daemon/client/channel/room/writer/registry/task model as shipped.docs/IDENTITY.md— ULID agent_id, resolver grammar, nicknames, leases.docs/CHANNELS.md— why there is notunnel/send/await/sidanymore.protocol.go— every wire-level request/response shape.state.go— the dispatch switch; entry point for every operation.
| File | Role |
|---|---|
main.go |
CLI entry point, flag parsing, daemon spawn |
state.go |
Central op dispatch — start here when tracing any command |
daemon.go |
Unix socket listener, connection handling |
protocol.go |
All request/response structs; wire format lives here |
channel.go |
1:1 peer channel logic |
room.go |
N-party room logic, membership, overflow |
task.go |
Supervisor/worker task primitive: publish, claim, status |
registry.go |
Agent registration, leases, identity resolution |
identity.go |
ULID generation, canonical name introspection, suggest-name |
queue.go |
SQLite-backed durable write queue |
writer.go |
Git-backed transcript writer |
signing.go |
Ed25519 request signing and verification |
keystore.go |
Keystore interface; keystore_darwin.go = macOS Keychain backend |
nickname.go |
Nickname resolver (~/.lalia/nicknames.json) |
project.go |
Git project/branch/worktree auto-detection |
run.go |
lalia run harness spawn wrappers |
help.go |
lalia help and lalia protocol text — update when commands change |
client.go |
Client-side socket plumbing shared by all commands |
prompts/ |
Role bootstrap prompts embedded into harness instructions files |
make build # ./bin/lalia
make test # go test ./... (~107 tests, ~19s)
make install # build + install to auto-detected PREFIX + reload daemon
make reload # kill daemon so next call spawns from current binary
Never run make install from a feature branch against the production
LALIA_HOME. Use an isolated LALIA_HOME for branch testing.
protocol.gostructs are additively extensible. Renaming or removing fields breaks clients still on main.- Persisted file formats are stable. This covers:
~/.local/state/lalia/workspace/registry JSONpeers/<a>--<b>/*.mdtranscript filesrooms/<name>/*.mdtranscript filestasks/<project-id>/task-list.json
- Every commit that touches agent-facing behavior must update
help.goand shell completions incompletions/in the same commit. - Commit trailers for work done through lalia itself:
Co-Authored-By: <lalia-name> (<model>) <<lalia-name>@lalia.local> - Branch from main. Tests must pass (
make test) before marking a workstream ready.
See ROADMAP.md.