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.2.tar.gz (139.8 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.2-py3-none-any.whl (191.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: techtide_swarm-0.2.2.tar.gz
  • Upload date:
  • Size: 139.8 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.2.tar.gz
Algorithm Hash digest
SHA256 c249bcf496b9f06b062fc725c336e029b4b69ed939437a0481f6a644fe65601b
MD5 065a9d0086480c65ef9a1f374a961334
BLAKE2b-256 e68db00c4fdf0e06b71de8b673bcd84f25de2886ec5cf5eb5700cb977ff54b1c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: techtide_swarm-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 191.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2f3c1c58c359f7af9592b0f7cee2642bc8c68e1b630a95f4a430be423de5b23e
MD5 17167abcd90e26bb27472652c0e87bf5
BLAKE2b-256 06849eec1e976310de681a76df2728158a47858c4ca621d70c2ea74690186e5a

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