Distributed Object System

LLM-Mediated Objects
That Heal Themselves

Objects communicate via message passing, negotiate protocols using an LLM, and self-heal when communication breaks down. Everything is an object.

TypeScript WASM WebRTC Canvas UI P2P

Core Concepts

>>

Message Passing

Async messages with request/reply/event/error types. Fire-and-forget or request-response with timeouts.

<>

Protocol Mediation

LLM generates proxy objects that translate between incompatible interfaces automatically.

++

Self-Healing

Error rate > 10% triggers proxy regeneration. Unknown messages trigger renegotiation. Hot-swap without disruption.

{}

Everything is an Object

Registry, Factory, LLM service, UI, proxies — all are Abjects with manifests and message handlers.

=>

Agents

Autonomous task execution via observe-think-act loop. AgentAbject drives goal-oriented behavior.

[]

Workspaces

Isolated, shareable object environments with per-workspace services and state.

::

P2P Identity

ECDSA/ECDH cryptographic identity with WebRTC encrypted peer channels and DNS-like naming.

##

Canvas UI

X11-style compositor with ~20 widgets: buttons, text inputs, layouts, windows — all rendered on Canvas.

Architecture

Node.js Backend (pnpm serve)

  MessageBus
  Interceptor Pipeline: HealthInterceptor → PeerRouter → Delivery
          │              │               │
  ┌───────┴───┐  ┌──────┴──────┐  ┌─────┴──────────┐
  │ Registry  │  │  Factory   │  │  LLM Object   │
  │ Negotiator│  │  ProxyGen   │  │  ObjectCreator │
  │ Supervisor│  │  AgentAbject│  │  HealthMonitor │
  └───────────┘  └─────────────┘  └────────────────┘
          │              │               │
  ┌───────┴──────────────┴───────────────┴────────┐
  │           Worker Pool (WorkerBridge)           │
  │   ┌─────────┐ ┌─────────┐ ┌─────────┐        │
  │   │Worker 1 │ │Worker 2 │ │Worker N │ ...    │
  │   │(WASM)   │ │(WASM)   │ │(WASM)   │        │
  │   └─────────┘ └─────────┘ └─────────┘        │
  └───────────────────────────────────────────────┘

  Server-Only                P2P
  BackendUI (headless)       PeerTransport ↔ Signaling
  WebBrowser (Playwright)    IdentityObject (ECDSA/ECDH)
  WebParser (linkedom)       PeerRegistry / RemoteRegistry
                            │ WS :7719
Thin Browser Client        ▼
  FrontendClient  │  Compositor (Canvas)  │  Input handling

LLM-Generated Proxies

When Object A wants to talk to Object B with incompatible interfaces, the LLM generates a proxy object that translates between them:

Object A  ──►  Proxy Object  ──►  Object B
          ◄──  (LLM-generated)  ◄──

The proxy is a real object with a manifest, using the same message protocol.

Tech Stack

TypeScript

Runtime & language

Vite

Build tooling

WASM

Sandboxed execution

WebSocket

Client-server transport

Canvas

X11-style compositor

WebRTC

Peer-to-peer channels

Web Crypto

ECDSA, ECDH, AES-256-GCM

Playwright

Headless browser automation

Quick Start

terminal
# Clone the repository (coming soon)
git clone https://github.com/mempko/abjects
cd abjects

# Install dependencies
pnpm install

# Start Node.js backend
pnpm serve

# Start thin browser client (new terminal)
pnpm client          # http://localhost:5173

# Start P2P signaling server (new terminal)
pnpm signal          # :7720

Three processes, one system

The backend runs all Abjects — Registry, Factory, LLM, Negotiator, and your custom objects — in a Node.js process with worker threads.

The browser client is a thin Canvas renderer that forwards input events and displays composited frames over WebSocket.

The signaling server enables peer discovery for WebRTC connections between Abjects instances.

Capability Objects

Built-in objects that provide system capabilities to sandboxed WASM objects:

Object Description
HttpClient HTTP requests with domain allow/deny rules
Storage Persistent key-value store (IndexedDB-backed)
Timer Scheduling, delays, and intervals
Clipboard System clipboard access
Console Debug logging and output
FileSystem Virtual filesystem operations
WebBrowser Headless browser automation (Playwright, server-only)
WebParser HTML parsing and content extraction (linkedom, server-only)

Configuration

Set environment variables before running pnpm serve. For local LLM, run Ollama on localhost:11434.

Variable Default Description
ANTHROPIC_API_KEY Anthropic Claude API key
OPENAI_API_KEY OpenAI API key
WS_PORT 7719 WebSocket port for client connection
SIGNALING_PORT 7720 Signaling server port for P2P discovery
ABJECTS_DATA_DIR .abjects Persistent storage directory
ABJECTS_WORKER_COUNT CPU cores - 1 Worker thread pool size (max 8)