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.2.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.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stigmergy_autogen-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 aecc43949f199bf4bc0b5a6987f468d99784c7b50856455d493a70db5c8f4fc6
MD5 f49196cbdb025561f1ca3051f0d6b57c
BLAKE2b-256 812f4f2f7bb54e09f2f2fd0712f0688378b6d73186c115254cddba171373014e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for stigmergy_autogen-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5726e7dfbdd308851656ef2df531d8a227b78586770256c7ad33f3da110b1b46
MD5 6ab12d14d83c127bd9087d97df325ce2
BLAKE2b-256 30b9cfb6fb0cb02855ea3199c02a03548526ba2aa869c58c4f0f7cf368dbdb07

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