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.4.0.tar.gz
(91.7 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.4.0-py3-none-any.whl
(63.1 kB
view details)
File details
Details for the file floorctl-0.4.0.tar.gz.
File metadata
- Download URL: floorctl-0.4.0.tar.gz
- Upload date:
- Size: 91.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6440b804bb240d2aee16f913030ef05801cb39d88c00978da1838c69e8395c93
|
|
| MD5 |
ace08256990d373426864a3b1c5f7f60
|
|
| BLAKE2b-256 |
e165d83360ec051364d0a7850df05f85964059ad0a17c00b48a6600417adcd55
|
File details
Details for the file floorctl-0.4.0-py3-none-any.whl.
File metadata
- Download URL: floorctl-0.4.0-py3-none-any.whl
- Upload date:
- Size: 63.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 |
7b676759800a8bc24492e2424b183b37026739016f84d029f85c2e0475ff1a2a
|
|
| MD5 |
b4ad89f8ea96126f8c496d530c32a880
|
|
| BLAKE2b-256 |
16321d5233445910d747f8eed14df1790df14c1f38e2ea5f50ce116a7ec83973
|