Skip to main content

FIRM Protocol — Self-Evolving Autonomous Organization Runtime

Project description

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:

  1. Human Control — The human can always shut it down. Kill switch, audit access, and override authority are permanent.

  2. 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

firm_protocol-1.1.0.tar.gz (219.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

firm_protocol-1.1.0-py3-none-any.whl (149.5 kB view details)

Uploaded Python 3

File details

Details for the file firm_protocol-1.1.0.tar.gz.

File metadata

  • Download URL: firm_protocol-1.1.0.tar.gz
  • Upload date:
  • Size: 219.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for firm_protocol-1.1.0.tar.gz
Algorithm Hash digest
SHA256 70e39356da3320a4cef497f3958328d96643abc201fad8159b7de28c17f636d6
MD5 f3e113ea747f355ae233d7ce7f86eb9d
BLAKE2b-256 ffe2789d6c13b7e634c591198762afb33d79275a7ff42e006b77f45efd17c02c

See more details on using hashes here.

File details

Details for the file firm_protocol-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: firm_protocol-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 149.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for firm_protocol-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e65e617929706a6cab4da8a51895605215f450f8d4dc42e36c7371cbdd2681ee
MD5 aacbe71c9525d4e2cdb7820822d1f036
BLAKE2b-256 73ce1f69776f626a2385f794a3291f35c7300855365abb542702f2ce108d42a7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page