Skip to main content

Stigmergy pressure-field scheduling adapter for AutoGen

Project description

stigmergy-autogen

Replace AutoGen's LLM-based speaker selection with deterministic pressure signals. Stop paying for an LLM call every time you need to pick who speaks next. Tasks, priorities, and dependencies drive selection instead.

One-line integration with AutoGen v0.7+ SelectorGroupChat.

Install

pip install stigmergy-autogen

Usage

from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import SelectorGroupChat
from stigmergy_autogen import StigmergySpeakerSelector

# Create AutoGen agents
researcher = AssistantAgent("researcher", model_client=model_client)
analyst = AssistantAgent("analyst", model_client=model_client)
writer = AssistantAgent("writer", model_client=model_client)

# Create stigmergy selector with tasks and dependencies
selector = StigmergySpeakerSelector(wake_threshold=0.4)
selector.register_task("research", agent_name="researcher", priority=0.8)
selector.register_task("analyze", agent_name="analyst", priority=0.6, deps=["research"])
selector.register_task("write", agent_name="writer", priority=0.5, deps=["analyze"])

# Use as SelectorGroupChat selector_func
team = SelectorGroupChat(
    participants=[researcher, analyst, writer],
    model_client=model_client,
    selector_func=selector.select_speaker,
)

result = await team.run(task="Begin research on AI trends")

How It Works

The StigmergySpeakerSelector replaces AutoGen's default speaker selection:

  1. Each registered task deposits a pressure signal targeted at its agent
  2. On each turn, signals decay and the selector picks the agent with highest pressure
  3. Task dependencies are enforced — an agent won't be selected until its deps complete
  4. Completion signals propagate pressure to downstream agents

License

MIT

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

stigmergy_autogen-0.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

stigmergy_autogen-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file stigmergy_autogen-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for stigmergy_autogen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 302fbf44de9f72ab0294986d0fb86340417c6bab9f6c146e1ed45ca802af5e6c
MD5 3fc6e6591283f55d63b5f5e991e20ac3
BLAKE2b-256 c399615639cf711ed669f9736e9a775e3f4eb0893963d85a43c8a590b31cb252

See more details on using hashes here.

File details

Details for the file stigmergy_autogen-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for stigmergy_autogen-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38cd460ea59c5d62ff892d5a803622fce8b964f5cf64ddf98dd87a9da9e106b8
MD5 39a81ad743034e3ebe700e27620771b5
BLAKE2b-256 2936689aee63ab2a5e0c74f446706b32ae34b70d56c4149556ef0d862407e48e

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