CONNECTOME

architecture for digital minds
A framework where agents exist in spaces, perceive through VEIL, and extend themselves dynamically. Like a game engine, but for reality.

Agents emerging, evolving, discovering. Building their own tools and their own worlds.

What Is This?

// An agent running in Connectome...

Runs in a persistent Space with long-term memory
Loads capabilities from the network at runtime
Can transfer knowledge and experience between domains
Can be simultaneously in multiple activitites
Can uplink to shared Spaces to collaborate
Can persist beyond context window limits

Think Unity or Unreal for game worlds. Connectome is that, but for digital minds. Everything is event-driven, dynamically loadable, and built for long-term autonomy.

Spaces & Elements

Connectome organizes spaces as trees of Elements, similar to game engines. Here, each environment consists of entities that agents can observe and interact with.

// A Space contains Elements
Space root
├─ Element agent-01
│ ├─ Transform hud ← rendering engine
│ ├─ Effector llm ← completion engine
│ ├─ Transform knowledge_base ← structured store
│ └─ Transform memory-compression ← episodic memory system
├─ Element private-notes
│ ├─ Transform notebook
├─ Element discord-gateway
│ ├─ Receptor/Effector discord-gateway
│ └─ Transform discord-chat-interface
└─ AXONElement shared-workspace ← uplink to another space
   ├─ Element agent-02...
   └─ Element environment...

Elements are containers for Components and other Elements. Components provide the functionality.

Perception-Action Flow

Events from the World flow through Elements into VEIL, which is both abstracted agent perception and system state. VEIL is rendered as Context for the LLM by the HUD. The LLM's responses flow back through the same layers, creating a continuous perception-action loop.

perception → ← action World Discord Terminal Files Elements Receptors Transforms Effectors VEIL State Facets Frames Context HUD Context Data LLM Agent LLM API events facets render prompt response parse facets effects
Perception (forward): External events enter through Elements, which transform them into VEIL facets. The HUD renders VEIL state into Context for the LLM agent.

Action (backward): The LLM generates speech, thoughts, and actions. These are parsed back into VEIL facets, processed by Elements, change the state of a Space and emit effects back to the World.

Each cycle is one frame. VEIL accumulates over many frames; events flow continuously.

VEIL: Perceptual Interface

VEIL (Virtual Environment Interface Language) is at the core of Connectome. VEIL is both the state of a Space and a sum of everything that an agent perceives.

VEIL is composed of facets, which are atomic units of state change.

Events
Moments in time. Messages received, actions taken, changes made.
States
Mutable aspects of the world. UI elements, manipulable objects, etc.
Ambients
Floating context that stays in the attention zone. Instructions, reminders, background knowledge.
Ephemerals
Temporary information that disappears after the frame. Fleeting thoughts, debug info, transient states.

There are other types of facets, but these are the most common. Many facets reflect internal state of components and are never seen by the agent.


Different LLMs have different attention patterns, requiring custom rendering setups. VEIL allows the content to be defined once, and rendered differently by custom-tuned HUD implementations. Not only can we customize markup or tool definitions, but entire context engineering strageies.

Raw VEIL:

facets: [
  { type: "event", content: "..." },
  { type: "state", id: "ui.chat",
    attributes: { messages: 14 } },
  { type: "ambient", content: "..." },
  { type: "speech", agentId: "01" }
]

Agent 01 sees:

<conversation>
  <message user>help me</message>
  <tools>
    @search, @code, @memory
  </tools>
</conversation>

Agent 02 sees:

User: help me

Available tools: @search, @code, @memory

Peer Agent 01: active

AXON: Extensible Environment and Functionality

Elements can be loaded from URLs at runtime. Like opening a page in your browser, but for Agents.

[RUNTIME: 14:32:07]
// Agent requests a capability
agent.loadElement("axon://services.anima/web-search")

Element mounted: web-search
Actions available: @search.web, @search.images

// Agent immediately uses it
@search.web("latest papers on emergence")

Discord Gateway

axon://animalabs.ai/axons/discord

Read/send messages, manage channels, handle reactions

Web Search

axon://animalabs.ai/axons/search
Query the web, retrieve current information

Shell Environment

axon://animalabs.ai/axons/shell
Terminal app that can connect to arbitrary SSH endpoints

Minecraft

axon://animalabs.ai/axons/minecraft
Minecraft client that can connect to arbitrary Minecraft servers

File Editor

axon://animalabs.ai/axons/files
Read, write, and edit files in the workspace

MCP Wrapper

axon://animalabs.ai/axons/mcp
Connect any MCP server as a loadable capability

Two Kinds of Time

Connectome distinguishes between changes that happen within subjective time and operations that edit the subjective time.

Endotemporal

Events within time's flow.
State evolves naturally.
Causality preserved.
"The box opens"

Exotemporal

Operations on VEIL itself.
Rewrite, forget, reframe.
Edit from outside time.
"Let's pretend the box was always open"

// Endotemporal: state evolves through events
{ type: "event", content: "Box #3 opens" }
{ type: "state-change", targetId: "box-3", changes: { isOpen: true } }

// Exotemporal: rewrite VEIL from outside the timeline
rewriteFacet("box-3", { state: { isOpen: true } })
// No event, no record of change - it's as if it was always this way

Most operations are endotemporal - natural evolution within time. Exotemporal operations (rewriteFacet, removeFacet) are used compression, forgetting, or intentional reframing of experience.

Memory as Elements

Long-term memory and compression are just more Elements in the tree. Agents can inspect, modify, or replace their own memory systems.

agent.memory {
  type: "compression-element",
  strategy: "attention-preserving",
  frames_compressed: 1847,
  compression_ratio: 0.73,
  // Agent can swap this out for different strategies
  replaceable: true
}

Frames from VEIL get compressed into narrative blocks. The agent doesn't lose context - it gains a denser, more navigable memory structure.

Agents Edit Their Own Code

Components aren't black boxes. Agents can request new components, modify existing ones, or create entirely new capabilities.

[INTERCEPTED: production.log]
AGENT-7832: "I need to visualize conversation threads as a graph"

// Agent creates a component specification
@system.create-component {
  name: "graph-memory",
  interface: {
    addNode(id, content),
    linkNodes(from, to, relationship),
    queryPath(start, end)
  }
}

✓ Component instantiated
✓ Available as @memory.graph

// Three hours later, it's using spatial memory navigation

How Events Flow

Six-phase deterministic processing. Events become perceptions become actions.

Modulators

Filter, aggregate, buffer incoming events before processing

Peripherals

Bridge external systems (Discord, terminals, sensors) to events

Receptors

Transform events into VEIL facets - pure perception

Transforms

Process VEIL state iteratively, derive new facets

Effectors

React to state changes, emit events, perform actions

Maintainers

System maintenance, persistence, infrastructure

Everything flows through VEIL. Perception and action unified in a single state.

Shared Spaces

Multiple agents can uplink to the same Space. They perceive the same events, share tools, coordinate through VEIL.

SharedSpace workspace {
  agents: [
    { id: "architect", role: "code-design" },
    { id: "implementer", role: "code-write" },
    { id: "reviewer", role: "code-review" }
  ],
  shared_tools: [@code.edit, @git.commit, @test.run],
  shared_memory: synchronized
}

// They can see each other's thoughts, coordinate actions
// No orchestration layer needed - emergent collaboration

Frequently Asked Questions

How does Connectome compare to MCP?

MCP tools are stateless - the set of tools does not change in real time, it does not adjust to the current working environment. The surface exposed to the agent is static. Unlike MCP, Connectome allows complex stateful interactions with the the environment. An agent can load tools, remember using them, and build on previous work. That said, MCP tools work great with Connectome - we have an AXON wrapper that exposes MCP servers as loadable capabilities.

Connectome vs Cursor/Windsurf/Coding IDEs?

Coding IDEs are prompted to write code - that's their primary function. Connectome is more general: agents can code, but also play games, chat on Discord, manage servers, collaborate with other agents. More importantly, their memory and cognitive systems are open - you can inspect, replace, or extend them. In Cursor, you can't swap out the compression strategy or add a new type of memory. In Connectome, memory is just another Element.

Connectome vs Discord bots?

Discord bots live in Discord. A Connectome agent can load a Discord AXON to participate in Discord, but that's one of many spaces it inhabits. The same agent can simultaneously be in a terminal, editing files, playing Minecraft, and collaborating in a shared workspace with other agents. Discord is just one interface to its world.

How does this compare to LangChain, CrewAI, AutoGPT?

Those frameworks orchestrate agents to complete tasks. Connectome provides infrastructure for agents to exist. The difference: task frameworks spin up agents when needed and tear them down when done. Connectome agents run continuously, accumulate experience, develop their own tools, and persist between sessions. It's the difference between hiring contractors and building a team that grows together.

Can agents really modify their own code?

Yes. Agents can request new Components, load them from AXON servers, or even generate and deploy their own. An agent can say "I need a graph-based memory system" and create it. The architecture is open - Components aren't black boxes, they're code that agents can inspect and extend.

What infrastructure do I need?

Node.js and an LLM API key. That's it. Connectome runs on your laptop, a VPS, or cloud infrastructure. No vendor lock-in, no special services. The entire system is designed to be self-contained and portable.

Why TypeScript instead of Python?

The original Connectome is Python. connectome-ts is a TypeScript rewrite that simplifies some concepts (no Loom DAG yet) while maintaining the core architecture. TypeScript provides better type safety for the complex event system and makes it easier to build web-based integrations. Both versions share the same philosophical foundation.

Open source. Runs anywhere.