Skip to main content

The Open Source Foundation for AI Agents. Powered by the DisCo (Distributed Cognition) architecture.

Project description

Soorma Core

The Open Source Foundation for AI Agents.

Soorma is an agentic infrastructure platform based on the DisCo (Distributed Cognition) architecture. It provides a standardized Control Plane (Gateway, Registry, Event Bus, State Tracker, Memory) for building production-grade multi-agent systems.

๐Ÿšง Status: Pre-Alpha

We are currently building the core runtime. This package provides early access to the SDK and CLI.

Join the waitlist: soorma.ai

Quick Start

Installation

pip install soorma-core

Create a New Agent Project

# Create a Worker agent (default)
soorma init my-worker

# Create a Planner agent (goal decomposition)
soorma init my-planner --type planner

# Create a Tool service (stateless operations)
soorma init my-tool --type tool

cd my-worker
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Start Local Development

# Start the local Soorma stack (Registry + NATS + Event Service)
soorma dev

# In another terminal, run your agent
python -m my_worker.agent

Deploy to Soorma Cloud

soorma deploy  # Coming soon!

The DisCo "Trinity"

Soorma implements the DisCo (Distributed Cognition) architecture with three domain service types:

Type Class Purpose Example Use Cases
Planner Planner Strategic reasoning, goal decomposition Research planning, workflow orchestration
Worker Worker Domain-specific task execution Data processing, analysis, content generation
Tool Tool Atomic, stateless operations API calls, calculations, file parsing

Planner Agent

Planners are the "brain" - they receive high-level goals and decompose them into tasks:

from soorma import Planner, PlatformContext
from soorma.agents.planner import Goal, Plan, Task

planner = Planner(
    name="research-planner",
    description="Plans research workflows",
    capabilities=["research_planning"],
)

@planner.on_goal("research.goal")
async def plan_research(goal: Goal, context: PlatformContext) -> Plan:
    # Discover available workers
    workers = await context.registry.find_all("paper_search")
    
    # Decompose goal into tasks
    return Plan(
        goal=goal,
        tasks=[
            Task(name="search", assigned_to="paper_search", data=goal.data),
            Task(name="summarize", assigned_to="summarizer", depends_on=["search"]),
        ],
    )

planner.run()

Worker Agent

Workers are the "hands" - they execute domain-specific cognitive tasks:

from soorma import Worker, PlatformContext
from soorma.agents.worker import TaskContext

worker = Worker(
    name="research-worker",
    description="Searches and analyzes papers",
    capabilities=["paper_search", "citation_analysis"],
)

@worker.on_task("paper_search")
async def search_papers(task: TaskContext, context: PlatformContext):
    # Report progress
    await task.report_progress(0.5, "Searching...")
    
    # Access shared memory
    prefs = await context.memory.retrieve(f"user:{task.session_id}:prefs")
    
    # Your task logic
    results = await search_academic_papers(task.data["query"], prefs)
    
    # Store for downstream workers
    await context.memory.store(f"results:{task.task_id}", results)
    
    return {"papers": results, "count": len(results)}

worker.run()

Tool Service

Tools are the "utilities" - stateless, deterministic operations:

from soorma import Tool, PlatformContext
from soorma.agents.tool import ToolRequest

tool = Tool(
    name="calculator",
    description="Performs calculations",
    capabilities=["arithmetic", "unit_conversion"],
)

@tool.on_invoke("calculate")
async def calculate(request: ToolRequest, context: PlatformContext):
    expression = request.data["expression"]
    result = safe_eval(expression)
    return {"result": result, "expression": expression}

tool.run()

Platform Context

Every handler receives a PlatformContext that provides access to all platform services:

@worker.on_task("my_task")
async def handler(task: TaskContext, context: PlatformContext):
    # Service Discovery
    tool = await context.registry.find("calculator")
    
    # Shared Memory
    data = await context.memory.retrieve(f"cache:{task.data['key']}")
    await context.memory.store("result:123", {"value": 42})
    
    # Event Publishing
    await context.bus.publish("task.completed", {"result": "done"})
    
    # Progress Tracking (automatic for workers, manual available)
    await context.tracker.emit_progress(
        plan_id=task.plan_id,
        task_id=task.task_id,
        status="running",
        progress=0.75,
    )
Service Purpose Methods
context.registry Service Discovery find(), register(), query_schemas()
context.memory Distributed State retrieve(), store(), search()
context.bus Event Choreography publish(), subscribe(), request()
context.tracker Observability start_plan(), emit_progress(), complete_task()

CLI Commands

Command Description
soorma init <name> Scaffold a new agent project
soorma init <name> --type planner Create a Planner agent
soorma init <name> --type worker Create a Worker agent (default)
soorma init <name> --type tool Create a Tool service
soorma dev Start infra + run agent with hot reload
soorma dev --build Build service images from source first
soorma dev --infra-only Start infra without running agent
soorma dev --stop Stop the development stack
soorma dev --status Show stack status
soorma dev --logs View infrastructure logs
soorma deploy Deploy to Soorma Cloud (coming soon)
soorma version Show CLI version

How soorma dev Works

The CLI implements an "Infra in Docker, Code on Host" pattern for optimal DX:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Your Machine                             โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  Docker Containers (Infrastructure)                         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”              โ”‚
โ”‚  โ”‚ Registry โ”‚  โ”‚   NATS   โ”‚  โ”‚ Event Service โ”‚              โ”‚
โ”‚  โ”‚  :8081   โ”‚  โ”‚  :4222   โ”‚  โ”‚    :8082      โ”‚              โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜              โ”‚
โ”‚        โ–ฒ            โ–ฒ               โ–ฒ                       โ”‚
โ”‚        โ””โ”€โ”€โ”€โ”€โ”€โ”€ localhost โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                       โ”‚
โ”‚                     โ–ฒ                                       โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                    โ”‚
โ”‚  โ”‚    Native Python (Your Agent)       โ”‚                    โ”‚
โ”‚  โ”‚  โ€ข Hot reload on file change        โ”‚                    โ”‚
โ”‚  โ”‚  โ€ข Full debugger support            โ”‚                    โ”‚
โ”‚  โ”‚  โ€ข Auto-connects to Event Service   โ”‚                    โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Benefits:

  • โšก Fast iteration - No docker build cycle, instant reload
  • ๐Ÿ” Debuggable - Attach VS Code/PyCharm debugger
  • ๐ŸŽฏ Production parity - Same infrastructure as prod

Event-Driven Architecture

Unlike single-threaded agent loops, Soorma enables Autonomous Choreography via events:

Client                Planner              Worker              Tool
  โ”‚                     โ”‚                    โ”‚                   โ”‚
  โ”‚  goal.submitted     โ”‚                    โ”‚                   โ”‚
  โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€>โ”‚                    โ”‚                   โ”‚
  โ”‚                     โ”‚  action.request    โ”‚                   โ”‚
  โ”‚                     โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€>โ”‚                   โ”‚
  โ”‚                     โ”‚                    โ”‚  tool.request     โ”‚
  โ”‚                     โ”‚                    โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€>โ”‚
  โ”‚                     โ”‚                    โ”‚  tool.response    โ”‚
  โ”‚                     โ”‚                    โ”‚<โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚
  โ”‚                     โ”‚  action.result     โ”‚                   โ”‚
  โ”‚                     โ”‚<โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚                   โ”‚
  โ”‚  goal.completed     โ”‚                    โ”‚                   โ”‚
  โ”‚<โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚                    โ”‚                   โ”‚

Roadmap

  • v0.1.0: Core SDK & CLI (soorma init, soorma dev)
  • v0.1.1: Event Service & DisCo Trinity (Planner, Worker, Tool)
  • v0.2.0: Managed Cloud Deployment (soorma deploy)
  • v0.3.0: Memory Service & State Tracker
  • v1.0.0: Enterprise GA

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

soorma_core-0.1.1.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

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

soorma_core-0.1.1-py3-none-any.whl (45.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: soorma_core-0.1.1.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for soorma_core-0.1.1.tar.gz
Algorithm Hash digest
SHA256 61b4893008d10c6d3ad1c7bf5cfbd8faa21c4827c3ace3f9514f149fb5328d2a
MD5 a97f25242b559e2ec52352fa12756362
BLAKE2b-256 64e293d5b3e54ced3ff1b1b0f8327ac28885ec85055508e6637735309f29a758

See more details on using hashes here.

File details

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

File metadata

  • Download URL: soorma_core-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 45.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for soorma_core-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d31b5dff1ab36c0816c765d317dfc93cd99018e48a3c234d229cb29cd8e2cddb
MD5 e9bf183ef586243550b366438cbbf022
BLAKE2b-256 77f990a30404fa9710dee623ab813240020cf2c0c7d4707ebcc83a4b7c1b3537

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