Skip to main content

Generic AERC multi-agent collaboration framework — zero domain knowledge baked in

Project description

Σ (Sigma) — Generic AERC Multi-Agent Collaboration Framework

Analyze → Execute → Review → Converge loop with cross-review, convergence detection, and complexity-adaptive routing.

Zero domain knowledge baked in. Inject everything via SigmaConfig + ToolSpec. Works with any OpenAI-compatible LLM.

Installation

pip install -e .
# or from PyPI (future):
# pip install sigma-framework

Requires Python ≥ 3.12.

Quick Start

from sigma import (
    SigmaOrchestrator, SigmaConfig,
    AgentSpec, ToolSpec, BaseTool,
    UniversalBackend,
)

# 1. Define your domain
config = SigmaConfig(
    project_name="My Project",
    creed="We build things that work.",
    domain_keywords={
        "engineering": ["design", "calculate", "optimize"],
        "review": ["check", "verify", "audit"],
    },
    role_map={"engineer": "Lead Engineer", "reviewer": "Reviewer"},
    domain_agent_map={"engineering": "engineer", "review": "reviewer"},
)

# 2. Define your tools
class Calculator(BaseTool):
    name: str = "calculator"
    description: str = "Performs calculations"

    def _run(self, **kwargs):
        return {"success": True, "performance": {"result": 42}}

tools = {"calculator": ToolSpec(name="calculator", instance=Calculator())}

# 3. Define your agents
agents = {
    "engineer": AgentSpec(
        name="Engineer", role="Engineer",
        goal="Design solutions", backstory="Senior engineer",
        skill_files=[], tool_names=["calculator"],
        tool_instances=[Calculator()],
    ),
}

# 4. Run
backend = UniversalBackend(api_key="sk-...")
orchestrator = SigmaOrchestrator(
    config=config, agents=agents, tools=tools,
    llm_backend=backend, max_rounds=3,
)
result = orchestrator.run("Design a simple widget")

Architecture

Founder (you)
  ▼
┌─────────── AERC Loop ───────────┐
│  A (Analyze) — Agents analyze independently
│  E (Execute) — Parallel tool execution
│  R (Review) — Cross-review + devil's advocate
│  C (Converge) — Convergence judge + consensus estimation
└──────────────────────────────────┘
  ▼
  Output (REPORT.md + result.json)

Key Mechanisms

  • Cross-review: Agents analyze independently (cannot see each other), then review each other's work
  • Convergence judge: Numeric params Δ < 5% + no new qualitative conflicts → converged. Oscillation detection halts early.
  • Complexity-adaptive: Pure rule-engine scores tasks 0-10, selects LITE/STANDARD/RIGOROUS tier
  • Consensus estimation: When tools are unreliable, multiple agents estimate independently → converge to consensus range

Three Complexity Tiers

Tier Score Agents Rounds LLM Calls
LITE ≤ 2.5 2-4 1 ~8
STANDARD ≤ 6.0 4-6 2-3 ~30
RIGOROUS > 6.0 8 ≤ 4 ~80

Configuration

All domain knowledge is injected via SigmaConfig:

Field Purpose
project_name Display name in reports
creed Injected into every agent's system prompt
domain_keywords Used by complexity assessor to detect domains
action_weights Weights for action verbs in complexity scoring
role_map Maps agent file stems to display names
domain_agent_map Maps domain keys to agents for tier selection
default_tool_params Fallback params for tools
reasonable_ranges Expected output ranges for tool validation

Running Tests

pytest tests/ -v
pytest --cov=sigma --cov-report=term

985 tests, 80% coverage on all pure-logic modules.

Concepts

  • No domain knowledge in the framework: Rocket propellants, medical terms, financial models — all injected via SigmaConfig
  • Tool duck-typing: Any class with _run() is a tool — no specific base class required
  • Universal LLM backend: Works with any OpenAI-compatible API (DeepSeek, GLM, Qwen, etc.)
  • Immutable state: Every state update returns a new copy

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

sigma_aerc-0.1.1.tar.gz (208.4 kB view details)

Uploaded Source

Built Distribution

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

sigma_aerc-0.1.1-py3-none-any.whl (152.0 kB view details)

Uploaded Python 3

File details

Details for the file sigma_aerc-0.1.1.tar.gz.

File metadata

  • Download URL: sigma_aerc-0.1.1.tar.gz
  • Upload date:
  • Size: 208.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for sigma_aerc-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b103b3f26557d73fb05845b7e1879c77a4f59cab795d6b51a25bea47ce7d8bae
MD5 05f2a97a292c143108f063bea3333092
BLAKE2b-256 d13751f918ddd9dc4aa4126261dcad857dbbc4fce079a9a7a381752aa25ba5c8

See more details on using hashes here.

File details

Details for the file sigma_aerc-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sigma_aerc-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 152.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for sigma_aerc-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 27b3abc000287062104a8bacf5be10d0816774ed6d20487bbbec11c175befa16
MD5 226f31286524b4381af01297a10a3b07
BLAKE2b-256 6f8879c2277ca470b8d4289e76bafdfb5f3e08ad72d9b47ad4240e71ddae1081

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