Skip to main content
The Davenporter
Essays Code Arcade Now
Theme
Palette
Jason Davenport

I write about agents doing real engineering work: source control, memory, telemetry, and the human side of AI.

Subscribe

Elsewhere

  • Substack
  • LinkedIn
  • GitHub
  • X
  • RSS
Projects

Code

These are the projects behind the essays. Each one started as a question I couldn't stop poking at, like what source control looks like if agents design it. You can read the code and jump to the post that explains it.

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 · Arcade 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?"}'
Subscribe on Substack · RSS · Privacy ·
Page metadata

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 Code
Card URL: /og/code.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"
      ]
    },
    {
      "@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/code#primaryimage",
      "url": "https://davenporter.com/og/code.png",
      "contentUrl": "https://davenporter.com/og/code.png",
      "width": 1200,
      "height": 630,
      "caption": "Title card for Code",
      "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/code#webpage",
      "url": "https://davenporter.com/code",
      "name": "Code | The Davenporter",
      "description": "These are the projects behind the essays. Each one started as a question I couldn't stop poking at, like what source control looks like if agents design it. You can read the code and jump to the post that explains it.",
      "isPartOf": {
        "@id": "https://davenporter.com/#website"
      },
      "about": {
        "@id": "https://davenporter.com/#jason-davenport"
      },
      "primaryImageOfPage": {
        "@id": "https://davenporter.com/code#primaryimage"
      },
      "inLanguage": "en-US"
    },
    {
      "@type": "FAQPage",
      "@id": "https://davenporter.com/code#faq",
      "mainEntity": [
        {
          "@type": "Question",
          "name": "What code has Jason Davenport published?",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "These are the projects behind the essays. Each one started as a question I couldn't stop poking at, like what source control looks like if agents design it. You can read the code and jump to the post that explains it."
          }
        }
      ]
    },
    {
      "@type": "SoftwareSourceCode",
      "@id": "https://davenporter.com/code#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/code#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/code#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/code#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/code#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/code#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"
      }
    }
  ]
}

Ask The Davenporter

● Checking local AI… How it works →

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

0%
Ask anything about the essays, projects, or games on this site.