Joshua Terranova
Back to highlights

Personal project

SpaAIder — Agentic Runtime

2025–Present

Projects

Local-first multi-agent runtime with persistent cross-session memory, heterogeneous clients, and Ollama-first sovereign inference.

SpaAIder is a local-first agentic runtime: TypeScript control plane for planning and delegation, Python FastAPI substrate for persistence and memory APIs, Ollama for sovereign on-device inference.

Heterogeneous clients stream intents over server-sent events to a hierarchical orchestrator with dependency-aware parallel subagent scheduling.

Journal

What I worked on during 2025–Present. Hover underlined terms for quick definitions.

Control plane vs. substrate split

SpaAIderLocal-first multi-agent runtime with persistent cross-session memory and heterogeneous clients deliberately splits concerns: the TypeScript control planeThe user-facing orchestrator layer that owns planning, delegation, and streaming event multiplexing runs runOrchestrator; the Python FastAPI substrateThe backend service owning persistence, memory APIs, and agent routes owns SQL tables, episodic store, and /api/v1/memory/recall.

OllamaSovereign local LLM inference server supplies orchestrator, subagent, and embedding models without shipping prompts to a cloud API—privacy and latency motivated the architecture.

Memory — episodic, vector, keyword fusion

MemoryManagerCoordinates SQL-backed sessions, messages, knowledge rows, and embedding storage delegates to contracted tables on SQLite/PostgreSQL. On session close, an LLM synthesizes transcripts into episodesConsolidated memory objects with summary, key facts, topics, and tone merged into durable user profiles.

Recall fuses vector, episodic, and keyword channels before each plan. ContextEngineAllocates a fixed token budget across system instructions, profile, episodic hits, and working memory plus an EmbeddingBridgeTF-IDF locally or Ollama nomic-embed-text when configured score similarity for knowledge search.

Planning, execution & IDE fork

Clients POST to /api/agent/stream; an AsyncEventQueueMultiplexes orchestration events—context fetch, plan emission, per-task status, subagent streams, final answer—over SSE keeps UIs responsive. The meta-orchestrator must emit JSON TaskPlanStructured intent with agent assignments and dependsOn DAG edges over a 135-agent type taxonomy only—no task execution in the planner.

A dependency-aware scheduler runs parallel subagents up to maxParallelTasks; critique and synthesis agents merge artifacts into one answer. A Code-OSS IDE forkEditor integration reusing the same agent stream with file, selection, and terminal context grounds coding tasks in the workspace.

Related highlights

All highlights