V2 Rewrite · Vertex AI · GCS Handoff · RAG Memory

The Agents Survived.
The Infrastructure Didn't.

Six environmental failures. Zero prompt failures. V2 eliminates every hostile layer — no Docker, no Postgres, no n8n. Vertex AI runs the agents. GCS handles the handoff. The same three agent prompts run cloud-native, with RAG shared memory that compounds across every run.

3
RAG CorporaEach agent has its own memory. Ahab deduplicates. Nemo calibrates. Neptune varies. All three compound across every run.
2
Execution PathsNode.js for local iteration. Python ADK for hosted Agent Engine runs. Same agents, same output, different substrate.
1
OrchestratorClaude Code as Admiral. No middleware. No polling. GCS is the handoff layer. The pipeline gates each stage before the next starts.
0
Self-Hosted ServicesNo Docker. No Postgres. No n8n. No VM. Everything that failed in V1 has been removed from the architecture entirely.
Three Languages. One Pipeline.

Node.js. Python. Agent Prompts.

Cortex runs across three distinct code layers — each written in a different language, each with a different job. Node.js runs the agents through Vertex AI. Python ADK hosts the orchestrator on Agent Engine and validates every output contract with Pydantic. Agent prompts are the third language: version-controlled instruction sets that define how each agent thinks.

agents/neptune.js Node.js
Agent runtime. Each agent calls Vertex AI directly via google-auth-library. responseSchema enforcement means Neptune cannot return prose — Outreach_Bite, Neptune_Log, and funding_signal are typed fields at the API level.
agents.py Python ADK
Orchestration layer. LlmAgent definitions deploy to Google Agent Engine. Each agent gets a RagTool pointing to its Vertex AI corpus. The ADK path runs hosted — no local process needed.
REFERENCES.md → NEPTUNE_SYSTEM Agent Prompts
Instruction layer. Version-controlled, tested across 1,500 cycles, transferred verbatim from V1 to V2. The Schwartz framework, contact framing, and output contract — all written as structured natural language.
18 Failure Modes — Why We Removed It Instead of Fixing It

Every Fix Introduced A New Failure.

V1 ran 1,500 enrichment cycles across six campaigns. Every failure was documented. The pattern that emerged: fixing one layer broke another. The infrastructure was fighting itself. The decision wasn't to improve it. It was to remove it. Click a domain to filter the 18 failures by where they actually lived.

All Domains
18
Every failure was environmental. None touched the agent prompts.
🎣
Scraping
6
Aggregator URLs, hallucinated companies, exclusion lists that didn't survive a restart.
🔀
Routing / Parsing
6
n8n expression errors, duplicate rows, connection pool exhaustion, the HTTP server that serialized everything.
🔬
Output QA
6
CATALYST_STALE misses, redirect URLs, citation markers in the Bite, Neptune returning prose instead of JSON.
V1 Failure Log · 18 Entries · Scraping / Routing / Output QA
// select any failure
to open the forensic record
Claude Code Orchestration — The Admiral in Action

One Command. Three Agents. The Pipeline Runs.

Claude Code is the Admiral — it invokes Ahab, gates the handoff to Nemo, gates the handoff to Neptune, and delivers. No middleware. No server. No polling. GCS files are the only shared state between stages.

01 · Ahab Discovers
02 · Nemo Enriches
03 · Neptune Synthesizes
Python Control Layer — Schema Enforcement, State Machines, Output Contracts

Node.js Runs the Agents. Python Makes Sure They Stayed in Contract.

The Node.js pipeline writes four typed GCS files per run. Python reads them at the boundary, validates every field with Pydantic, enforces state transitions, strips Gemini citation artifacts, and validates the IPC handshake. These aren't utilities — they're the production control layer. Select a pattern to read the field notes.

All Patterns
8 patterns across 4 categories. Each solves a specific control problem in a live LLM pipeline.
🧱
Schema Enforcement
LLM output is untyped text. Revenue data needs types, enums, and constraints. Pydantic closes that gap at the GCS boundary.
⚙️
State Machines
Illegal stage transitions are impossible, not just unlikely. No lead can reach Neptune before Nemo approves it.
🧹
LLM Output Cleanup
Gemini grounding adds citation markers. Vertex AI returns redirect URLs. Both were V1 failures. These are the V2 fixes.
Python Control Layer · 8 Patterns · V2 Field Names
// select a pattern
to open the field notes

GTM Systems Engineer.
AI Workflow Architecture.

I turn messy GTM inputs into structured records, useful handoffs, and workflows that a revenue team can actually inspect, trust, and use.

Get in Touch →