Define agents in YAML. Astromesh handles the rest — from input safety checks to model routing to tool execution.
1 from astromesh_adk import agent, tool
2
3 @tool(description="Search the web")
4 async def search(query: str) -> str:
5 return await fetch_results(query)
6
7 @agent(
8 name="assistant",
9 model="openai/gpt-4o",
10 tools=[search],
11 )
12 async def assistant(ctx):
13 """You are a research assistant."""
14 return None
Decorators Python-first API
Auto Schema From type hints
6 Providers One string config
Multi-Agent 4 team patterns
Local + Remote One codebase
$ pip install astromesh-adk
$ astromesh-adk run my_agent.py:assistant "What is quantum computing?"
Everything you need to build, deploy, and scale AI agents.
6 LLM Providers Connect to any model, local or cloud
Details Ollama, OpenAI-compatible, vLLM, llama.cpp, HuggingFace TGI, ONNX Runtime. Automatic failover with circuit breaker (3 failures → 60s cooldown).
6 Orchestration Patterns From simple to multi-agent
Details ReAct (think-act-observe), Plan & Execute, Parallel Fan-Out, Pipeline, Supervisor (delegate to workers), Swarm (agents hand off conversations).
3 Memory Types Persistent context across conversations
Conversational (Redis/PG/SQLite), Semantic (pgvector/ChromaDB/Qdrant/FAISS), Episodic (PostgreSQL). Strategies: sliding window, summary, token budget.
RAG Pipeline Document ingestion to retrieval
4 chunking strategies (fixed, recursive, sentence, semantic), 3 embedding providers, 4 vector stores, 2 rerankers (cross-encoder, Cohere).
Mesh Discovery (Maia) Nodes find each other automatically
Gossip-based discovery, failure detection (alive→suspect→dead), leader election, least-connections routing. No manual peer configuration.
Rust Extensions 5-50x speedup on CPU-bound paths
Optional native Rust extensions via PyO3 for chunking, PII detection, tokenization, rate limiting. Pure Python fallback when not compiled.
From a single command to a production Kubernetes cluster.
Standalone Astromesh Node Docker Maia Mesh Maia + GPU Helm ArgoCD Copy git clone https://github.com/monaccode/astromesh.git
cd astromesh
uv sync --extra all
astromeshctl init --dev
astromeshd --config ./config Copy # Download latest .deb from GitHub Releases
curl -LO https://github.com/monaccode/astromesh/releases/latest/download/astromesh_<VERSION>_amd64.deb
# Install and start
sudo apt install ./astromesh_<VERSION>_amd64.deb
sudo astromeshctl init
sudo systemctl enable --now astromeshd Copy # Single node with Ollama
docker compose -f recipes/single-node.yml up -d
curl http://localhost:8000/v1/health Copy # 3-node mesh: gateway + worker + inference
docker compose -f recipes/mesh-3node.yml up -d
curl http://localhost:8000/v1/mesh/state Copy # Mesh with NVIDIA GPU inference
docker compose -f recipes/mesh-gpu.yml up -d Copy cd deploy/helm/astromesh
helm dependency update
helm install astromesh . -f values-dev.yaml \
--namespace astromesh --create-namespace
kubectl get pods -n astromesh Copy # Multi-environment GitOps deployment
kubectl apply -f deploy/gitops/argocd/applicationset.yaml
# Creates: astromesh-dev, astromesh-staging, astromesh-prod
1 apiVersion: astromesh/v1
2 kind: OrbitDeployment
3 metadata:
4 name: my-astromesh
5 environment: production
6 spec:
7 provider:
8 name: gcp
9 project: my-project-123
10 region: us-central1
Cloud-Native Managed services
Multi-Cloud GCP first, then AWS & Azure
Escape Hatch Eject to raw Terraform
Marketplace GCP Marketplace ready
Secure Defaults VPC, IAM, Auth Proxy
What gets provisioned:
Cloud Run Runtime
Cloud SQL PostgreSQL 16
Memorystore Redis
Secret Manager JWT / Provider Keys
$ pip install astromesh-orbit[gcp]
$ astromeshctl orbit apply --preset starter
System Service systemd, launchd, WinSvc
CLI Management astromeshctl
7 Profiles full, gateway, worker...
Cross-Platform Linux, macOS, Windows
Auto-Restart Restart on failure
Health Checks doctor + watchdog
$ sudo astromeshctl init --profile full
$ astromeshctl status
● Running v0.18.0 1 agent loaded 1 provider healthy
Astromesh is more than a runtime. Build agents visually, run them on a hardened appliance, orchestrate them across tenants in the cloud, or spin one up in plain English.
1 {
2 "name": "support-agents",
3 "connections": {
4 "runtime": [{ "type": "local", "url": ":8000" }],
5 "nexus": [{ "tenantId": "prod" }]
6 },
7 "environments": { "dev": { "vars": {…} } }
8 }
Desktop IDE Electron 41 · React 19
Visual Builder Drag-and-drop canvas
Local Runtime Managed venv on :8000
Deploy Anywhere Local · GCP · Nexus
Channels WhatsApp setup wizard
Dev Tunnel ngrok / cloudflared
$ npm install
$ npm run dev
1 apiVersion: nexus.astromesh.io/v1alpha1
2 kind: NexusTenant
3 metadata:
4 name: tenant-prod
5 spec:
6 displayName: "Production"
7 nodeProfile: full
8 resourceQuota: { maxAgents: 20 }
Multi-Tenant Namespace isolation
K8s Operator CRDs + reconcilers
REST API Gin :8080 · JWT + keys
Per-Tenant Node astromesh-node :8000
Agent Lifecycle register → deploy → run
Observability status · logs · metrics
$ ./hack/bootstrap.sh
$ kubectl get nexustenants -n nexus-system
1
2 Distribution=debian Release=trixie
3
4 Bootloader=systemd-boot
5 UnifiedKernelImages=yes
6 SplitArtifacts=uki,partitions
7
8
Immutable Root dm-verity verified
A/B Updates sysupdate + rollback
API-Only No shell · no SSH
Tiny Footprint ≤ 500 MB ceiling
OCI Artifact Pulled via ORAS
Reproducible Pinned runtime ref
$ oras pull ghcr.io/monaccode/astromesh-os:v0.4.0
$ PHASE0_MODE=stub mkosi build
1 /leia bootstrap local
2
3 /leia I need a WhatsApp bot for my café
4
5 ✓ deployed: cafe-support (running)
6 /leia test cafe-support
7 > "What time do you open?"
8 ◇ "We open at 8am every day ☕"
Natural Language Plain-English ops
10 Commands create · deploy · test
5 Subagents interpreter → architect
6 Templates support · booking · …
Nexus-Native Kind or remote cluster
Smart Models Ollama + cloud fallback
$ claude plugins add ./astromesh-leia
$ /leia create a lead-qualifier bot
Create a YAML file, start the daemon, call the API.
apiVersion: astromesh/v1
kind: Agent
metadata:
name: hello-agent
spec:
identity:
description: A minimal test agent
model:
primary:
provider: ollama
model: llama3.1:8b
endpoint: http://ollama:11434
parameters:
temperature: 0.7
prompts:
system: |
You are a helpful assistant.
Keep responses brief.
orchestration:
pattern: react
max_iterations: 3 curl -X POST http://localhost:8000/v1/agents/hello-agent/run \
-H "Content-Type: application/json" \
-d '{"query": "What is 2+2?", "session_id": "demo"}' Response
{
"agent": "hello-agent",
"response": "2 + 2 = 4",
"session_id": "demo",
"tokens_used": 42,
"provider": "ollama",
"pattern": "react",
"iterations": 1
}