Lilac is an event-driven agent runtime: a typed Redis Streams event bus + surface adapters (Discord, with optional GitHub webhook integration) + an agent runner (AI SDK) + an HTTP tool server and tools CLI.
- Architecture/terminology:
PROJECT.md - Repo conventions for coding agents:
AGENTS.md
apps/core/: core runtime (Discord + optional GitHub surfaces, bus wiring, router, agent runner, workflow, tool server)apps/tool-bridge/: dev-mode tool server entry +toolsCLI bundle (builds todist/)apps/acp-controller/: ACP harness controller CLI (lilac-acp) with JSON and human output modes, builds todist/packages/event-bus/: typed event spec + Redis Streams transportpackages/agent/: AI SDK streaming agent wrapperpackages/utils/: env/config parsing, model providers, prompt + skills utilitiesdata/: local runtime state (config, prompts, sqlite dbs, default workspace)ref/: vendored upstream references (treat as read-only unless a task says otherwise)
This monorepo uses Bun workspaces. Install dependencies in the workspace(s) you work on:
cd apps/core && bun installcd apps/tool-bridge && bun installcd apps/acp-controller && bun installcd packages/event-bus && bun installcd packages/utils && bun installcd packages/agent && bun install
- Build the
toolsCLI:cd apps/tool-bridge && bun run build - Build the
lilac-acpCLI:cd apps/acp-controller && bun run build - Run all tests (workspace harness):
bun test - Run workspace tests:
cd apps/core && bun test - Typecheck
lilac-acp:cd apps/acp-controller && bun run typecheck - Typecheck (per workspace):
cd <workspace> && bunx tsc -p tsconfig.json --noEmit - Lint workspaces:
bun run lint - Lint and auto-fix where possible:
bun run lint:fix - Format check (code + JSON):
bun run fmt:check - Format write (code + JSON):
bun run fmt
Most commands below are long-running.
- Docker dev (includes Redis):
docker compose up --build - Core runtime (needs
REDIS_URL+ Discord config):bun apps/core/src/runtime/main.ts- Important: with default
core-config.yaml, both Discord allowlists are empty, so the bot ignores all Discord traffic until you set at least one ofsurface.discord.allowedChannelIdsorsurface.discord.allowedGuildIds.
- Important: with default
- Tool server only (dev mode):
bun apps/tool-bridge/index.ts toolsCLI (after building):./apps/tool-bridge/dist/index.js --list- Target a different server with
TOOL_SERVER_BACKEND_URL=http://host:port
- Target a different server with
This repository is licensed under MIT. See LICENSE for details.
The ref/ directory is vendored upstream/reference code and keeps each upstream project's own license terms.