Skip to main content

TechTide Swarm 357 — layered orchestration, durable memory bridge, and observability hooks.

Project description

techtide-swarm

PyPI Python License CI

Python package for Swarm 357: layered orchestration of 357 Claude agent roles across six business layers, portable Memvid memory, cost controls, and a FastAPI HTTP surface.

Install

pip install techtide-swarm
swarm demo

Editable (from repo root):

pip install -e "packages/techtide-swarm[dev]"

The wheel bundles config/swarm-compact.yaml and templates/soul/ so swarm boot works after a plain pip install.

Quickstart

export ANTHROPIC_API_KEY=sk-ant-...   # or OPENROUTER_API_KEY + ANTHROPIC_BASE_URL
swarm init
swarm boot                            # loads 357-agent compact roster
swarm run "Draft a Tier-1 401 triage checklist" --budget 1.0
swarm serve --port 8000

OpenRouter (recommended for evals/cost control):

export OPENROUTER_API_KEY=...
export ANTHROPIC_BASE_URL=https://openrouter.ai/api
export SWARM_MODEL_SONNET=anthropic/claude-sonnet-4

Public API

from techtide_swarm import (
    Agent, AgentConfig, Swarm, UltraPlan, UltraPlanConfig,
    MemoryManager, CostController, BashSecurityGate, __version__,
)
from techtide_swarm.core.types import LayerType

agent = Agent(AgentConfig(
    name="research-market-001",
    layer=LayerType.RESEARCH,
    role="market_researcher",
    soul="templates/soul/research/market-analyst.md",
    tools=["Read", "Write"],
    model="sonnet",
    budget_limit_usd=1.0,
))

Also exported: AgentResult, SwarmExecutionResult, SwarmStore, MemvidBridge, ToolRegistry, TOOLSET_MAP, registry.

CLI

Command Purpose
swarm init Create .swarm/, .env, memory index
swarm demo Stub or live 3-agent demo
swarm boot Load roster + print layer budgets
swarm run <task> Full swarm or --layer execution
swarm agent List / inspect / run one agent
swarm status / swarm cost Telemetry dashboards
swarm dream Memory consolidation cycle
swarm plan <task> UltraPlan (Opus by default)
swarm migrate Flat topics → Memvid .mv2
swarm eval Budgeted eval harness
swarm serve FastAPI via uvicorn
swarm mcp list|connect MCP server tools

HTTP API

uvicorn techtide_swarm.server:app (or swarm serve):

Method Path Notes
GET /api/health version, agent count, API key presence
GET /api/swarm/status layer stats + cost
GET /api/swarm/agents roster summary
GET /api/swarm/agents/{name} agent detail
GET /api/swarm/cost spend report
GET /api/swarm/runs recent runs
POST /api/swarm/run swarm/layer run (X-SWARM-API-KEY when set)
POST /api/agent/run single agent
POST /api/swarm/dream dream cycle

Environment

Variable Purpose
ANTHROPIC_API_KEY / OPENROUTER_API_KEY LLM credentials
ANTHROPIC_BASE_URL e.g. https://openrouter.ai/api
SWARM_MODEL_{OPUS,SONNET,HAIKU} Model ID overrides
SWARM_API_KEY Protect POST routes
SWARM_MAX_RUN_BUDGET_USD Cap request budget_usd
SWARM_RATE_LIMIT_PER_MINUTE Per-IP rate limit (0 disables)
SWARM_CONFIG_PATH Roster YAML override
MEMVID_SWARM_BRIDGE Path to Rust bridge binary
SWARM_WRITE_SAFE_ROOT Sandbox for Write tool

Docs

License

Apache-2.0

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

techtide_swarm-0.2.0.tar.gz (113.1 kB view details)

Uploaded Source

Built Distribution

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

techtide_swarm-0.2.0-py3-none-any.whl (155.8 kB view details)

Uploaded Python 3

File details

Details for the file techtide_swarm-0.2.0.tar.gz.

File metadata

  • Download URL: techtide_swarm-0.2.0.tar.gz
  • Upload date:
  • Size: 113.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for techtide_swarm-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8c58e071ceb5aaa8244f0bb89303bf9ef3278b8e71f0b8b08d070f4117b5c985
MD5 3de3b30bf580037d563a61cb503bd278
BLAKE2b-256 576c27fb31a7b80d5551f5bec3819d1211f4df69ff724426064f22258d72fb1d

See more details on using hashes here.

File details

Details for the file techtide_swarm-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: techtide_swarm-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 155.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for techtide_swarm-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf0def9ebb88085d2cbee4fc49632c2241dd96e66679c76a90691fd0ef59dc5e
MD5 2ff53955850c80d464011d679872210e
BLAKE2b-256 e69f496014808071de5dd4a27c9b1dcbe52b551bdd3a4808a36063a57c0edcec

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