Skip to content

Lemon Documentation

Canonical documentation hub for the Lemon AI assistant platform. For quickstart and project overview, see the root README.md. For agent development context, see AGENTS.md.


Start with what you want to do

Lemon brings your models, tools, and conversations into a runtime you control. You can start with a terminal chat, add a browser or messaging channel, and grow into profiles, reusable skills, and automation as you need them.

Your next stepStart here
Get your first answerQuickstart — install, connect a provider, and send a message
Choose an installInstall Lemon — prebuilt releases, source development, and updates
See a useful workflowTry Lemon — explore a repository, resume a session, and open the browser
Decide whether Lemon fitsCompare Lemon — strengths, tradeoffs, and current boundaries
Bring existing contextMigrate from Hermes — preview your import first
Fix a setup problemGet help — diagnostics and a useful bug report

Build your daily workflow

The reference directory below is for deeper exploration. You do not need to read it before your first chat.

User Guides

DocWhat it covers
index.mdPublic docs-site homepage: positioning, entry points, current launch stage
getting-started/quickstart.mdTask-first release install, provider-backed chat proof, session continuity, next features, and recovery
install.mdVerified release install, source install, first-run setup, platforms, updates, and uninstall
compare.mdProduct comparison against adjacent assistant, CLI, harness, and self-hosted runtime categories
demo.mdDeterministic local demo paths for runtime health, session Web UI, TUI, support bundles, and docs quality
support.mdPublic support boundaries, issue data requirements, support-bundle commands, and security-reporting path
user-guide/setup.mdFull setup walkthrough: install, configure, run, Telegram setup
user-guide/backups.mdVersioned ~/.lemon data contract, atomic backup verification, and guarded restore
user-guide/web.mdLaunch the local browser, complete readiness, stop runs, configure access, and recover errors
user-guide/profiles.mdCreate isolated specialist profiles, use canonical chats/roster, clone/export safely, and delete recoverably
user-guide/learn-from-sources.mdReview bounded files, folders, documents, diffs, URLs, and sessions before exact-digest learning into memory and skill drafts
user-guide/cli.mdRuntime command families, durable session lifecycle, stable exit codes, JSON, and shell completion
user-guide/migrate-from-hermes.mdPreview-first migration path for Hermes memories, skills, config, secrets, and session recall
user-guide/skills.mdSkills: listing, installing, inspecting, portable profile automation bundles, and synthesized drafts
user-guide/memory.mdMemory documents, session search, retention management
user-guide/adaptive.mdAdaptive routing, routing feedback, skill synthesis pipeline
user-guide/rollout.mdFeature promotion gates, rollback procedure, promotion checklist

Architecture

DocWhat it covers
architecture/overview.mdSystem design, app map, data flow, key abstractions
architecture_boundaries.mdDependency policy between umbrella apps, enforcement via mix lemon.quality
beam_agents.mdBEAM/OTP architecture: process-per-agent, supervision, message passing
model-selection-decoupling.mdModel selection design: provider abstraction, routing, fallback

Operations

DocWhat it covers
long-running-agent-harnesses.mdLong-running harness patterns, eval loops, and runtime validation workflows
testing.mdCanonical local test lanes and CI parity guidance
config.mdTOML configuration reference (providers, runtime, gateway, profiles, tools)
user-guide/backups.mdLocal user-state backup, verification, restore, and rollback safety model
user-guide/updates.mdNon-mutating update plans, exact-confirm apply, receipts, and receipt-bound rollback
extensions.mdExtension/plugin API, tool hooks, conflict resolution
release/release_checklist_and_support_policy.md1.0 release-candidate checklist, rollback checklist, and support boundaries
security/safety.mdPlain-language Lemon safety model, recommended defaults, and support-bundle guidance
security/agent-safety-contract.mdAgent safety layers: tool policies, approvals, memory screening, skill audits, telemetry

Runtime Core

DocWhat it covers
assistant_bootstrap_contract.mdHow sessions bootstrap: system prompt assembly, skill discovery/loading, context setup
context.mdContext management, compaction, branch summarization, token budgets
subagent-parent-questions.mdDesign for the ask_parent clarification path from child subagents back to their parent session
runtime-hot-reload.mdHot code reload system for live-patching without restarts
telemetry.mdTelemetry events, observability, correlation IDs, monitoring

Product and Capability Docs

Architecture Diagrams

All diagrams are in docs/diagrams/ as both Excalidraw source and exported SVG:

DiagramWhat it shows
architecture.excalidraw / .svgComplete system architecture: clients, control plane, routing, infrastructure, core
data-flow.excalidraw / .svgFour data paths: direct, control plane, channel, automation
event-bus.excalidraw / .svgEvent bus topology and pub/sub messaging
orchestration.excalidraw / .svgRun orchestration: scheduling, lane queues, engine dispatch
supervision-tree.excalidraw / .svgOTP supervision tree (see the current architecture guide for the app inventory)
tool-execution.excalidraw / .svgTool execution pipeline: registry, policy, approval, execution

LocationContents
apps/*/README.mdPer-app documentation (architecture, API, usage, dependencies)
apps/*/AGENTS.mdPer-app AI agent context (key files, patterns, testing, gotchas)
AGENTS.md (root)Project-wide agent guide (navigation, team composition, conventions)
README.md (root)5-minute orientation: what it is, quickstart, feature summary, doc links
config/Elixir application configuration (config.exs, runtime.exs, etc.)
examples/config.example.tomlAnnotated example TOML configuration

How to Use This Directory

  • Start here if you need to understand how Lemon works at a system level.
  • Per-app docs live in each app's own README.md and AGENTS.md (see apps/*/).
  • Every tracked Markdown file in docs/ must be registered in docs/catalog.exs. Run mix lemon.quality to enforce coverage, metadata, freshness, and links.

Catalog Metadata

docs/catalog.exs is a data-only map with shared defaults and an entries list. Each normalized entry has:

  • path, owner, last_reviewed, and max_age_days for ownership and freshness
  • kind: guide, plan, proof, reference, or review
  • status: current, historical, or superseded
  • public: whether a current document is eligible for future public navigation

The defaults are intentionally conservative: entries are current references but are not public unless opted in. Historical and superseded entries cannot be public. Override a default only on the entry that differs.

The catalog's last_reviewed value is the sole freshness authority. Do not add or update a second Last reviewed footer in a document; dates in document prose should identify the snapshot or event they describe. Coverage uses git ls-files, so local drafts and other untracked Markdown do not create quality failures.


Maintenance Rules

  1. Register every tracked Markdown doc in docs/catalog.exs; rely on catalog defaults and override only differing metadata.
  2. Run mix lemon.quality after any docs edit or app dependency change.
  3. Keep AGENTS.md short and operational — place durable implementation details in docs/ files.
  4. Update diagrams when architecture changes — edit the .excalidraw source, export to .svg.
  5. Review cycle: docs are checked for staleness based on the catalog's canonical last_reviewed and max_age_days values.
  6. Regenerate machine-readable docs with scripts/generate_docs_llms.py; scripts/generate_docs_llms.py --check verifies docs/public/llms.txt and llms-full.txt are current.

Released under the MIT License.