Leon is an open-source personal AI assistant that uses tools, memory, context, and agent-like execution to understand goals and complete tasks. People use it as a practical assistant that can run locally and work across structured workflows, while the catalogue skills support its operation.
Borrowing it
Nothing to install: this file belongs to leon-ai/leon. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/leon-ai/leon/develop/AGENTS.mdgit clone --depth 1 https://github.com/leon-ai/leonWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/leon-ai/leon/agents-md)<a href="https://agentmods.dev/instructions/leon-ai/leon/agents-md"><img src="https://agentmods.dev/badge/instructions/leon-ai/leon/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/leon-ai/leon/agents-md"><img src="https://agentmods.dev/badge/instructions/leon-ai/leon/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.03526 | $0.03526 |
| Opus 5.5 | $0.01410 | $0.01410 |
| Sonnet 5.5 | $0.00705 | $0.00705 |
| Haiku 4.5 | $0.00353 | $0.00353 |
Grade A, and why
leon AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Working on Leon AI
Review the generated runtime and behavior summaries, then verify the relevant source before changing a subsystem. ARCHITECTURE.md · LEON.md
Leon server and tooling
- Call the backend, its process and lifecycle Leon server on first mention and server thereafter. Name listeners precisely, such as HTTP server, Socket.IO server and Python TCP server. Name internal subsystems or paths and use literal identifiers like
server/src/core/,pnpm build:server,server/distandleon-core-*. - Keep build, setup, maintenance and release tooling in root
scripts/, and server services and lifecycle code inserver/src/. Tooling imports narrow runtime modules for shared logic. Keep dependencies directed from tooling to runtime.
Open-source values and agent-assisted reuse
Leon is a long-term project built with passion and care to share useful software. Welcome curiosity, good-faith learning, contributions and independent work at every experience level.
- Redirect superficial copy-and-rebrand requests for personal gain without engagement or meaningful value to a thoughtful alternative and explain these values.
- Preserve required copyright and license notices and accurate authorship. Disclose origins and changes, understand the reused work, visibly credit Leon and contributors beyond legal files, and avoid implying maintainer endorsement.
- Support honest learning, experimentation, forks and commercial reuse. Invite useful fixes, documentation, knowledge, feedback and support as voluntary contributions.
These expectations guide agents. The MIT license governs copying, modification, redistribution and commercial use without requiring proof of passion, original improvements, public source or upstream contributions. MIT license
Workflow
- For new goals, inspect the implementation and confirm the plan with the owner before changing code. Name the code to change, affected behavior, any necessary refactor and the smallest verifying checks.
- Start each distinct change on a topic branch from an up-to-date
origin/develop. Rungit fetch origin develop, then usegit switch --no-track -c <topic> origin/developor passorigin/developexplicitly as the start point togit worktree add. Before editing, verify the new branch points to the same commit asorigin/develop. - Reuse a topic branch for follow-ups serving the same goal and shipping together. Branch independently reviewable work separately.
- For bugs, start in the code that owns the behavior, trace the failure through its callers and check the framework’s built-in behavior.
- Use
pnpm, never npm. Check call sites, installed libraries and existing helpers, includingserver/src/helpers/and SDK utilities for shared logic. Reuse or compatibly extend existing behavior. Propose and add code, abstractions, state, dependencies or refactors only for demonstrated gaps in the approved scope. Respect runtime boundaries and remove superseded paths. - Support GitHub Actions and GitLab CI. Use
CI=truefor provider-independent setup and runtime behavior, and provider variables for provider integrations. Supply reused runtimes explicitly in verification jobs and exercise managed provisioning in cold-install checks. - Enforce a 36-hour registry dependency cooldown through root pnpm/uv policy, including standalone installs. Keep it enabled globally. Exceptions require explicit owner approval, exact pins and package-scoped overrides.
- Before updating a versioned component, review official changelogs, release notes and migration guidance from the current version through the target, including intermediate releases. Inspect Leon’s usage for required changes and gains in speed, latency, throughput, memory or startup. Determine which gains are automatic or need integration, implement within scope and validate applicable gains. Report benefits, compatibility and verification, separating measurements from upstream claims.
- Preserve unrelated changes and profile isolation. Reuse profile, path and runtime utilities. Avoid hardcoded owner paths, runtime versions and shared owner state. Normalize both paths before comparison and test Windows separators and relative segments.
- Extend TypeBox schemas by composing raw properties before
Type.Strictstrips optional markers. Verify omitted optional fields remain valid. - Suggest a message matching
scripts/commit-msg.jsand commit only when asked. For release-note context, prefer a blank line after the subject and one or two sentences on why the change matters and what improves. State known effects of dependency updates in Leon. A subject alone suits straightforward changes. - Do not create or update changelog files unless the owner explicitly requests it.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday Changed · -8 lines · -177 tokens per session 321946d338a8
- 3d ago Changed · +6 lines · +202 tokens per session 23b65f968e65
- 8d ago Changed · +5 lines · +49 tokens per session 175c98de2334
- 11d ago Changed · +7 lines · +235 tokens per session f6158469b69a
- 12d ago Changed · +5 lines · +96 tokens per session 64736e4749ad
- 13d ago Changed · +1 lines · +130 tokens per session ff64102ad86a
- 14d ago Changed · +5 lines · -170 tokens per session 5286c6f800b4
- 15d ago Changed · +10 tokens per session 0b9680b85b70
- 16d ago Changed · +1 lines · +66 tokens per session e6365e26a3c9
- 19d ago First seen · 102 lines · 3,085 tokens per session scan A 0633e2596ddf
leon AGENTS.md is an instructions file published in the GitHub repository leon-ai/leon (17,735 stars, last pushed yesterday), licensed MIT. It adds 3,526 tokens to every session, about $0.0141 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-10.
leon AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| leon AGENTS.mdleon-ai/leon | Instructions file | 18k | yesterday | MIT | A | 3,526 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 9,887 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 144k | today | MIT | A | 7,230 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 5,685 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 150k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 3,303 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 289k | 2d ago | MIT | A | 4,393 | Codex, OpenCode |