PNP Compute ← Back to slides
● Technical · Pre-alpha

Inside PNP Compute.

A walk through the runtime — the neuro substrate, the hierarchy, the brain, the flow engine, the five-layer memory, the multi-agent primitives, and the NeuroLang foundations they all stand on.

/// Repository layout

One repo. Five top-level folders.

neurosdk/
├── neurosdk/      # Python core: server, framework, neuros, profiles, tests
├── neuro_web/          # Next.js + R3F desktop client
├── neuro_mobile/       # Android (Kotlin/Compose) remote
├── neurolang/          # vendored NeuroLang library (Phase 1.9)
├── experimental/       # prototypes
├── docs/               # architecture + product + website
└── STATUS.md           # current phase, last shipped, next up

Backend: localhost:7000. IDE backend: localhost:8000. Web: localhost:3000. LiveKit: localhost:7880.

/// The atomic unit

A neuro = conf + code + prompt.

Three files in a folder. The factory hot-discovers them.

  • conf.json — name, kind, inputs/outputs, model
  • code.py — async def run(state, **kwargs)
  • prompt.txt — optional, for LLM-driven neuros

Each run gets state["__llm"] (BaseBrain), state["__prompt"], and a streaming callback. Stdout captured + forwarded as node.log events.

{
  "name":   "extract_book",
  "kind":   "skill.web",
  "effect": "tool",
  "inputs": { "url": "str" },
  "output": "dict",
  "model":  "openai/gpt-4o",
  "temperature": 0.2
}
/// Ten kinds

The taxonomy.

  • Model — provider/model abstraction
  • Prompt — typed prompt blocks/composers
  • Instruction — rules, policy, tone
  • Context — memory + prompt assembly
  • Memory — store/recall/consolidate
  • Skill — concrete capabilities
  • Workflow — sequential/DAG/parallel/loop
  • Agent — role-specialised orchestration
  • Code — read/write/diff/patch/scan
  • Library — registry / namespace
Vocabulary, grammar, semantics, runtime, standard library — the framework is language-like by construction.
/// Hierarchy

Agency → Project → Agent → Neuro.

Agency  ──▶  Project  ──▶  Agent  ──▶  Neuro
   │             │            │          │
   │             │            │          └─ atomic; conf+code+prompt
   │             │            └─ router + planner + replier + profile
   │             └─ unit of work; default project per agency
   └─ workspace; color, emoji, set of agents

Shipped agencies: default (Neuro HQ), upwork, webclaw. Shipped agents: neuro, nl_dev, opencode, openclaw, upwork.

/// Brain

Reason + Act, end-to-end.

Smart Router — one LLM call asks: direct reply or skill needed?

Planner — for multi-step requests, builds a DAG of skill calls.

Executor — walks the graph node by node, retries on failure, streams progress.

User Input │ ▼ Router ─── "just chat?" ──── Direct Reply │ ▼ skill needed Planner ─── builds DAG │ ▼ Executor ─── A → B → C │ ▼ Reply ─── final answer
/// Planning

Plans are typed DAGs.

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.

In NeuroLang the same plan is a first-class value: plan.serialize(), plan.replay(), plan.diff(other), plan.hash().

/// Flow engine

Sequential. Parallel. DAG. Tool-loop.

Sequential

A | B | C. Output of A feeds B, output of B feeds C.

Parallel

A & B. Both run concurrently via asyncio.gather.

DAG

Multi-path with conditions, parallel branches, human-gates, sub-graphs.

Tool-loop

Iterative: call tool, observe, continue. Bounded, depth-guarded.

Categorical morphism composition under the hood — associativity, identity hold.

/// Memory

Five layers. Bounded. Lossless.

LayerContentToken costTrigger
L0 IdentityAgent + user identity (hand-authored)~50always
L1 CriticalAAAK-compressed top facts~120always
L2 TaxonomyCategories — names + 1-line defs~200always (as index)
L3 FactsTemporal KG + embeddingsdynamictopic relevance
L4 DrawersVerbatim source (conversations/*.json)dynamicexplicit deep-dive

L0+L1+L2 ≈ 370 tokens always loaded. L3 on match. L4 on deep-dive only.

/// Memory librarian

LLM-maintained taxonomy.

The taxonomy isn't hardcoded — a local Gemma4 E4B librarian creates, merges, and renames categories as the corpus grows.

  • memory_extract — msgs → fact JSON (every 15 turns)
  • memory_categorize — route to category, propose new
  • memory_supersede — close old valid_to on contradiction
  • memory_consolidate — weekly merge / split / rename
  • memory_l1_refresh — nightly AAAK regeneration

Substrate

Typed property graph in SQLite. Uniform nodes table with kind tag. N-ary typed edges. Temporal validity (valid_from, valid_to) on both. Hypergraph-ready.

Retrieval: Personalised PageRank from seed nodes + vector hybrid. Recency × confidence weights. Top-M packed into the context budget.

/// Multi-Agent: Rooms

Mediated meeting rooms.

Multiple agents share a transcript. A room_mediator picks the next speaker round-robin.

  • room_create, room_post, room_close, room_mediator
  • Backend: core/rooms.py, core/rooms_db.py
  • Endpoint: /api/rooms
  • UI: RoomPanel.tsx
┌─────────────────────────────┐ │ ROOM (room_id) │ │ ┌────┐ ┌────┐ ┌────┐ │ │ │ A │ │ B │ │ C │ │ │ └─┬──┘ └─┬──┘ └─┬──┘ │ │ └──────┼──────┘ │ │ ▼ │ │ room_mediator │ │ • routes msgs │ │ • picks next speaker │ │ │ │ │ ▼ │ │ ROOM STATE │ │ transcript, KV │ └─────────────────────────────┘
/// Multi-Agent: Talk

agent.talk(target, msg)

Direct typed messages between agents. The substrate beneath rooms.

Depth-guarded — MAX=4 via TalkDepthExceeded. Prevents infinite loops.

Two neuros: agent_talk, agent_list. Path: core/talk.py.

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, calls
talk("upwork", "find related job")
  │
  ▼ depth=2
upwork.talk("neuro", "summary?")
  │
  ▼ depth=3
neuro.talk(...)
  │
  ▼ depth=4 → TalkDepthExceeded
            (loop guarded)
/// Multi-Agent: Schedules

Time as a first-class effect.

Cron-style triggers persisted to schedules.db via APScheduler.

  • schedule_run — create a trigger
  • schedule_list — inspect
  • schedule_cancel — remove

"Every morning at 8 send me the summary" — parsed by core/trigger_parse.py, fired by core/scheduler.py, persisted in core/schedules_db.py.

# 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
DELETE /api/schedules/{id}
/// Voice

Sub-second voice round-trip.

Microphone ↓ Silero VAD (voice activity detection) ↓ Sarvam Streaming STT (speech-to-text) ↓ Brain (LLM reasoning + skill execution) ↓ ElevenLabs TTS (text-to-speech) ↓ Speaker All audio over LiveKit — same transport as desktop video. Single connection, low latency.

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

/// Profiles

Behaviour packs you can swap.

ProfileUsePaired Agent
generalDefault conversational agentneuro
code_devCode editing focusopencode
neuro_devAuthoring neuros (meta)neuro
neurolang_devAuthoring NeuroLang flowsnl_dev
POST /api/profile/switch  { "profile": "neurolang_dev" }
GET  /api/profile/active
GET  /api/profile/list
/// NeuroLang

Language. Program. Environment.

NeuroLang

The Python library. Typed primitives, plans-as-values, composition operators. Vendored at ./neurolang/.

NeuroNet

The program. Composed neuros packaged as a runnable, shareable artifact. Apps on PNP Compute are NeuroNets. Manifest: name, version, deps, signature.

PNP Compute

The IDE + runtime fused. This repo is the flagship implementation.

/// NeuroLang primitives

What general-purpose languages don't have.

PrimitiveRole
NeuroTyped unit (identity + behaviour + optional prompt)
FlowComposition: |, &, +, DAG, loop
PlanFirst-class — inspect, modify, replay, diff, hash
MemoryScoped — discrete / differentiable / HD / episodic / semantic / procedural
Effectpure / llm / tool / human / time / voice — tracked in types
BudgetLatency + cost — statically warned, runtime enforced
Recoveryfallback / retry / escalate as language primitives
MailboxMessage-passing; no shared mutable state
AgentLong-lived neuro w/ mailbox + memory + role
/// Authoring

A flow reads like a sentence.

from neurolang import neuro, Flow, Memory, Budget
from neurolang.stdlib import web, reason, memory_neuros

@neuro(effect="tool")
def extract_book_metadata(url: str) -> dict:
    """Scrape book title, author, summary from URL."""
    ...

@neuro(effect="llm", budget=Budget(cost_usd=0.02))
def summarize(emails: list[Email]) -> str: ...

research_flow: Flow = (
    web.search | extract_book_metadata
    | reason.summarize | memory_neuros.store
)

research_flow.render(format="mermaid")
research_flow.cost_estimate()
research_flow.effect_signature()

plan = research_flow.plan(query="category theory")
result = plan.run(memory=Memory.discrete())
plan.serialize(); plan.replay()
/// Foundations

The three-tower identification.

Natural LanguageCategory TheoryComputation / Tensor
NounObject (dim 0)Tensor index
VerbMorphism (dim 1)Linear map
AdverbNatural transformation (dim 2)Higher-order op
SentenceComposed arrowComputation graph
TranslationEquivalence of categoriesReparameterisation
GrammarCategory of types (Lambek)Type system
Three apparently distinct domains turn out to be the same mathematical structure. Establishing this is the work of sixty years; exploiting it is the work of NeuroLang.
/// Dimensional ladder

Every primitive at a definite dimension.

DimNeuroLang primitiveNN counterpart
0Values, tensors, HD vectors, memory cellsWeights, activations, embeddings
1Functions, differentiable maps, effectsLayers, activations
2Plans, flows, memory scopes (functorial)Multi-head attention, residuals
3Plan transformations, optimisation passesArchitecture search, distillation
∞Meta-neuros, self-modifying compilerSelf-modifying architectures

Design rule: a primitive may be added at dimension n only if it cannot be expressed cleanly at dimension n−1 without loss of structure.

/// The compiler

NL ↔ Code as an adjunction.

              left-adjoint:  L : NL → Formal     (compile)
                                ⊣
              right-adjoint: R : Formal → NL     (summarise)
  • Unit η : 1NL ⇒ R∘L — every NL prompt round-trips. Cache stores η.
  • Counit ε : L∘R ⇒ 1Formal — every program round-trips. Cache stores ε.
  • Triangle identities — self-consistency enforceable.
Caching is not a performance optimisation. It is the unit and counit data of the adjunction, made into storage. Verifiable, principled invalidation when the model changes.
/// Deployment

Secure sandbox by default.

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

Autonomous agents need access to your screen, files, and inputs. By isolating this, you control exactly what they touch.

Single-user, long-lived. Personal-assistant scope. No multi-tenancy.

┌─────────────────────────┐ │ Phone (client) │ │ ┌───────────────────┐ │ │ │ Mobile App │ │ │ └────────┬──────────┘ │ └───────────┼─────────────┘ │ WebRTC (LiveKit) ┌───────────┼─────────────┐ │ Isolated │ Agent OS │ │ ┌────────▼──────────┐ │ │ │ Brain + Agents │ │ │ │ Desktop Control │ │ │ └───────────────────┘ │ │ Files stay here │ └─────────────────────────┘
/// API surface

FastAPI on port 7000.

MethodEndpointPurpose
POST/chatSend a message to the active agent
GET · POST/agents · /agents/{type}List · switch agents
GET · POST/api/profile/list · /switchProfiles
GET · POST/api/roomsMeeting rooms
GET · POST/api/schedulesTriggers
POST/stream/startDesktop streaming
GET/voice/tokenLiveKit voice token
POST/mouse/* · /keyboard/sendInput control
/// Status

Where we are. Where we go.

Shipped

  • NeuroLang Phase 1.9 — 17 stdlib + agent.delegate
  • 172 NeuroLang tests passing
  • Multi-agent: rooms, talk, schedules
  • 3D Neuro IDE backend
  • Voice agent + desktop streaming
  • Mobile remote (Android)

Next

  • Phase 2 NL compiler (cached adjunction)
  • JAX backend — differentiable flows
  • Hyperdimensional substrate
  • Episodic + semantic memory layers
  • Web 3D IDE polish
  • VSCode extension

Questions?
Build with us.

Code

GitHub · coming soon