Product line

Five layers. One nervous system.

Active Development
Core
Cosmonapse Core
Distributed cognition runtime
BrainNeuronAxonDendritePathwaySynapseSignal
Active Development
Engram
Cosmonapse Engram
Context, memory & persistence
RecallImprintEcho
Active Development
Doppler
Cosmonapse Doppler
Observability & telemetry
PulsePrism
ResonanceScoping
Cosmonapse Resonance
Cognition analytics
FluxFieldTopologyAffinityCoherence
Planned
Immune
Cosmonapse Immune
Identity, security & threat response
GenomeMyelinReflexAntiBody
Planned
Cloud
Cosmonapse Cloud
Managed cognition platform
Membrane
Cosmonapse Core
Active Development

Distributed cognition runtime

Brain
Team of agents
A collection of Neurons sharing a Synapse. The unit of organisation when teams group agents by capability or domain.
Neuron
Agent · LLM provider · MCP server · function
Anything that interacts with the real world, exposed behind a pure-function interface - receives (input, context), returns output, zero protocol knowledge. The Neuron(source=...) factory wraps LLM providers (OpenAI, Anthropic, HuggingFace, Groq, Mistral, Together, OpenRouter, Ollama), MCP servers, or a plain async function behind the same callable. An HTTP API is not a Neuron - keep your web framework at the edge and dispatch TASKs from route handlers via an orchestrator Dendrite. Replaceable without touching infrastructure.
Axon
Agent-side tool
The only piece of Cosmonapse that lives inside the Neuron's process. Wraps the Neuron function, validates its output into a Signal (AGENT_OUTPUT, CLARIFICATION, PERMISSION, or ERROR), and hands it to the Dendrite. The Neuron itself never touches the protocol.
Dendrite
Synapse-side connector
The only component that touches the Synapse. Hosts Axons, owns routing decisions, exposes the aggregate of its Axons' capabilities, and emits REGISTER / HEARTBEAT / DEREGISTER per attached Axon. Has a role: orchestrator (can dispatch TASKs) or worker (hosts Axons only). Workers are guarded - they can serve TASKs and bid in capability routing, but can't emit orchestration signals.
Pathway
Per-trace event handle
Returned by dendrite.dispatch(...). A single primitive with three consumption shapes: await pw.wait() for sequential request/reply, @pw.on(SignalType.X) for reactive trace-scoped callbacks, and async for sig in pw: for streaming. Pathway(scope="terminal") filters to FINAL / ERROR / CLARIFICATION only - the decentralised pattern where the Cortex only wakes for events that need attention. observe_pathway(trace_id) opens one in observer role to watch a trace another peer started.
Synapse
Channel / stream
The transport layer all Signals cross. Pluggable: MemorySynapse for tests, DevSynapse for local multi-process dev, NatsSynapse or KafkaSynapse for production. Capability-routed TASKs publish on cosmonapse.<ns>.TASK.routed with queue groups so the broker delivers each one exactly once within a matching cap profile.
Signal
Envelope
A single message crossing the Synapse. The shared contract - two components that produce valid Signals can always interoperate.
Cosmonapse Engram
Active Development

Context, memory & persistence

Recall
Read path · RECALL signal
Reads bound memory before a Neuron acts. The Axon emits a RECALL signal; the Engram replies with RECALLED carrying Hits. EngramClient.recall() is the in-Neuron API. Ships in 0.1.0 with InMemory, SQLite, and Postgres backends. Vector-backed semantic search is on the Echo roadmap.
Imprint
Write path · IMPRINT signal
Durable writes to bound memory. The Axon emits an IMPRINT signal; the Engram replies with IMPRINTED carrying a receipt. EngramClient.imprint() is the in-Neuron API. Operations: add, append, merge, upsert, delete. Ships in 0.1.0.
Echo
Replay & snapshots (next)
Records and replays Signal streams and Engram states. Time-travel debugging, snapshot diffing, deterministic re-runs of any workflow. Planned for a follow-up release.
Cosmonapse Doppler
Active Development

Observability & telemetry

Pulse
Live telemetry
Real-time stream of Signal metrics - latency, throughput, error rates, and cost per Neuron. Named for the heartbeat of the system.
Prism
Visualization layer
Breaks the Pulse stream into human-readable dashboards, trace graphs, and audit views. Builds on Doppler's read-only Synapse tap without disturbing the flow.
Cosmonapse Resonance
Scoping

Cognition analytics

Flux
Signal propagation analysis
Tracks how Signals travel through the Brain - measuring path lengths, bottlenecks, and propagation velocity between Neurons.
Field
Neuron influence mapping
Models the influence each Neuron exerts on others - building a directed graph of cognitive dependencies from the observed Signal stream.
Topology
Emergent pattern detection
Surfaces emergent structural patterns in the Brain - clusters, hubs, and unexpected collaboration paths that arise from Signal behavior over time.
Affinity
Collaboration efficiency
Scores how efficiently pairs and groups of Neurons collaborate - latency, success rate, and resource cost per cognitive handoff.
Coherence
Cognitive synchronization
Measures the degree to which Neurons operate in temporal alignment - detecting desynchronization, phase drift, and coordination breakdowns across the Brain.
Cosmonapse Immune
Planned

Identity, security & threat response

Genome
Identity management
Defines and enforces the identity of every Neuron and Brain - API keys, roles, capability scopes, and namespace boundaries.
Myelin
Encryption & security
The insulating layer around every Signal path. Handles transport encryption, at-rest Engram encryption, and key rotation without touching application logic.
Reflex
Automated threat response
Monitors Signal patterns for anomalies and executes pre-defined countermeasures automatically - rate limiting, circuit breaking, Neuron quarantine.
AntiBody
Anomaly detection
The learning surface of the Immune system. Builds baseline models of normal Signal flow and flags deviations for Reflex to act on or operators to review.
Cosmonapse Cloud
Planned

Managed cognition platform

Membrane
Sandboxing & isolation
The boundary layer in the managed platform. Isolates each Brain in its own execution context - resource quotas, network policies, and credential scoping enforced at the infrastructure level.
How they fit together

A Brain in motion.

A Brain is a team of Neurons. Each Neuron is reached through a Dendrite - the only component that touches the Synapse. The Dendrite carries Signals between participants and exposes orchestration primitives for whoever needs them.

Persistent state lives in Engram - written via Imprint, retrieved via Recall, and replayed or snapshotted via Echo. Observability comes from Doppler: Pulse streams live telemetry and Prism turns it into dashboards and traces. Resonance, a sub-project within Doppler, goes deeper - it is cognition analytics for the Brain, analyzing how Neurons influence each other, how Signals propagate, and surfacing emergent patterns, collaboration efficiency, and cognitive synchronization.

Security will eventually be enforced by Immune: Genome governs identity and access, Myelin encrypts every path, and Reflex with AntiBody detect and respond to threats automatically. In the managed cloud, Membrane wraps the whole runtime in an isolated execution boundary - resource quotas, network policies, and credential scoping enforced at the infrastructure level.

Workflow trigger
A user request, a scheduled job, or another Brain - dispatches the root TASK Signal onto the Synapse.
Dendrite - synapse-side connector + orchestration
Receives the TASK. Routes it to the attached Axon matching the target neuron_id. Emits FINAL when done. Every Dendrite can orchestrate - no separate Cortex class (Cortex is a back-compat alias).
Neuron - LLM provider · MCP server · async function
Receives (input, context). Returns a plain dict. The Neuron factory wraps any provider - OpenAI, Anthropic, HuggingFace, Groq, Ollama, an MCP server, or a plain async function - knowing nothing about the Synapse, envelopes, or trace IDs. An HTTP API is not a Neuron: it sits at the edge, in front of an orchestrator Dendrite.
Engram - Recall · Imprint · Echo
Persistent shared state written by Imprint, queried by Recall before each Neuron call, and snapshotted by Echo for replay and debugging.
Immune - Genome · Myelin · Reflex · AntiBody
Identity and access enforced by Genome. Encryption handled by Myelin. Anomalies surfaced by AntiBody and acted on automatically by Reflex.

Doppler (Pulse + Prism) sits beside this whole picture, not inside it. It subscribes to the Synapse as a non-competing read-only consumer and sees every Signal flow past. Resonance - a sub-project of Doppler - builds on that stream to deliver cognition analytics: Flux maps propagation paths, Field models Neuron influence, Topology surfaces emergent structure, Affinity scores collaboration, and Coherence measures synchronization. In Cosmonapse Cloud, the entire stack runs inside a Membrane - sandboxed, quota-enforced, and credential-scoped at the infrastructure level.

Resolution & retry

How a Pathway resolves - and retries.

Every dispatch opens a Pathway - a per-trace handle scoped to one trace_id. In the request/reply shape, the Dendrite owns the whole arc: it dispatches the TASK, waits for the first terminal Signal, then closes the Pathway. A Pathway resolves the moment a terminal arrives - a FINAL (success), an ERROR, or an interactive CLARIFICATION / PERMISSION the caller must answer. With scope: "terminal" only those are delivered; with scope: "all" the cognition stream (THOUGHT_DELTA, PLAN, TOOL_CALL…) flows past first and the terminal still closes it.

A Pathway is considered stuck in three cases: no terminal arrives within timeout_s (a timeout on the wait), the Pathway closes before any terminal (a PathwayClosedError, e.g. the worker died), or it resolves to an ERROR flagged recoverable. A FINAL, AGENT_OUTPUT, CLARIFICATION, or PERMISSION is never “stuck” - each is a result or a decision the caller must handle, not something to retry behind their back.

Retry is a declarative policy - a RetryStrategy - handed to dispatch_and_wait(retry=…) or run_with_retry(…). It controls how many attempts to make, the per-attempt timeout, the backoff between tries, and the predicate that decides whether a given outcome is worth retrying. Because retry transparently re-dispatches, it only fits the request/reply shape: the streaming shapes (dispatch / dispatch_and_subscribe) hand the live Pathway back to the caller, so retrying there would orphan their subscriptions - wrap those in a resilient-pathway pattern instead.

The subtle part is what happens to the abandoned attempt. By default each retry runs on a fresh trace, and before launching it the Dendrite broadcasts a STOP on the old trace. STOP is cooperative cancellation: every Dendrite hosting work on that trace cancels its in-flight Neuron call and Engram I/O, and - when rollback_on_retry is set - replays that trace’s per-trace saga journal in reverse to undo half-finished Engram writes, then acks with STOPPED. This is what stops a stalled worker from continuing to run (and keep writing memory) behind a retry that has already moved on. Rollback reverses Engram state only - a side effect a Neuron caused in the outside world (a sent email, an external write) is reversed only if that Neuron registered its own compensator.

1 · Dispatch & wait
Open a Pathway on a fresh trace, dispatch the TASK, and await the first terminal Signal within timeout_s.
2 · Evaluate the outcome
If the outcome is terminal-and-final (FINAL / AGENT_OUTPUT / CLARIFICATION / PERMISSION), return it. If it is a timeout, an early close, or a recoverable ERROR - and attempts remain - retry.
3 · Preempt the abandoned attempt
Broadcast STOP on the old trace. Hosts cancel in-flight work, optionally roll back Engram writes via the saga journal, and ack with STOPPED.
4 · Back off & re-dispatch
Sleep backoff(attempt), fire the optional on_retry hook, and loop with a new trace until a non-retryable outcome or attempts are exhausted.

See STOP / STOPPED in the envelope spec, and RetryStrategy / run_with_retry in the SDK reference.

Glossary cheatsheet
Cosmonapse termConventional termOne-line
Cosmonapse CoreActive DevelopmentDistributed cognition runtime
BrainTeam of agentsA collection of Neurons sharing a Synapse.
NeuronAgent · LLM provider · MCP server · functionAnything that interacts with the real world, exposed behind a pure-function interface - receives (input, context), returns output, zero protocol knowledge.
AxonAgent-side toolThe only piece of Cosmonapse that lives inside the Neuron's process.
DendriteSynapse-side connectorThe only component that touches the Synapse.
PathwayPer-trace event handleReturned by dendrite.
SynapseChannel / streamThe transport layer all Signals cross.
SignalEnvelopeA single message crossing the Synapse.
Cosmonapse EngramActive DevelopmentContext, memory & persistence
RecallRead path · RECALL signalReads bound memory before a Neuron acts.
ImprintWrite path · IMPRINT signalDurable writes to bound memory.
EchoReplay & snapshots (next)Records and replays Signal streams and Engram states.
Cosmonapse DopplerActive DevelopmentObservability & telemetry
PulseLive telemetryReal-time stream of Signal metrics - latency, throughput, error rates, and cost per Neuron.
PrismVisualization layerBreaks the Pulse stream into human-readable dashboards, trace graphs, and audit views.
Cosmonapse ResonanceScopingCognition analytics
FluxSignal propagation analysisTracks how Signals travel through the Brain - measuring path lengths, bottlenecks, and propagation velocity between Neurons.
FieldNeuron influence mappingModels the influence each Neuron exerts on others - building a directed graph of cognitive dependencies from the observed Signal stream.
TopologyEmergent pattern detectionSurfaces emergent structural patterns in the Brain - clusters, hubs, and unexpected collaboration paths that arise from Signal behavior over time.
AffinityCollaboration efficiencyScores how efficiently pairs and groups of Neurons collaborate - latency, success rate, and resource cost per cognitive handoff.
CoherenceCognitive synchronizationMeasures the degree to which Neurons operate in temporal alignment - detecting desynchronization, phase drift, and coordination breakdowns across the Brain.
Cosmonapse ImmunePlannedIdentity, security & threat response
GenomeIdentity managementDefines and enforces the identity of every Neuron and Brain - API keys, roles, capability scopes, and namespace boundaries.
MyelinEncryption & securityThe insulating layer around every Signal path.
ReflexAutomated threat responseMonitors Signal patterns for anomalies and executes pre-defined countermeasures automatically - rate limiting, circuit breaking, Neuron quarantine.
AntiBodyAnomaly detectionThe learning surface of the Immune system.
Cosmonapse CloudPlannedManaged cognition platform
MembraneSandboxing & isolationThe boundary layer in the managed platform.

Note: Cortex is kept as a back-compat alias for Dendrite. New code Note: Cortex is kept as a back-compat alias for Dendrite. New code should use Dendrite directly. Axon (the agent-side tool that wraps a Neuron) remains part of the Core runtime but is an implementation detail - applications interact with Dendrites and Neurons directly.