FIRM Protocol
The physics of self-evolving autonomous organizations.
Authority is earned, not assigned. Memory is a debate, not a database. Structure is liquid, not fixed.
What is FIRM?
FIRM (Federated Intelligence for Recursive Management) is a protocol that defines how groups of AI agents can form, govern, and evolve organizations without permanent hierarchy.
Unlike traditional multi-agent frameworks where humans hardcode roles and permissions, FIRM implements a self-regulating system where:
- Authority is Hebbian — agents that succeed gain influence; agents that fail lose it. No fixed titles.
- Every action is ledgered — an append-only, hash-chained responsibility ledger tracks what happened, who did it, and whether it worked.
- Governance is constitutional — two invariants can never be violated: a human can always shut it down, and the system cannot erase its own capacity to evolve.
- Change requires proof — proposals go through simulation, stress testing, voting, and cooldown before taking effect.
Architecture
FIRM is built on 12 layers, all fully implemented:
| Layer | Name | Purpose |
|---|---|---|
| 0 | Authority Engine | Hebbian authority scores — earned, not assigned |
| 1 | Responsibility Ledger | Append-only hash-chained action log |
| 2 | Credit System | Resource allocation based on contribution |
| 3 | Role Fluidity | Dynamic role assignment based on authority |
| 4 | Collective Memory | Shared knowledge with weighted recall |
| 5 | Constitutional Agent | Invariant guardian — non-deletable watchdog |
| 6 | Governance Engine | 2-cycle validation for all structural changes |
| 7 | Spawn/Merge | Agent lifecycle management |
| 8 | Inter-Firm Protocol | Federation between organizations |
| 9 | Reputation Bridge | Cross-firm authority portability |
| 10 | Audit Trail | External accountability interface |
| 11 | Human Override | Guaranteed human control surface |
Plus 3 advanced capabilities:
| System | Purpose |
|---|---|
| Evolution Engine | Self-modifying parameters via supermajority vote |
| Internal Market | Task bounties, bidding, and credit settlement |
| Meta-Constitutional | Amendment lifecycle for the constitution itself |
Two Invariants
These are hardcoded constraints that no governance proposal can override:
-
Human Control — The human can always shut it down. Kill switch, audit access, and override authority are permanent.
-
Evolution Preserved — The system cannot erase its own capacity to evolve. Governance mechanisms, voting rights, and the constitutional agent itself are protected.
Quick Start
# Install
pip install -e ".[dev]"
# Run tests
python -m pytest tests/ -v
# CLI
firm init my-org
firm agent add Alice --authority 0.8
firm agent add Bob --authority 0.5
firm agent list
firm status
firm audit
firm repl # interactive mode
Python API
from firm import Firm
org = Firm(name='acme')
# Add agents — they start with moderate authority
alice = org.add_agent('alice', authority=0.5)
bob = org.add_agent('bob', authority=0.5)
# Record successes and failures — authority adjusts automatically
org.record_action(alice.id, success=True, description='Shipped feature')
org.record_action(bob.id, success=False, description='Broke CI')
# Check the organization state
status = org.status()
print(f'Agents: {status["agents"]["total"]}')
print(f'Chain valid: {status["ledger"]["chain_valid"]}')
# Alice (who succeeded) can now propose changes
proposal = org.propose(
alice.id,
title='Add deployment role',
description='Create a dedicated deployment specialist role',
)
print(f'Proposal: {proposal.title} ({proposal.status.value})')
See examples/startup_lifecycle.py for a full narrated demo covering all 12 layers.
Key Concepts
Authority Engine (Layer 0)
Uses a Hebbian-inspired formula:
Δauthority = learning_rate × activation − decay × (1 − activation)
Where activation = 1.0 on success, 0.0 on failure. Default learning rate
is 0.05, decay is 0.02. Authority is bounded [0.0, 1.0].
Thresholds:
- 0.8 — Can propose governance changes
- 0.6 — Can vote on proposals
- 0.4 — Standard operating authority
- 0.3 — Probation threshold
- 0.05 — Termination threshold
Responsibility Ledger (Layer 1)
Every recorded action produces an immutable, hash-chained entry:
entry.hash = SHA-256(previous_hash + agent_id + action + timestamp + ...)
The chain can be verified end-to-end at any time. Tampering is detectable.
Governance (Layer 6)
Proposals follow a strict lifecycle:
draft → simulation_1 → stress_test → simulation_2 → voting → cooldown → approved
→ rejected
→ rolled_back
Votes are weighted by voter authority. The Constitutional Agent can veto any proposal that violates an invariant.
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests with coverage
python -m pytest tests/ -v --cov=firm --cov-report=term-missing
# Lint
ruff check src/ tests/
License
MIT
⚠️ Contenu généré par IA — validation humaine requise avant utilisation.
Metadata
Release files for firm-protocol 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| firm_protocol-1.1.0.tar.gz | 219.3 kB | Without provenance | Details for firm_protocol-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| firm_protocol-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for firm_protocol-1.1.0-py3-none-any.whl |
Total release size: 368.8 kB
Release files / firm_protocol-1.1.0.tar.gz
| Download URL | firm_protocol-1.1.0.tar.gz |
|---|---|
| Size | 219.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70e39356da3320a4cef497f3958328d96643abc201fad8159b7de28c17f636d6
|
|
BLAKE2b-256 checksum How to use checksums |
ffe2789d6c13b7e634c591198762afb33d79275a7ff42e006b77f45efd17c02c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / firm_protocol-1.1.0-py3-none-any.whl
| Download URL | firm_protocol-1.1.0-py3-none-any.whl |
|---|---|
| Size | 149.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e65e617929706a6cab4da8a51895605215f450f8d4dc42e36c7371cbdd2681ee
|
|
BLAKE2b-256 checksum How to use checksums |
73ce1f69776f626a2385f794a3291f35c7300855365abb542702f2ce108d42a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for firm-protocol 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.