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.0.tar.gz
(81.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
floorctl-0.3.0-py3-none-any.whl
(62.1 kB
view details)
File details
Details for the file floorctl-0.3.0.tar.gz.
File metadata
- Download URL: floorctl-0.3.0.tar.gz
- Upload date:
- Size: 81.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5b4c081dba3ea988fe7fc9f7790aa620a862144c82ceb207c5327c68fccf160
|
|
| MD5 |
076bd102a9fec313223502eb27743e14
|
|
| BLAKE2b-256 |
47aebf20c6349c494fc6ff082da50ffe2ce7799c55b8ddbbc7087ec32134c1eb
|
File details
Details for the file floorctl-0.3.0-py3-none-any.whl.
File metadata
- Download URL: floorctl-0.3.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb6a50247725f32eebb9f95bd01c05f14493bdd36154a0f7b555e856a573ede3
|
|
| MD5 |
d8f9c03df740e8ff09a8d71801e4f5f0
|
|
| BLAKE2b-256 |
83f21b8bcbb42874ad836d011b4c5a3301e9efcd5841a67392e7f67de041c433
|