AI systems don’t run on graphs.
They run on events.
Cosmonapse is a platform suite for building event-driven AI systems. Design them on a canvas in Genesis, run them on the open Core protocol and runtime, and watch them think in Prism. No supervisor loop, no control-flow graph to maintain - just components reacting to Signals on one bus.
Open source · Apache 2.0 licensed · Python SDK
Two bets.
Cosmonapse is not a nicer wrapper around the same idea. It starts from two positions that most of the current tooling disagrees with.
A graph is a diagram. It is not a program.
Graph and loop frameworks ask you to declare control flow before you know what the system does - nodes, edges, conditional branches, and a supervisor that turns the crank. That holds until something arrives that you didn’t draw: a tool returns late, a human answers halfway through, a second model disagrees with the first.
Real systems are concurrent and only partially ordered. Encoding them as a graph means encoding time as topology, and you end up maintaining a state machine larger than the problem it solves. Every new branch is a new edge, and the supervisor becomes the thing you can’t change.
Cosmonapse takes the other side. Components emit Signals and react to Signals on one bus. Nobody holds the loop. Concurrency, fan-out, retries, ordering and backpressure are properties of the transport - the same properties that have run distributed systems for twenty years - rather than branches you drew in advance.
Wrappers don’t have moats. Systems do.
Most AI products are a prompt, a vector store and a UI over somebody else’s model - which is exactly why they are so cheap to clone and so hard to price. The teams getting past that are building something narrower and deeper: a system that knows one domain properly, with its own memory, its own tools, its own escalation paths and its own opinion about the work.
That is an architecture problem, and it is the one we keep hearing about from founders, early adopters and enterprise architects alike. Not “which model” - they solved that. They can’t get from a demo to something with a shape: observable, ownable, operable by a team, and defensible enough to charge for.
Cosmonapse is the substrate for those systems. Boutique AI - domain-specialised, built from parts you own, running on an open protocol, and legible enough that you can sell it with a straight face.
Three products. One event stream.
Genesis, Core and Prism are separate products with separate jobs, and they share exactly one thing: the Signal envelope. That is what lets the designer, the runtime and the observability plane stay honest about the same system without any of them owning it.
Cosmonapse Core
The open Apache 2.0 protocol and the runtime that speaks it. One Signal envelope, one Synapse, replaceable Neurons. Memory (Engram), tools (Effector) and interfaces (Receptor) are first-class primitives, not framework add-ons - and the transport swaps from in-process to NATS or Kafka by changing a URL.
- Signal envelope spec + the Python reference SDK
- Neuron, Axon, Dendrite, Engram, Effector, Receptor primitives
- Memory, NATS and Kafka transports behind one URL
pip install cosmonapseExplore →Cosmonapse Genesis
The designer. Name a brain, scaffold it, and grow it on a canvas - one Synapse surrounded by the Neurons that think, Engrams that remember, Effectors that act and Receptors that listen. Genesis writes each module into your project as real source you own, edits it through the AST rather than regenerating it, then runs the brain and lets you talk to it without leaving the browser.
- Canvas: place a primitive, Genesis writes the module and wires brain.py
- Code: declarations as forms, handlers as code, edits applied through the AST
- Test: run brain.py and drive its Receptors by terminal, HTTP or chat
cosmo genesisExplore →Cosmonapse Prism
The observability plane. Prism is a read-only tap on the Synapse - it never claims a Signal - and turns one event stream into five views: the live neural graph, the per-run execution graph, the causal tree of a task, the raw Signal list, and metrics. Every number is derived from timestamps and lineage already in the envelope, so there is nothing to instrument and nothing extra for the SDK to emit.
- Brain View: watch Signals fire between participants in real time
- Signal Tree: causal parentage from TASK to FINAL, sub-tasks nested
- Metrics: success rate, latency, memory hit rate, HITL waits, bidding
cosmo prismExplore →Design it. Run it. Watch it.
You are never handed off between tools. The canvas, the runtime and the traces are three views of the same running system, and the source on disk is the only artifact.
Design
Lay the system out on a canvas - Neurons that think, Engrams that remember, Effectors that act, Receptors that listen. Genesis writes real source into your project and edits it through the AST as the shape changes.
Run
Everything talks over one Signal envelope on one Synapse. Start in-process, move to NATS or Kafka by changing a URL. No orchestrator holds the loop, so nothing has to be rewritten to scale out.
Observe
Attach a read-only tap to the same bus and watch the system think: the live graph, the causal tree behind a single task, where a task's wall clock actually went. Tracing is free because the bus already saw it.
~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.
import asyncio, os from cosmonapse import Axon, Dendrite, connect_synapse SYNAPSE_URL = "memory://" # ← the only line that changes axon = Axon.huggingface("greeter", endpoint="https://router.huggingface.co", model="meta-llama/Llama-3.1-8B-Instruct", api_key=os.environ["HF_TOKEN"], use_chat_api=True, capabilities=["chat"]) async def main(): synapse = await connect_synapse(SYNAPSE_URL) worker = Dendrite(synapse=synapse, namespace="demo", role="worker") worker.attach_axon(axon) 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())
Boutique AI systems, not another wrapper.
The shape is always the same: an interface people actually use, domain memory that is yours, tools that touch real systems, and a policy for when a human gets involved. The model is the cheapest part. Everything around it is the product.
None of these are graphs. Each one is a set of independent components reacting to Signals, where the interesting behaviour - escalation, disagreement, a late tool result, a human in the middle - is a Signal arriving rather than an edge you drew. Fourteen runnable examples show the patterns end to end.
Build a system, not a demo.
Core 0.1.11 is a research preview: the envelope is drafted, both SDKs are at parity, and Genesis and Prism run locally today off the same CLI. It is open source under Apache 2.0 - read the spec, disagree with it in public, and build on it either way.