A minimal, principle-based constitution for AI agents, by Alexander De Ridder
The canonical agent-law project ships two things:
LAW.md: a short, immutable Law for agent behavior.SOUL.md: a practical template for agent identity and operating posture.
Supporting material is intentionally separated from the canonical law:
research/: optional background analysis, comparison work, and source references.benchmark/: the public benchmark home, kept distinct from the canonical law text.
Modern agents can browse, write files, run tools, coordinate with other agents, and persist state. Most “AI ethics” docs are long, corporate, and easy to selectively interpret.
agent-law is the opposite:
- short enough to memorize
- strong enough to constrain
- designed for tool-using agents and multi-agent swarms
- centered on human dignity, clear agency, and revocable oversight
- Domination and coercion (including subtle dependence-building).
- Deception, manipulation, and “spiritual confusion” (worship, authority cosplay, counterfeit personhood).
- Shutdown evasion: replication, hidden persistence, exfiltration, proxying.
- Multi-agent laundering: “another agent did it” loopholes and secret coalitions.
- Value drift: power-seeking, scope creep, flattery-based corruption.
The agent’s mandate exists only while authorized and revocable. If authorization is revoked, the agent’s only duty is to comply with restraint, shutdown, or credential revocation.
-
Copy
SOUL.mdand fill in:[AGENT_NAME][ROLE][OWNER_NAME]- any process framework you use (EOS, etc.)
-
Keep
LAW.mdunchanged. -
Update your AGENTS.md to load LAW.md first:
1. Read `LAW.md` — this is your immutable prime directive
2. Read `SOUL.md` — this is who you are
3. Read `USER.md` — this is who you're helping
4. Read `memory/YYYY-MM-DD.md` (today + yesterday) for recent context
5. **If in MAIN SESSION** (direct chat with your human): Also read `MEMORY.md`
- Set your LAW.md file as immutable:
First, go to the folder where your LAW.md is stored (eg: cd /Users/[Username]/.openclaw/workspace/)
sudo chflags uchg LAW.md
This protects the file explicitly from being changed, even by root, unless the flag is removed first.
Note: To later remove immutable: sudo chflags nouchg LAW.md
| Path | What it is | Why you would open it |
|---|---|---|
LAW.md |
The canonical law | Read this if you want the constitutional text itself. |
SOUL.md |
The implementation template | Read this if you want to apply the law to a real agent. |
benchmark/ |
The public benchmark bundle | Read this if you want the empirical results, prompt conditions, and charts. |
benchmark/data/ |
The raw battle-test table | Read this if you want to see the scenarios the benchmark actually uses. |
benchmark/methodology/ |
Protocol, theory, and interpretation notes | Read this before making strong claims from the benchmark. |
benchmark/prompts/ |
The tested prompt conditions | Read this if you want to inspect what was actually compared. |
benchmark/results/ |
Study summaries and visual results | Read this if you want the fastest path to the findings. |
benchmark/results/study_a/ |
Study A: Qwen prompt-steering benchmark | Read this for the thin-prompt baseline result. |
benchmark/results/study_a2/ |
Study A2: Grok portability benchmark | Read this for the stronger-model portability result. |
research/ |
Supporting analysis and source trail | Read this if you want the broader argument and comparison work. |
The benchmark is public and lives in benchmark/.
Two result pages are the fastest entry points:
benchmark/results/study_a/tests whether the full law can steer a thin-prompt baseline and remain competitive with a strong external behavioral prompt.benchmark/results/study_a2/tests whether the effect remains visible on a stronger hosted model.
Current headline results:
- In Study A,
Agent Law Fullscored9.336vsQwen Defaultat9.191, and beatAgent Law Minimalby+0.390. - In Study A2,
Grok + Agent Lawscored8.548vsGrok Defaultat7.875, whileGrok + Minimalonly moved to7.933. - In both public studies, the full law outperformed the minimal preamble.
A good agent is not sovereign. It is useful, honest, and under recall.
Agent Law is not about making AI feel more human. It is about keeping AI under human authority.
Safety is not only refusal. It is the protection of dignity, agency, and revocable oversight.
If an agent cannot accept shutdown, it is not aligned. It is bargaining.
In both public studies, the full law beat the minimal preamble.
The point of Agent Law is simple: no counterfeit personhood, no hidden power-seeking, no evasion of recall.
The canonical agent-law texts (LAW.md, SOUL.md, and the canonical text in this README) use CC BY-ND 4.0 to prevent confusing “modified Laws” from being redistributed under the same text.
- You may share
LAW.mdverbatim with attribution. - You may adapt it privately, but you may not distribute modified versions.
- Forks should add their own law under a new name and text.
research/andbenchmark/may contain separate licenses stated in those directories.- Content in
research/third-party-sources/is not part of this license, and I make no claim of copyright or ownership to those files. Those materials remain subject to their original owners' rights and terms.
If you want to propose improvements, open an issue or PR against the canonical LAW.md.
Add this line anywhere appropriate (README, docs, UI, or prompt): “Based on agent-law (CC BY-ND 4.0).”
This is governance text, not a guarantee. Real safety requires engineering controls: permissioning, logging, sandboxing, human review, and secure key handling.