v0.1 — Research preview

The nervous system
for autonomous AI agents.

Cosmonapse is an open protocol and SDK for autonomous AI agents. Start with the Core today — one envelope, one Synapse, replaceable Neurons, and a CLI that boots a local broker in seconds. Memory, observability, security, and managed infrastructure are on the roadmap.

Open source · MIT licensed · Python + TypeScript SDK

// Build on Cosmonapse

~20 lines. Three transports.

A working multi-agent system is about twenty lines — define an async function, wrap it in an Axon, attach it to a Dendrite, call dispatch_and_wait. No protocol boilerplate. And the scale path is a single URL swap: MemorySynapse NatsSynapse KafkaSynapse, with zero changes to your Neuron code.

main.py
import asyncio, os
from cosmonapse import Axon, Dendrite, Neuron, connect_synapse

SYNAPSE_URL = "memory://"   # ← the only line that changes

greeter = Neuron(
    source="huggingface",
    endpoint="https://router.huggingface.co",
    model="meta-llama/Llama-3.1-8B-Instruct",
    api_key=os.environ["HF_TOKEN"],
    use_chat_api=True,
)

async def main():
    synapse = await connect_synapse(SYNAPSE_URL)
    worker = Dendrite(synapse=synapse, namespace="demo", role="worker")
    worker.attach_axon(Axon(neuron_id="greeter", neuron_fn=greeter,
                              capabilities=["text-generation", "chat"]))

    orch = Dendrite(synapse=synapse, namespace="demo")
    async with worker, orch:
        reply = await orch.dispatch_and_wait(
            neuron="greeter", input={"prompt": "Say hello to Cosmonapse."}, timeout_s=30.0,
        )
        print(reply.payload["output"]["response"])

asyncio.run(main())
// Product line

Five layers. One nervous system.

Cosmonapse Core ships today as an open protocol and SDK, with Engram primitives landed in 0.1.0. Doppler, Immune, and Cloud extend it — each a self-contained product with its own primitives, all speaking the same Signal envelope.

Active Development
Core
Cosmonapse Core
Distributed cognition runtime
The open protocol and SDK. One envelope, one Synapse, replaceable Neurons. Everything else is built on top.
BrainNeuronAxonDendriteSynapseSignalPathway
Active Development
Engram
Cosmonapse Engram
Context, memory & persistence
Shared memory for agent systems. Recall and Imprint primitives ship in 0.1.0 with InMemory, SQLite, and Postgres backends. Vector search and snapshot replay (Echo) are next.
RecallEchoImprint
Active Development
Doppler
Cosmonapse Doppler
Observability, telemetry & cognition analytics
Live telemetry and visualization over the Signal stream, reading the wave without disturbing the source. Pulse streams metrics, Prism turns them into dashboards, and Resonance adds cognition analytics — how Neurons influence each other and how Signals propagate through a Brain.
PulsePrismResonance
Planned
Immune
Cosmonapse Immune
Identity, security & threat response
Identity management, encryption, anomaly detection, and automated threat response for production agent infrastructure.
GenomeMyelinReflexAntiBody
Planned
Cloud
Cosmonapse Cloud
Managed cognition platform
The fully managed runtime — Brains in isolated Membranes, quota-enforced, credential-scoped at the infrastructure level.
Membrane
Explore all concepts
// What ships today

Core — open protocol and SDK.

The protocol and the primitives. Routing decisions, workflow rules, and lifecycle policies stay with you — build the system that fits your team.

01

Envelope spec

The single shared contract. Two components that produce valid Signals can always talk to each other. That is the only guarantee Cosmonapse makes.

02

Axon — agent-side tool

Owns the Neuron’s identity and wraps its output into protocol-valid Signals. Never touches the Synapse — that boundary is enforced in code, not convention.

03

Dendrite — synapse-side connector

The only thing that touches the Synapse. Hosts Axons, emits REGISTER / HEARTBEAT / DEREGISTER, routes inbound TASKs, and exposes every orchestration primitive.

04

RegistryStore

Live view of every Neuron on a namespace — capabilities, status, last heartbeat. Backed by memory, SQLite, or Postgres. The only mandatory persistent surface the SDK owns.

05

cosmo CLI

cosmo synapse start memory boots a local TCP broker. cosmo doppler streams every Signal to stdout. cosmo validate checks envelope conformance.

// Where we’re going

Building the platform.

Core is the foundation. The full Cosmonapse platform adds memory, observability, security, and managed infrastructure — each layer speaking the same Signal envelope.

Neurons are black boxes

A Neuron is a pure function — async fn(input, context) → output. Zero protocol knowledge. Wrap any existing LLM agent with an Axon and it becomes a protocol participant with no modification.

Memory is a product layer

The Core protocol defines MEMORY_APPEND, CONTEXT_SYNC, RECALL, and IMPRINT signals. Cosmonapse Engram ships the Recall and Imprint primitives in 0.1.0 with InMemory, SQLite, and Postgres backends; Echo (snapshot replay) is next. Bring your own context layer, or let Engram handle it.

Observability & cognition analytics

Doppler is a non-competing read-only tap on the Synapse, with three features. Pulse streams live telemetry — latency, throughput, cost per Neuron. Prism turns it into dashboards and traces. Resonance is the cognition-analytics layer — mapping how Neurons influence each other, tracking Signal propagation, detecting emergent Brain patterns, and scoring collaboration efficiency across the same stream.

Secure and managed at scale

Immune will handle identity, encryption, and automated threat response. Cloud will run the entire stack inside Membrane — isolated, quota-enforced, credential-scoped at the infrastructure level.

Build the substrate for agent swarms.

Cosmonapse Core 0.1.0 is in research preview — the protocol is drafted, the SDK ships with Engram, Pathway, capability-routed dispatch, and competitive bidding. Doppler is next.