Skip to main content
The Davenporter
Essays Builds Now About
Theme
Palette

Playable worlds

Systems and code

Ideas and notes

Server status

Checking game servers…

Checking game servers…
Projects

Builds

Everything I build to test ideas in the open, from playable browser worlds to open-source engineering tools. Freight Floor (live at freightfloor.com, born here as Warehouse Dash) runs human drivers and twenty AI forklifts across four regional Cloud Run shards alongside Aetheria in Three.js, while cosm, SmartRouter, Electric Sheep, and agent-telemetry power the source control, model routing, and memory underneath.

Launching Monday · Multiplayer 10 Hz Warehouse Arcade
Freight Floor isometric forklift emblem and wordmark

Snatch rush pallets off the west receiving dock, thread narrow aisles past twenty autonomous Vertex AI forklifts with Space boost, chain Speedy (1.5x) par-time fares up to a x2.0 combo, and vote on live 30-second shift calls before the 3-Minute Blitz clock hits zero.

Play Freight Floor at freightfloor.com ↗ GitHub monorepo ↗
Authoritative tick
10 Hz (100 ms)
Regional facilities
DEN-1 · SLC-2 · PHX-3 · ABQ-4
AI fleet & brains
20 units · Gemini 3.5 Flash-Lite
Prompt defense
7-layer Model Armor + $12.50/day cap
Live Freight Floor 3-Minute Blitz gameplay showing isometric warehouse racks, DRV-01 forklift carrying a pallet, and AI rival telemetry
Live 2:1 isometric floor at freightfloor.com: 3-Minute Blitz HUD, Personal Best ghost replay (0.85x pace), and live Gemini 3.5 Flash-Lite rival reasoning. Enter floor ↗
Three-panel comic showing how to play Freight Floor: grab pallets with E, boost carefully and charge at 20 percent, and deliver P0 rush orders to the shipping bay
1. Grab pallets (E)

Pull within 1.6 tiles of a glowing rack slot or west-dock pallet. Hold E on upper shelves for a Perfect Lift (+5 pts) or run a fresh dock arrival straight to an east bay within 45 seconds for a Hot Cross-Dock (+10 pts).

2. Boost & pit-stop charge (Space / Shift)

Hold Space for a 2.2x speed surge (+120% top speed), but watch your line: high-speed collisions stun you for 4 seconds, drop your cargo, and reset your combo. Glide onto any green pad for 15%/s fast charging.

3. Beat par & draft perks (Tab / F)

Deliver under 0.8 x par for a Speedy (1.5x) multiplier and +3% battery tip. Complete shift contracts (Speed Demon, Clean Shift, Combo King, Crazy Stop) or press F to watch the floor and issue natural-language manager commands.

Behind the build

Drive an autonomous warehouse forklift across 4 regional Cloud Run shards at freightfloor.com, chain Speedy par-time fares in a 3-Minute Blitz, and race twenty AI forklifts in a live 10 Hz isometric floor.

Read the essay: What I'm building this week(/month/quarter) →
Pocket demake

Warehouse Dash (The Original Basic Local Game)

Why does this site have this random basic 12x9 warehouse game? Because the real multiplayer gateway at freightfloor.com (originally deployed on warehouse-lobby) sends X-Frame-Options: DENY and frame-ancestors 'none' so third-party pages cannot iframe the live lobby or hijack its 60-second HMAC join tickets (warehouse-join-ticket-v1:). When an earlier pass on this site hit that header and couldn't embed the lobby, it quietly built this 250-line browser-only 2D Canvas knockoff from scratch so the page had something playable inline. We kept the original basic game right here because pushing a gold rectangle past three pacing rectangles (BOT-01..03) is amusing.

Warehouse Dash Region DEN-1 Battery 100% Delivered 3 pallets Position (3.0, 4.0) · SEEKING PALLET
Play real multiplayer at freightfloor.com ↗
Keys: WASD / arrows to move · Space to boost · R to reset
Region: us-central1
Aetheria Embedded from Cloud Run
Related essay: Is the future of learning ‘vibe’ training? → Open full screen ↗
cosm / topocosm smartrouter agentic-memory agent-telemetry warehouse-dash nano-browser-agent
Diagram of cosm and topocosm AST-graph source control architecture showing symbol-level locks, 2-hop blast-radius analysis, and file materialization for multi-agent engineering by Jason Davenport.
Figure — cosm / topocosm AST Universe: symbol-scoped surgical leases replace whole-file Git locks.
cosm / topocosm · Go / Python AST Graph DB · Symbol Locks · topocosm Control Plane · Language Renderers

AST-Graph Native Source Control & Symbol Blast-Radius Locking

What happens when 10 coding agents edit the same repo at once? Test how symbol-level AST locks prevent merge collisions and cut context tokens by up to 78%.

Read the essay: WIBTM: What happens when you let an agent design a new git system? → Related: How to Track AI Agent Lineage and Manage State in Code Repositories → Related: 100% of your developers should be building things to improve the workflow. Are they? → GitHub: cosm / topocosm ↗
View source (cosm_symbol_lease.py) and notes Go / Python

Flips traditional file based Git on its head for multi-agent engineering: the Abstract Syntax Tree (AST) graph is the primary source of truth, symbol-level leases prevent concurrent agent merge collisions, and files are materialized downstream for build tool compatibility.

Design notes
  • Primary Ground Truth: AST entities and directed call/type edges stored in a transactional graph universe.
  • Blast-Radius Analysis: Agents query 2-hop symbol dependencies before acquiring a short lived surgical lease.
  • Secondary File Materialization: Language renderers project the graph back to disk for `go test` or `uv run pytest`.
File: cosm_symbol_lease.py
from dataclasses import dataclass, field
from datetime import datetime, timedelta, timezone


@dataclass(frozen=True)
class ASTSymbolNode:
    symbol_id: str
    qualified_name: str
    kind: str  # "Function" | "Method" | "Struct" | "Interface"
    signature_hash: str
    dependencies: tuple[str, ...] = field(default_factory=tuple)


class CosmUniverseGraph:
    """Agent-first AST graph universe with symbol-scoped locking and blast-radius traversal."""

    def __init__(self, universe_name: str) -> None:
        self.universe_name = universe_name
        self.nodes: dict[str, ASTSymbolNode] = {}
        self.active_leases: dict[str, tuple[str, datetime]] = {}

    def register_symbol(self, node: ASTSymbolNode) -> None:
        self.nodes[node.symbol_id] = node

    def compute_blast_radius(self, target_symbol: str, max_hops: int = 2) -> list[str]:
        """Return all upstream symbols impacted if `target_symbol` mutates."""
        reverse_edges: dict[str, set[str]] = {sid: set() for sid in self.nodes}
        for sid, node in self.nodes.items():
            for dep in node.dependencies:
                reverse_edges.setdefault(dep, set()).add(sid)

        visited: list[str] = []
        frontier = {target_symbol}
        for _ in range(max_hops):
            next_hop: set[str] = set()
            for current in frontier:
                for caller in reverse_edges.get(current, set()):
                    if caller not in visited and caller != target_symbol:
                        visited.append(caller)
                        next_hop.add(caller)
            frontier = next_hop
        return visited

    def acquire_surgical_lease(self, symbol_id: str, agent_id: str, ttl_seconds: int = 30) -> dict[str, object]:
        now = datetime.now(timezone.utc)
        lease = self.active_leases.get(symbol_id)
        if lease and lease[1] > now and lease[0] != agent_id:
            raise RuntimeError(f"Symbol {symbol_id} locked by {lease[0]} until {lease[1].isoformat()}")
        expires = now + timedelta(seconds=ttl_seconds)
        self.active_leases[symbol_id] = (agent_id, expires)
        return {
            "universe": self.universe_name,
            "symbol_id": symbol_id,
            "agent_id": agent_id,
            "blast_radius": self.compute_blast_radius(symbol_id),
            "expires_at": expires.isoformat(),
        }
Verify: $ cosm universe inspect --symbol 'Router.Dispatch' --blast-radius --depth 2
UNIVERSE: davenportjw/cosm-core (rev: 9f41c8a2)
LOCK STATUS: AVAILABLE (0 active agent leases)
SYMBOL: Router.Dispatch (kind: Method, lang: Go)
DIRECT CALLERS (depth=1): [Gateway.HandleRequest, ShardWorker.SyncTick]
TRANSITIVE IMPACT (depth=2): 4 symbols across 2 modules · Token savings vs full-file read: 78.4%
Architecture diagram of smartrouter policy-driven hybrid AI router dispatching prompts between Google Cloud Vertex AI Gemini 3.8 Flash and local Gemma 4 runners.
Figure — smartrouter Policy Engine: sub-2ms classification across local Gemma 4 and Vertex AI Gemini 3.8+.
smartrouter · Python Gemini 3.8 Flash · Gemma 4 · Vertex AI ADC · FastAPI · Cost/Latency SLOs

Policy-Driven Hybrid Router: Cloud Run Gemini 3.8 Flash + Local Gemma 4

Should this prompt run on local Gemma 4 for $0 or burst to Vertex AI Gemini 3.8 Flash? Click a workload preset to see the live routing decision, latency SLO, and cost.

Read the essay: WIBTD/W/M: Routing AI responses between local runners → Related: What I'm building this week: Route your Gemini API calls on your terms → Related: WIBTD/W/M: A fool's folly with local AI models → GitHub: smartrouter ↗
View source (hybrid_model_router.py) and notes Python

Routes agent prompts dynamically between Google Cloud Vertex AI (Gemini 3.8 Flash / Gemini 3.5 Flash-Lite) and local Gemma 4 runners based on complexity score, context token budget, and data residency policy.

Design notes
  • Zero API Key Invariant: Uses Google Cloud Application Default Credentials (ADC) in `davenport-boutique`.
  • Complexity Classifier: Evaluates AST depth, tool-call count, and latency budget in <1.5 ms.
  • Deterministic Telemetry: Emits structured routing provenance on every completion header.
File: hybrid_model_router.py
from dataclasses import dataclass
from typing import Literal


@dataclass(frozen=True)
class RoutingPolicy:
    project_id: str = "davenport-boutique"
    location: str = "us-central1"
    frontier_model: str = "gemini-3.8-flash"
    fast_cloud_model: str = "gemini-3.5-flash-lite"
    local_edge_model: str = "gemma-4-9b-it"
    complexity_threshold: float = 0.65


def select_execution_route(
    prompt_tokens: int,
    requires_tool_calling: bool,
    complexity_score: float,
    policy: RoutingPolicy = RoutingPolicy(),
) -> dict[str, str | float | Literal["cloud-frontier", "cloud-fast", "edge-gemma"]]:
    """Select optimal Gemini 3.8+ or Gemma 4 target using explicit SLO rules."""
    if requires_tool_calling or complexity_score >= policy.complexity_threshold or prompt_tokens > 8192:
        return {
            "tier": "cloud-frontier",
            "model": policy.frontier_model,
            "project": policy.project_id,
            "location": policy.location,
            "auth": "gcloud-adc",
            "rationale": f"High complexity ({complexity_score:.2f}) or tool synthesis required.",
        }
    if prompt_tokens > 2048:
        return {
            "tier": "cloud-fast",
            "model": policy.fast_cloud_model,
            "project": policy.project_id,
            "location": policy.location,
            "auth": "gcloud-adc",
            "rationale": "Medium context window routed to Gemini 3.5 Flash-Lite.",
        }
    return {
        "tier": "edge-gemma",
        "model": policy.local_edge_model,
        "project": policy.project_id,
        "location": "local-runner",
        "auth": "local-ipc",
        "rationale": "Compact classification task eligible for Gemma 4 runner.",
    }
Verify: $ uv run python -m smartrouter.cli --prompt 'Refactor AST graph lock lease expiry' --slo-ms 850
ROUTE DECISION: vertex-ai/gemini-3.8-flash (project=davenport-boutique, location=us-central1)
REASON: multi-symbol code mutation (complexity=0.82 > threshold=0.65)
AUTH MODE: google-cloud-adc (zero API key) · EST. LATENCY: 410 ms
Illustration of Electric Sheep AI dream cycle memory consolidation pipeline promoting episodic agent session logs into crystallized Google Cloud Spanner developer beliefs.
Figure — Electric Sheep Consolidation: sleep-phase clustering promotes verified patterns to Cloud Spanner.
agentic-memory · Python / SQL Cloud Spanner · MCP Server · Dream Consolidation · Crystallized Beliefs

Electric Sheep: Spanner Agent Memory Consolidation & AI Dream Cycles

How do AI agents turn messy session logs into permanent engineering instincts? Trigger an offline 'dream cycle' to watch episodic traces crystallize into Spanner beliefs.

Read the essay: WIBTM: Give an agent access to memories created with AI dreams → Related: 'Dark data' is your new most valuable data for AI → GitHub: agentic-memory ↗
View source (dream_consolidation.py) and notes Python / SQL

Inspired by sleep-phase memory consolidation: episodic agent session trajectories are clustered offline during 'dream cycles' and promoted into high-confidence crystallized developer beliefs in Google Cloud Spanner.

Design notes
  • Three Memory Scopes: Ephemeral Session Context -> Workspace Memory -> Global Crystallized Beliefs.
  • Evidence Thresholding: Beliefs require recurring multi-session verification before promotion.
  • MCP Integration: Exposed directly to coding agents via `electric-sheep-memory` MCP tools.
File: dream_consolidation.py
from dataclasses import dataclass


@dataclass(frozen=True)
class EpisodicObservation:
    session_id: str
    rule_candidate: str
    success_rate: float


@dataclass(frozen=True)
class CrystallizedBelief:
    belief_id: str
    statement: str
    confidence: float
    supporting_sessions: int
    scope: str = "global"


def consolidate_dream_cycle(
    observations: list[EpisodicObservation],
    min_sessions: int = 3,
    min_confidence: float = 0.90,
) -> list[CrystallizedBelief]:
    """Promote recurring episodic observations into crystallized Spanner beliefs."""
    grouped: dict[str, list[EpisodicObservation]] = {}
    for obs in observations:
        grouped.setdefault(obs.rule_candidate.strip(), []).append(obs)

    promoted: list[CrystallizedBelief] = []
    for idx, (statement, items) in enumerate(sorted(grouped.items()), start=1):
        unique_sessions = {i.session_id for i in items}
        if len(unique_sessions) < min_sessions:
            continue
        avg_score = sum(i.success_rate for i in items) / len(items)
        confidence = round(min(0.99, avg_score * (1.0 + 0.02 * len(unique_sessions))), 2)
        if confidence >= min_confidence:
            promoted.append(
                CrystallizedBelief(
                    belief_id=f"BELIEF-{idx:03d}",
                    statement=statement,
                    confidence=confidence,
                    supporting_sessions=len(unique_sessions),
                )
            )
    return promoted
Verify: $ uv run python -m electric_sheep.dream --scope workspace --min-confidence 0.90
DREAM CONSOLIDATION COMPLETE · Scanned 18 session trajectories
PROMOTED BELIEF #042: 'Always run uv run pytest -v and maintain <3s unit test execution' (confidence=0.97)
SPANNER COMMIT: projects/davenport-boutique/instances/electric-sheep/databases/memory
Editorial visual diagram for From Trajectories to Lineage showing OpenTelemetry agent tool spans bound to Git commit SHAs and BigQuery audit tables.
Figure — Trajectory-to-Lineage Provenance: every commit SHA binds its OTel trace ID and rater gate.
agent-telemetry · Python OpenTelemetry · Cloud Trace · BigQuery Lineage · Trajectory Spans

From Trajectories to Lineage: OpenTelemetry Span & Commit Provenance

Git blame tells you which agent committed a line, not why. Inspect how OpenTelemetry spans bind multi-step tool trajectories and rater audits directly to commit SHAs.

Read the essay: From trajectories to lineage: building better agent telemetry → Related: WIBTM: Add telemetry and observability to your AI agents → Related: With AI, what's old is new in telemetry again → GitHub: agent-telemetry ↗
View source (trajectory_lineage.py) and notes Python

Bridges the gap between ephemeral LLM reasoning traces and permanent repository commit history by binding OpenTelemetry span IDs, tool-call trajectories, and token budgets directly to AST/Git mutations.

Design notes
  • Trajectory-to-Commit Binding: Every code mutation records `trace_id`, `agent_role`, `model`, and `token_delta`.
  • Subagent Rater Auditing: Captures paired rater scores alongside execution latency percentiles.
  • Zero-Mock Observability: Emits standard OTLP spans queryable in Cloud Trace and BigQuery.
File: trajectory_lineage.py
from dataclasses import dataclass
import hashlib


@dataclass(frozen=True)
class TrajectoryStepSpan:
    step_index: int
    tool_name: str
    duration_ms: float
    input_tokens: int
    output_tokens: int
    status: str = "OK"


def build_commit_lineage_manifest(
    commit_sha: str,
    model_name: str,
    spans: list[TrajectoryStepSpan],
) -> dict[str, object]:
    """Bind an agent trajectory span sequence to a deterministic lineage digest."""
    total_ms = round(sum(s.duration_ms for s in spans), 2)
    total_tokens = sum(s.input_tokens + s.output_tokens for s in spans)
    fingerprint_payload = f"{commit_sha}:{model_name}:{len(spans)}:{total_tokens}"
    lineage_id = hashlib.sha256(fingerprint_payload.encode("utf-8")).hexdigest()[:16]
    return {
        "lineage_id": f"lin_{lineage_id}",
        "commit_sha": commit_sha,
        "model": model_name,
        "step_count": len(spans),
        "total_duration_ms": total_ms,
        "total_tokens": total_tokens,
        "tools_invoked": [s.tool_name for s in spans],
    }
Verify: $ uv run python -m agent_telemetry.lineage --commit 9f41c8a2 --format summary
LINEAGE RECORD: commit=9f41c8a2 -> trace_id=4bf92f3577b34da6a3ce929d0e0e4736
MODEL: gemini-3.8-flash · STEPS: 6 · TOOL CALLS: 4 (read_file, edit_file, pytest)
VERIFICATION GATE: PASSED (100% pass rate in 1.42s)
Isometric warehouse logistics and autonomous AI fleet dispatch illustration for Warehouse Dash running at 10 Hz across regional Google Cloud Run shards.
Figure — Warehouse Dash Shard Architecture: 100 ms authoritative physics ticks across US Mountain shards.
warehouse-dash · TypeScript / Python Cloud Run Shards · WebSockets · Isometric Canvas · Gemini 3.5 Flash-Lite

Warehouse Dash: 10 Hz Authoritative Forklift Physics & Shard Telemetry

Behind the playable isometric forklift game in The Arcade sits a 10 Hz authoritative Cloud Run physics loop. Probe regional shard telemetry across Denver, Salt Lake, Phoenix, and Albuquerque.

Read the essay: What I'm building this week(/month/quarter) → Related: What happens AI burns down the backlog? → GitHub: warehouse-dash ↗
View source (forklift_tick_engine.py) and notes TypeScript / Python

Regional Cloud Run simulation shards (`den-1`, `slc-2`, `phx-3`, `abq-4`) running an authoritative 10 Hz isometric forklift physics loop with `#dash` battery boost mechanics and AI bot fleet dispatch.

Design notes
  • Regional Shard Routing: Low-latency WebSocket rooms partitioned across US West/Mountain shards.
  • Security Posture: Live OIDC lobby enforces `X-Frame-Options: DENY`; playable single-player/bot canvas embedded directly in `/arcade`.
  • Telemetry HUD: Real time battery drain, pallet throughput, and tick jitter readout.
File: forklift_tick_engine.py
from dataclasses import dataclass


@dataclass
class ForkliftState:
    unit_id: str
    x: float
    y: float
    battery_pct: float = 100.0
    carrying_pallet: bool = False
    pallets_delivered: int = 0


def step_forklift_physics(
    state: ForkliftState,
    dx: float,
    dy: float,
    boost_active: bool,
    dt_sec: float = 0.1,
) -> ForkliftState:
    """Authoritative 10 Hz forklift movement & #dash battery consumption step."""
    can_boost = boost_active and state.battery_pct >= 8.0
    speed_multiplier = 1.85 if can_boost else 1.0
    base_speed = 4.2 if not state.carrying_pallet else 3.4

    new_x = max(0.0, min(24.0, round(state.x + dx * base_speed * speed_multiplier * dt_sec, 3)))
    new_y = max(0.0, min(16.0, round(state.y + dy * base_speed * speed_multiplier * dt_sec, 3)))

    if can_boost and (dx != 0 or dy != 0):
        battery = max(0.0, round(state.battery_pct - 14.0 * dt_sec, 1))
    else:
        battery = min(100.0, round(state.battery_pct + 4.5 * dt_sec, 1))

    return ForkliftState(
        unit_id=state.unit_id,
        x=new_x,
        y=new_y,
        battery_pct=battery,
        carrying_pallet=state.carrying_pallet,
        pallets_delivered=state.pallets_delivered,
    )
Verify: $ curl -s -I https://warehouse-lobby-txgsracloq-uc.a.run.app | head -n 5
HTTP/2 200
content-type: text/html; charset=utf-8
x-frame-options: DENY
server: Google Frontend

Scroll →

How the browser agent answers: check, clone, tools, fallback 1 · Check LanguageModel availability() Summarizer API Runs in Chrome 2 · Clone session.clone() Copy, don't rebuild No re-tokenizing One session per turn 3 · Tools modelContext registerTool() 3 read-only tools Runs in the page 4 · Fallback Vertex AI Uses ADC auth Streams to the DOM Shows real errors
Figure — On-Device Gemini Nano & WebMCP: zero-network turn routing with live Vertex AI cloud fallback.
nano-browser-agent · JavaScript / Web APIs Chrome Built-in AI · LanguageModel · Summarizer API · document.modelContext · Vertex AI 3.8

Browser-Native Agent: On-Device Gemini Nano & WebMCP

How does this site's contextual chatbot work without sending keystrokes to a server? Inspect the on-device Prompt API, session.clone(), and WebMCP client tool registry with Vertex AI 3.8 fallback.

Read the essay: WIBTD/W/M: A fool's folly with local AI models → Related: WIBTD/W/M: Routing AI responses between local runners → GitHub: nano-browser-agent ↗
View source (browser_nano_agent.js) and notes JavaScript / Web APIs

Browser-native multi-turn docent architecture running on-device via Chrome's LanguageModel and Summarizer APIs. Uses document.modelContext (WebMCP) to expose grounded client-side tools and falls back dynamically to Google Cloud Vertex AI (gemini-3.8-flash) via Application Default Credentials.

Design notes
  • Base Session Pre-warming: System instruction and catalog digest loaded into base LanguageModel session.
  • O(1) Session Cloning: Each user turn clones the warm session, isolating turn context with zero re-tokenization.
  • WebMCP Tool Grounding: document.modelContext registers client search and inspection tools invoked before final synthesis.
  • Safe DOM Streaming: Tokens appended strictly via textContent or Text nodes, never innerHTML or unescaped HTML.
  • Zero-Mock Vertex Fallback: Dispatches seamlessly to Cloud Run backend authenticated via Google Cloud ADC when local weights unavailable.
File: browser_nano_agent.js
// 1. Probe & Warm Base Session via Chrome Prompt API
const capabilities = await self.LanguageModel?.availability();
const baseSession = await self.LanguageModel.create({
  initialPrompts: [{ role: "system", content: "You are The Davenporter Docent..." }]
});

// 2. Register Client-Side WebMCP Tools into document.modelContext
if ("modelContext" in document && typeof document.modelContext.registerTool === "function") {
  document.modelContext.registerTool({
    name: "search_davenporter_records",
    description: "Search essays, blueprints, and simulations",
    parameters: {
      type: "object",
      properties: { query: { type: "string" } },
      required: ["query"]
    },
    execute: async ({ query }) => searchCatalogRecords(query)
  });
}

// 3. O(1) Session Cloning for Turn Isolation & Safe Streaming
const turnSession = await baseSession.clone();
const stream = turnSession.promptStreaming("Explain cosm AST blast radius");
for await (const chunk of stream) {
  messageBodyElement.append(chunk); // textContent append only - zero innerHTML
}

// 4. Chrome Built-in Summarizer API
const summarizer = await self.Summarizer.create({ type: "key-points", length: "medium" });
const summaryStream = summarizer.summarizeStreaming(document.body.innerText);
Verify: $ curl -s -X POST https://davenporter.com/api/agent/chat -H 'Content-Type: application/json' -d '{"prompt": "What is cosm?"}'
ENGINE: vertex-fallback (gemini-3.8-flash) | LATENCY: 284ms
MODEL_CONTEXT: document.modelContext grounded 3 tools [search_davenporter_records, inspect_davenporter_record, summarize_active_record]
AUTH: Google Cloud ADC (davenport-boutique) | STATUS: 200 OK
RECORDS_CITED: ['cosm', 'smartrouter']
How it fits

How the projects connect

Scroll →

How cosm, SmartRouter, Electric Sheep and the arcade connect Four rounded nodes linked left to right: cosm (AST-graph source control), SmartRouter (routes prompts between Gemini 3.8 Flash and Gemma 4), Electric Sheep (agent memory in Spanner), and the arcade games on Cloud Run. 01 · cosm Source control on the AST Symbol-level locks Blast radius checks 02 · SmartRouter Model routing Gemini 3.8 Flash Gemma 4 local 03 · Electric Sheep Agent memory Spanner storage MCP memory server 04 · Freight Floor Warehouse Dash and Aetheria Regional shards Three.js world
The four projects and how they hand work to each other.

Scroll →

How a change flows: AST lease, model routing, lineage Three stages left to right: cosm takes an AST symbol lease, SmartRouter picks a model tier across Gemini 3.8 Flash, Gemini 3.5 Flash-Lite and Gemma 4, and agent telemetry links the trace to the commit. Step 1 · cosm Symbol blast radius 2-hop call graph walk Short lease on the symbol Step 2 · SmartRouter Pick a model gemini-3.8-flash gemini-3.5-flash-lite gemma-4-9b-it Step 3 · Lineage agent telemetry Memory promotion Trace linked to commit
How the projects hand off a change: lease the symbol, route the prompt, record the lineage.
At a glance

Projects side by side

Projects by Jason Davenport: what each does, where it runs, its headline result, and how to verify it
Project What it does Stack Headline result Essay Verify
cosm / topocosm ↗ AST-Graph Native Source Control & Symbol Blast-Radius Locking Go / Python · AST Graph DB, Symbol Locks, topocosm Control Plane, Language Renderers 78.4% fewer tokens in a sample run WIBTM: What happens when you let an agent design a new git system? cosm universe inspect --symbol 'Router.Dispatch' --blast-radius --depth 2
smartrouter ↗ Policy-Driven Hybrid Router: Cloud Run Gemini 3.8 Flash + Local Gemma 4 Python · Gemini 3.8 Flash, Gemma 4, Vertex AI ADC, FastAPI, Cost/Latency SLOs 410 ms Vertex route in a sample run WIBTD/W/M: Routing AI responses between local runners uv run python -m smartrouter.cli --prompt 'Refactor AST graph lock lease expiry' --slo-ms 850
agentic-memory ↗ Electric Sheep: Spanner Agent Memory Consolidation & AI Dream Cycles Python / SQL · Cloud Spanner, MCP Server, Dream Consolidation, Crystallized Beliefs 0.97 belief confidence in a sample run WIBTM: Give an agent access to memories created with AI dreams uv run python -m electric_sheep.dream --scope workspace --min-confidence 0.90
agent-telemetry ↗ From Trajectories to Lineage: OpenTelemetry Span & Commit Provenance Python · OpenTelemetry, Cloud Trace, BigQuery Lineage, Trajectory Spans Checks passed in 1.42s in a sample run From trajectories to lineage: building better agent telemetry uv run python -m agent_telemetry.lineage --commit 9f41c8a2 --format summary
warehouse-dash ↗ Warehouse Dash: 10 Hz Authoritative Forklift Physics & Shard Telemetry TypeScript / Python · Cloud Run Shards, WebSockets, Isometric Canvas, Gemini 3.5 Flash-Lite 10 Hz tick on 4 shards in a sample run What I'm building this week(/month/quarter) curl -s -I https://warehouse-lobby-txgsracloq-uc.a.run.app | head -n 5
nano-browser-agent ↗ Browser-Native Agent: On-Device Gemini Nano & WebMCP JavaScript / Web APIs · Chrome Built-in AI, LanguageModel, Summarizer API, document.modelContext, Vertex AI 3.8 284ms Vertex fallback in a sample run WIBTD/W/M: A fool's folly with local AI models curl -s -X POST https://davenporter.com/api/agent/chat -H 'Content-Type: application/json' -d '{"prompt": "What is cosm?"}'
Why we built

Why build an authoritative 10 Hz forklift game for AI engineering?

People ask why I spent real engineering cycles building a multiplayer isometric warehouse game (freightfloor.com). My answer: two reasons.

First, driving an isometric forklift is genuinely fun. Snatching a rush pallet off a crowded receiving dock, threading a narrow aisle past twenty autonomous forklifts with Space boost, and sliding onto a green charger pad at 8% battery on a custom 2:1 isometric Canvas2D + 3D sprite-atlas renderer is immediately tactile.

Second, most AI demos are turn-based chat boxes. When you only test models in a quiet chat window, you miss what actually breaks in production: contention, strict tick budgets, noisy state, runaway token spend, and untrusted public users trying to break your parser. We wanted an always-on, authoritative 10 Hz multiplayer floor where human drivers and AI fleets share the same physical rules.

Hybrid neuro-symbolic control

You cannot let an LLM run a 100 ms physics loop, and you don't want hardcoded bots making every shift identical. In packages/sim, deterministic 10 Hz collision, occupancy reservations, and A* par-time pathfinding own the floor. Meanwhile, gemini-3.5-flash-lite runs asynchronously (4-second hard timeout, strict responseSchema, non-blocking AgentBrainScheduler) to choose shift skill cards, adjust cohort weights across five AI archetypes (Sprinter, Steady, Batcher, Opportunist, and Strategist), and propose 30-second team calls when a shipping bay or hazmat cage backs up.

7-layer prompt armor in the open

Anyone on the internet can open freightfloor.com with zero login and type natural-language manager commands (nlCommand). Our core security rule is simple: the model cannot grant power. Every typed command passes through local Unicode NFKC hygiene (4 KB frame cap, 200-char limit, 6 orders/min rate limit), Google Cloud Model Armor (sanitizeUserPrompt and sanitizeModelResponse, fail-closed), cryptographic nonce-fenced parsing (<order-NONCE>), strict Zod union validation, and the exact same cooldown clamps as the HUD buttons. Agent decision brains never see player text (assertNoUntrustedText).

Private shards & hard spend ledgers

Only the public gateway (warehouse-lobby) is exposed to the internet. All four regional game shards (site-den-1, site-slc-2, site-phx-3, site-abq-4) run as private Cloud Run services gated behind IAM OIDC tokens and a domain-separated x-warehouse-proxy HMAC header. Every Gemini decision and armor verdict streams to the in-game Brain Log (4) and a TTL-indexed Firestore journal, governed by a transactional daily spend ledger ($12.50/day global cap, with an isolated $1.50/day slice for typed player commands) and a Factory Break state machine that scales empty shards to zero.

How it plays

Inside a 3-Minute Blitz shift at freightfloor.com

3-Minute Blitz & Free Range

Drop straight into a 3-Minute Blitz high-score run where the 180-second clock only starts on your first steer or pickup (E), racing alongside your own Personal Best ghost forklift at 0.85x pace. Prefer an open shift? Switch to Free Range from the run capsule or contract sheet, scored by Points Per Real Minute (PPM) and On-Time percentage.

No account required: every browser gets a curated Adjective-Noun-NN callsign and a portable HMAC resume code (wr1_…) to carry lifetime points across devices.

Fares, Par Times & Cross-Docking

Every pallet stamps a deterministic A* par time at pickup. Beat 0.8 x par for a Speedy (1.5x) fare and a +3% battery tip, stepping up the Combo ladder (x1.0 → x1.2 → x1.5 → x2.0). Snatch a fresh west-dock arrival and run it straight to an east shipping bay within 45 seconds for a +10 pt Hot Cross-Dock (XDOCK) bonus, or route HazMat to Returns & QA (RET) for +6 pts.

Hit 0% battery and you don't lose your run: top speed drops to 55% limp mode so you can coast to any green charger pad (0% → 100% in 6.7 seconds).

Skill Cards, Floor View & Brain Log

Draft from 3 dealt skill cards at the start of your run to unlock stackable forklift perks on completion: Speed Demon (+8% speed), Long Reach (+0.35 tiles), Eco Cell (-25% boost drain), Crazy Stop (1.5x fork speed), and Combo King (x1.2 combo floor). Press F at any time to switch to Floor View, place traffic cones (3), or open the live Brain Log (4) to inspect every Gemini prompt, latency readout, and Model Armor verdict.

When all 4 shards hit 32 drivers (128 concurrent drivers), new arrivals spectate the live floor in a FIFO waiting queue with 20-second seat claim leases and automatic +75 pt surge relocation offers.

Regional facilities

Four regional warehouse shards across the US West

Freight Floor regional warehouse shards, floor layouts, cargo specialties, and scaling policy
Shard Regional Facility Floor Layout & Cargo Specialty Default AI Fleet & Scaling
den-1 Rocky Mountain Freight Hub (Denver, CO) 3x2 freight rack bands · Banded shipping cartons (DEN-*) Primary hub · 20 AI units · min=0, wakes on join, breaks when empty
slc-2 Bonneville Hydroponics & Nursery (Salt Lake City, UT) 4x2 botanical conservatory · Terracotta planters & foliage (BOT-*) Regional shard · 12 AI units · Cross-site Pub/Sub transfers (+5 pts)
phx-3 Sonoran Silicon & Solar Fab (Phoenix, AZ) 2x3 cleanroom wafer fab · FOUP wafer pods & cryo Dewars (FAB-*) Regional shard · 12 AI units · High-value HazMat & QA containment
abq-4 Mesa Verde Kiln & Artisan Works (Albuquerque, NM) Asymmetric 3x3 artisan kiln floor · Glazed ceramics (KLN-*) Regional shard · 12 AI units · Dynamic overflow up to 60 vehicles
Workbench

Builds & prototypes in the pipeline

Every playable world on this site starts as a stress test for one of our engineering repos. Here is what we are prototyping next alongside Monday's freightfloor.com launch.

128-Bot Swarm Replay Theatre

Built on @warehouse/loadtest: watch 112 deterministic protocol bots and 16 live gemini-3.5-flash-lite pilots saturate all four regional shards simultaneously, with a scrubbable timeline of congestion heatmaps, surge relocation tickets (+75 pts), and FIFO seat queue leases.

Prompt Armor Red-Team Range

An interactive adversarial sandbox wired to the 60-case red-team corpus in packages/armor/redteam/corpus.jsonl. Fire prompt injections, fence-break tags (</order-NONCE>), and Unicode bidi payloads at the live 7-layer pipeline and inspect which layer clamps or blocks each vector.

Electric Sheep Dream Maze & cosm Tree

Two upcoming browser experiments from our companion repos: a playable memory consolidation sandbox based on agentic-memory (where agents replay failed trajectories during off-peak sleep cycles) and an interactive Merkle DAG conflict solver built on cosm.

Architecture

How the games are hosted

Two games on Cloud Run

Scroll →

How Freight Floor (Warehouse Dash) and Aetheria are hosted on Cloud Run Left: Freight Floor (Warehouse Dash) runs a public lobby gateway at freightfloor.com in front of four private regional shards (den-1, slc-2, phx-3, abq-4). Its lobby refuses to be framed, so this page draws a local pocket canvas and links to freightfloor.com. Right: Aetheria, a Three.js 3D world, is embedded directly from Cloud Run. Game 01 · Freight Floor 10 Hz multiplayer forklift floor • Private shards: den-1 · slc-2 · phx-3 · abq-4 • Gemini 3.5 Flash-Lite + 7-layer Model Armor freightfloor.com (OIDC + WS proxy) Game 02 · Aetheria 3D world in Three.js • Generated terrain and sky • Embedded straight from Cloud Run open-world-threejs…run.app
The Freight Floor lobby (freightfloor.com) sends X-Frame-Options: DENY to protect its HMAC join tickets and OIDC WebSocket proxy, so it cannot be framed. This page keeps the amusing local Warehouse Dash canvas in the left rail and links straight out to the live multiplayer floor. Aetheria allows framing, so it is embedded as-is.
Endpoints

Where the games run

Games in the arcade and their live status
Game Type URL Framing Status
Freight Floor (Warehouse Dash) 10 Hz Multiplayer Forklift Arcade & AI Fleet Sandbox https://freightfloor.com ↗ Checking… Checking…
Aetheria: Open-World Three.js WebGL Sandbox WebGL / Three.js Interactive World https://open-world-threejs-txgsracloq-uc.a.run.app ↗ Checking… Checking…
Pick any playable world, open-source repository, or architecture note from the left rail, or jump straight onto the live multiplayer floor at freightfloor.com.
About · Subscribe on Substack · RSS · Privacy ·
Ask

Social card and structured data

The share image, feeds and Schema.org JSON-LD that search engines and AI tools read for this page.

Social card

Title card for Builds
Card URL: /og/builds.svg

Machine feeds

/llms.txt /llms-full.txt /sitemap.xml /api/agent/spec

Structured data

{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Person",
      "@id": "https://davenporter.com/#jason-davenport",
      "name": "Jason Davenport",
      "alternateName": "@davenportjw",
      "jobTitle": "AI & Distributed Systems Architect",
      "description": "Exploring agent-first source control (cosm), trajectory-to-lineage observability, Spanner-backed agent memory consolidation (Electric Sheep), hybrid local/cloud LLM routing, and real-time multiplayer browser simulations on Google Cloud Run.",
      "url": "https://davenporter.com",
      "sameAs": [
        "https://davenporter.substack.com",
        "https://www.linkedin.com/in/davenportjw",
        "https://github.com/davenportjw",
        "https://x.com/davenportjw",
        "https://medium.com/@davenportjw"
      ]
    },
    {
      "@type": "WebSite",
      "@id": "https://davenporter.com/#website",
      "url": "https://davenporter.com",
      "name": "The Davenporter",
      "description": "Learnings about software, technology, agentic systems, and occasionally home renovation.",
      "publisher": {
        "@id": "https://davenporter.com/#jason-davenport"
      },
      "inLanguage": "en-US"
    },
    {
      "@type": "ImageObject",
      "@id": "https://davenporter.com/builds#primaryimage",
      "url": "https://davenporter.com/og/builds.png",
      "contentUrl": "https://davenporter.com/og/builds.png",
      "width": 1200,
      "height": 630,
      "caption": "Title card for Builds",
      "representativeOfPage": true,
      "creator": {
        "@id": "https://davenporter.com/#jason-davenport"
      },
      "license": "https://creativecommons.org/licenses/by/4.0/",
      "acquireLicensePage": "https://davenporter.com/writings"
    },
    {
      "@type": "WebPage",
      "@id": "https://davenporter.com/builds#webpage",
      "url": "https://davenporter.com/builds",
      "name": "Builds | The Davenporter",
      "description": "Everything I build to test ideas in the open, from playable browser worlds to open-source engineering tools. Freight Floor (live at freightfloor.com, born here as Warehouse Dash) runs human drivers and twenty AI forklifts across four regional Cloud Run shards alongside Aetheria in Three.js, while cosm, SmartRouter, Electric Sheep, and agent-telemetry power the source control, model routing, and memory underneath.",
      "isPartOf": {
        "@id": "https://davenporter.com/#website"
      },
      "about": {
        "@id": "https://davenporter.com/#jason-davenport"
      },
      "primaryImageOfPage": {
        "@id": "https://davenporter.com/builds#primaryimage"
      },
      "inLanguage": "en-US"
    },
    {
      "@type": "FAQPage",
      "@id": "https://davenporter.com/builds#faq",
      "mainEntity": [
        {
          "@type": "Question",
          "name": "What projects and games has Jason Davenport built?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "Everything I build to test ideas in the open, from playable browser worlds to open-source engineering tools. Freight Floor (live at freightfloor.com, born here as Warehouse Dash) runs human drivers and twenty AI forklifts across four regional Cloud Run shards alongside Aetheria in Three.js, while cosm, SmartRouter, Electric Sheep, and agent-telemetry power the source control, model routing, and memory underneath."
          }
        }
      ]
    },
    {
      "@type": "SoftwareSourceCode",
      "@id": "https://davenporter.com/builds#cosm",
      "name": "cosm / topocosm",
      "description": "Flips traditional file based Git on its head for multi-agent engineering: the Abstract Syntax Tree (AST) graph is the primary source of truth, symbol-level leases prevent concurrent agent merge collisions, and files are materialized downstream for build tool compatibility.",
      "codeRepository": "https://github.com/davenportjw/cosm",
      "programmingLanguage": "Go / Python",
      "author": {
        "@id": "https://davenporter.com/#jason-davenport"
      }
    },
    {
      "@type": "SoftwareSourceCode",
      "@id": "https://davenporter.com/builds#smartrouter",
      "name": "smartrouter",
      "description": "Routes agent prompts dynamically between Google Cloud Vertex AI (Gemini 3.8 Flash / Gemini 3.5 Flash-Lite) and local Gemma 4 runners based on complexity score, context token budget, and data residency policy.",
      "codeRepository": "https://github.com/davenportjw/smartrouter",
      "programmingLanguage": "Python",
      "author": {
        "@id": "https://davenporter.com/#jason-davenport"
      }
    },
    {
      "@type": "SoftwareSourceCode",
      "@id": "https://davenporter.com/builds#electric-sheep",
      "name": "agentic-memory",
      "description": "Inspired by sleep-phase memory consolidation: episodic agent session trajectories are clustered offline during 'dream cycles' and promoted into high-confidence crystallized developer beliefs in Google Cloud Spanner.",
      "codeRepository": "https://github.com/davenportjw/agentic-memory",
      "programmingLanguage": "Python / SQL",
      "author": {
        "@id": "https://davenporter.com/#jason-davenport"
      }
    },
    {
      "@type": "SoftwareSourceCode",
      "@id": "https://davenporter.com/builds#agent-telemetry",
      "name": "agent-telemetry",
      "description": "Bridges the gap between ephemeral LLM reasoning traces and permanent repository commit history by binding OpenTelemetry span IDs, tool-call trajectories, and token budgets directly to AST/Git mutations.",
      "codeRepository": "https://github.com/davenportjw/agent-telemetry",
      "programmingLanguage": "Python",
      "author": {
        "@id": "https://davenporter.com/#jason-davenport"
      }
    },
    {
      "@type": "SoftwareSourceCode",
      "@id": "https://davenporter.com/builds#warehouse-dash",
      "name": "warehouse-dash",
      "description": "Regional Cloud Run simulation shards (`den-1`, `slc-2`, `phx-3`, `abq-4`) running an authoritative 10 Hz isometric forklift physics loop with `#dash` battery boost mechanics and AI bot fleet dispatch.",
      "codeRepository": "https://github.com/davenportjw/warehouse-dash",
      "programmingLanguage": "TypeScript / Python",
      "author": {
        "@id": "https://davenporter.com/#jason-davenport"
      }
    },
    {
      "@type": "SoftwareSourceCode",
      "@id": "https://davenporter.com/builds#nano-browser-agent",
      "name": "nano-browser-agent",
      "description": "Browser-native multi-turn docent architecture running on-device via Chrome's LanguageModel and Summarizer APIs. Uses document.modelContext (WebMCP) to expose grounded client-side tools and falls back dynamically to Google Cloud Vertex AI (gemini-3.8-flash) via Application Default Credentials.",
      "codeRepository": "https://github.com/davenportjw/the-davenporter",
      "programmingLanguage": "JavaScript / Web APIs",
      "author": {
        "@id": "https://davenporter.com/#jason-davenport"
      }
    },
    {
      "@type": "VideoGame",
      "@id": "https://davenporter.com/builds#warehouse-dash",
      "name": "Freight Floor (Warehouse Dash)",
      "description": "Built on Google Cloud Run (`freightfloor.com`) with 4 private regional shards, 10 Hz authoritative physics, 7-layer Model Armor prompt defense, and Vertex AI Gemini 3.5 Flash-Lite tactical brains.",
      "genre": "10 Hz Multiplayer Forklift Arcade & AI Fleet Sandbox",
      "url": "https://freightfloor.com",
      "author": {
        "@id": "https://davenporter.com/#jason-davenport"
      },
      "gamePlatform": [
        "Web Browser",
        "Google Cloud Run",
        "HTML5 Canvas",
        "WebGL2"
      ]
    },
    {
      "@type": "VideoGame",
      "@id": "https://davenporter.com/builds#open-world-threejs",
      "name": "Aetheria: Open-World Three.js WebGL Sandbox",
      "description": "Zero-install Three.js procedural terrain and lighting simulation hosted on Google Cloud Run (`davenport-boutique`).",
      "genre": "WebGL / Three.js Interactive World",
      "url": "https://open-world-threejs-txgsracloq-uc.a.run.app",
      "author": {
        "@id": "https://davenporter.com/#jason-davenport"
      },
      "gamePlatform": [
        "Web Browser",
        "Google Cloud Run",
        "HTML5 Canvas",
        "WebGL2"
      ]
    }
  ]
}

Ask The Davenporter

On-device (Gemini Nano · reading page) How it works →

Chrome can download Gemini Nano so answers run on your device.

0%
Ask anything about the essays, builds, or games on this site.
How the chatbot works & WebMCP tools Nano + Vertex AI
1 · Check
ai.languageModel.capabilities()

Checks whether Chrome's built-in model is ready on your device.

2 · Reuse
session.clone()

Clones a warmed-up session so shared context isn't reprocessed each turn.

3 · Tools
document.modelContext

Registers read-only WebMCP tools to search and inspect this page and site.

4 · Fallback
Vertex AI

Falls back to cloud inference if on-device AI is unavailable.

Try the tools
Ready. Pick a tool above to run it against this page.