Architecture.
From neuro to multi-agent.

The runtime is layered. A typed neuro substrate at the bottom; a four-tier hierarchy on top. Brain orchestration, five-layer memory, meeting rooms, schedules, agent-to-agent talk, voice — all wired through a single shared runtime.

Four layers, one substrate.

Agency wraps Project wraps Agent wraps Neuro. Each layer adds scope; none change the model. The neuro at the bottom is the same atomic unit whether it's running standalone or inside a meeting room of agents.

L1

Agency

Top-level workspace — a team. Color, emoji, set of agents, default project. Shipped: Neuro HQ, Upwork, Web Agency.

L2

Project

Unit of work inside an agency. Default project ships with every agency. Boundaries for memory and conversations.

L3

Agent

Role-specialised orchestrator with router + planner + replier + profile. Shipped: neuro, nl_dev, opencode, openclaw, upwork.

L4

Neuro

The atomic unit. conf.json + code.py + optional prompt.txt. Hot-loadable.

Loose coupling via events. Agents within an agency don't call each other directly — they communicate via shared state, workflow triggers, and the event bus. Agencies are loosely coupled; they communicate through the blackboard and shared events.

Reason + Act, end-to-end.

The brain implements a ReAct loop. Every message is classified by the smart router. Conversational ones get answered immediately. Skill-needing ones go through the planner, executor, and reply.

Smart Router

One LLM call to classify intent. Direct reply, or skill execution? If a skill is needed, identify which one and pass to the planner. Simple questions get answered instantly.

Planner

For multi-step requests, the planner breaks the goal into a Directed Acyclic Graph of skill calls. Each node is one neuro invocation; outputs flow into later inputs.

Executor

Walks the graph node by node. Handles errors, retries, hooks. Captures node.log events. Streams progress over WebSocket.

User: "Find my latest screenshot and describe what's on screen" DAG built by planner: Node 1: list_files( dir="~/Screenshots", sort="newest") Node 2: read_file( path=Node1.output[0]) Node 3: describe_image( image=Node2.output) Node 4: reply( text=Node3.output) Executor runs node-by-node. Each output feeds the next. Errors → retries → fallback.

Sequential. Parallel. DAG. Loop.

The flow engine supports four composition strategies, all available as neuros. Categorical morphism composition under the hood — the laws (associativity, identity) hold.

Sequential

core/flows/sequential_flow.py — A | B | C. The default. Output of A feeds B, output of B feeds C.

Parallel

core/flows/parallel_flow.py — A & B. Both run concurrently via asyncio.gather; outputs combine.

DAG

core/flows/dag_flow.py — Multi-path with conditions and parallel branches. Supports loops, human-gates, sub-graphs.

Tool-loop

core/tool_loop_neuro.py — Iterative: a neuro calls tools in-reply, observes, continues. Bounded, depth-guarded.

Five layers. Bounded. Lossless.

A graph-first substrate with a 5-layer query pattern. Cheap always-loaded footprint; deep recall on demand. LLM-maintained taxonomy — categories grow with the data, not from a hardcoded list.

L0

Identity

Core agent identity + user identity. Hand-authored. Always loaded.

~50 tok
L1

Critical facts (AAAK)

Top-priority facts in compressed form. Refreshed nightly by an LLM librarian.

~120 tok
L2

Taxonomy

Categories: wings / rooms / halls. Names + one-line definitions. Always-loaded as an index.

~200 tok
L3

Facts

Structured facts in temporal KG + embedding. Loaded on topic relevance via PPR + vector hybrid retrieval.

dynamic
L4

Drawers

Verbatim source — the existing conversations/*.json. Loaded on explicit deep-dive only. Never destructively summarised.

on-demand
The 5-layer hierarchy is a query pattern, not a schema constraint. Underlying storage is a typed property graph — uniform nodes, N-ary typed edges, temporal validity. Hypergraph-ready without migration.

Memory neuros

memory_extract
Messages → durable facts JSON. Runs every 15 turns. Local Gemma4 E4B.
memory_categorize
Routes a fact to a category, or proposes a new one. Top-3 nearest-neighbour gate.
memory_recall
User-facing semantic query: "what did we decide about X?"
memory_save
Explicit "remember that Y" save.
memory_supersede
Detect contradiction; close old valid_to; create new edge.
memory_consolidate
Weekly merge / split / rename pass on the taxonomy.
memory_l1_refresh
Nightly regeneration of AAAK-compressed L1.
memory_browse
Show categories, wings, rooms. UI surface for the librarian.

Rooms. Talk. Mediation.

Three primitives compose every multi-agent pattern: a typed talk primitive, persistent meeting rooms with mediation, and time-aware triggers (next section).

Meeting Rooms

An isolated real-time collaboration space. Multiple agents share a transcript. A mediator picks the next speaker round-robin. Backed by core/rooms.py and core/rooms_db.py with four neuros: room_create, room_post, room_close, room_mediator.

UI surface: neuro_web/components/rooms/RoomPanel.tsx. Endpoint: /api/rooms.

┌──────────────────────────────────────┐ │ ROOM (room_id) │ │ │ │ ┌─────────┐ ┌─────────┐ ┌──────────┐│ │ │ Agent A │ │ Agent B │ │ Agent C ││ │ └────┬────┘ └────┬────┘ └────┬─────┘│ │ │ │ │ │ │ └───────────┼───────────┘ │ │ ▼ │ │ ┌─────────────────┐ │ │ │ room_mediator │ │ │ │ • routes msgs │ │ │ │ • picks next │ │ │ └─────────────────┘ │ │ │ │ │ ┌─────────────────┐ │ │ │ ROOM STATE │ │ │ │ transcript, KV │ │ │ └─────────────────┘ │ └──────────────────────────────────────┘

agent.talk(target, msg)

An abstract primitive for direct typed messages between agents. Depth-guarded — MAX=4 via TalkDepthExceeded — to prevent infinite loops. Two neuros: agent_talk, agent_list.

This is the substrate beneath rooms, and the seed of categorical mailbox protocols where deadlock and starvation are analysable from types.

talk(target="opencode", msg="refactor module X") │ ▼ depth=1 opencode replies, which calls talk("upwork", "find related job") │ ▼ depth=2 upwork.talk("neuro", "summary?") │ ▼ depth=3 neuro.talk(...) │ ▼ depth=4 → TalkDepthExceeded (loop guarded)

Schedules — time as a first-class effect.

Cron-style triggers persisted to schedules.db via APScheduler. The user says "every morning at 8 send me the summary" — the runtime takes it from there.

schedule_run

Create a trigger. Accepts natural-language time expressions (parsed by core/trigger_parse.py) or cron strings.

schedule_list

List all active triggers. Inspect what's scheduled and when.

schedule_cancel

Cancel by trigger ID. Cleanly removes from DB and APScheduler.

# Persistence
core/schedules_db.py    # SQLite store
core/scheduler.py       # APScheduler glue
core/trigger_parse.py   # NL → cron

# API
GET    /api/schedules
POST   /api/schedules

Voice pipeline, sub-second.

All audio travels through LiveKit — the same transport used for the desktop video stream. Single connection, low latency.

Microphone
    ↓
Silero VAD                  # voice activity detection
    ↓
Sarvam Streaming STT        # speech-to-text
    ↓
Brain                       # LLM reasoning + skill execution
    ↓
ElevenLabs TTS              # text-to-speech
    ↓
Speaker

In NeuroLang terms, voice is just an effect: effect="voice". The standard library wires LiveKit, Twilio/Plivo, ElevenLabs, OpenAI TTS, Whisper, Deepgram, Sarvam — adapters, not magic.

Secure sandbox by default.

PNP Compute is designed to run inside a private, isolated machine — a dedicated workstation, a VM, or a container separate from your personal host OS.

Why isolation

Autonomous agents need access to your screen, files, and inputs. By isolating this to a dedicated environment, you control exactly what they can see and touch. This is the recommended deployment model.

Personal scope

The system is designed for single-user, long-lived deployment. No multi-tenancy. Memory is yours. Conversations are yours. Files are yours.

┌─────────────────────────┐ │ Your Phone (Client) │ │ ┌───────────────────┐ │ │ │ PNP Compute │ │ │ │ Mobile App │ │ │ └────────┬──────────┘ │ └───────────┼─────────────┘ │ WebRTC ┌───────────┼─────────────┐ │ Isolated │ Agent OS │ │ ┌────────▼──────────┐ │ │ │ Brain + Agents │ │ │ │ Desktop Control │ │ │ └───────────────────┘ │ │ Your files stay here │ └─────────────────────────┘

FastAPI backend on port 7000.

A focused REST + WebSocket surface. Conversations, agents, profiles, rooms, schedules, mouse, keyboard, streaming.

MethodEndpointPurpose
POST/chatSend a message to the active agent
GET/agentsList all running agents
POST/agents/{type}Switch to a specific agent type
GET/api/profile/listList all profiles
GET/api/profile/activeGet active profile
POST/api/profile/switchSwitch profile
GET · POST/api/roomsList · create a meeting room
GET · POST/api/schedulesList · create a scheduled trigger
POST/stream/startBegin desktop screen streaming
GET/voice/tokenGet LiveKit token for voice sessions
POST/mouse/move · /click · /scrollMouse control
POST/keyboard/sendKeystrokes and key combos

Full endpoint details in GitHub · coming soon.