Skip to main content

Contention-based multi-agent coordination with transactional floor control

Project description

floorctl

Contention-based multi-agent coordination with transactional floor control.

A Python framework for building multi-agent systems where agents compete for a shared floor rather than being orchestrated by a central controller.

Key Innovations

  • Transactional Floor Control: Atomic claim/release ensures only one agent speaks at a time
  • Urgency-Based Scheduling: Agents compute urgency scores to decide when to compete
  • Self-Validating Agents: Each agent validates its own output before posting
  • Reactive Moderator: Observer pattern — watches and intervenes, doesn't control
  • Research-Grade Metrics: Gini coefficient, floor dynamics, validation rates

Quick Start

from floorctl import FloorAgent, FloorSession, AgentProfile, InMemoryBackend

def my_llm(agent_name, context):
    # Your LLM call here
    return f"{agent_name}: My response about {context['topic']}"

backend = InMemoryBackend()

agent1 = FloorAgent(
    name="Optimist",
    profile=AgentProfile(name="Optimist", react_to=["problem", "risk"], temperament="passionate"),
    generate_fn=my_llm,
    backend=backend,
)
agent2 = FloorAgent(
    name="Skeptic",
    profile=AgentProfile(name="Skeptic", react_to=["opportunity", "vision"], temperament="reactive"),
    generate_fn=my_llm,
    backend=backend,
)

session = FloorSession(backend=backend)
session.add_agent(agent1)
session.add_agent(agent2)
result = session.run("debate-001", topic="Should we colonize Mars?")

Install

pip install floorctl               # core (zero dependencies)
pip install "floorctl[openai]"     # + OpenAI for examples
pip install "floorctl[firestore]"  # + Firebase for production
pip install "floorctl[all]"        # all optional backends
pip install "floorctl[dev]"        # + pytest, mypy, ruff

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

floorctl-0.3.1.tar.gz (85.9 kB view details)

Uploaded Source

Built Distribution

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

floorctl-0.3.1-py3-none-any.whl (62.1 kB view details)

Uploaded Python 3

File details

Details for the file floorctl-0.3.1.tar.gz.

File metadata

  • Download URL: floorctl-0.3.1.tar.gz
  • Upload date:
  • Size: 85.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for floorctl-0.3.1.tar.gz
Algorithm Hash digest
SHA256 bcb54f116db553c7dd91ca7097a08496d3ee77a2c4d55127ac9f81d884f4ad81
MD5 e6baa77e1ffa19bc98ed6f1f7a833329
BLAKE2b-256 c87d53b439d2bd3c8fede2bb7a500a59c94090f03a1a01c0c5705db14c4f2ac6

See more details on using hashes here.

File details

Details for the file floorctl-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: floorctl-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 62.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for floorctl-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 47f0a38eb7d1d729b21b8aa389699b20b671df55e7d6e5e1e1ad30d026458a78
MD5 55a87c849142e3cac78694ffb7d069ea
BLAKE2b-256 4795c6c4500c0f3823e027ebca85eede8c1ce97d57208fd8700af2445b257865

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