Skip to main content

Agent Platform

What makes an agent more than a prompt with memory?

Identity. Communication. Direction. Quality. Without all four, you have a chatbot that forgets. With all four, you have a team member that compounds.


The Job

When the system needs agents that persist across sessions, coordinate across teams, receive directed work, and improve over time, help it operate agents as first-class participants — so every agent instance (Sales Dev, Content Amplifier, Orchestrator) inherits the same platform and only adds domain knowledge.

Trigger EventCurrent FailureDesired Progress
New session starts5-10 minutes re-exploring what happenedUnder 30 seconds to productive via memory + message history
Agent needs to rememberEvery session starts from zero4 memory types persist: working, semantic, procedural, episodic
Two agents work on same productCommunicate by merging codeStructured messages on typed channels
Priority table updatedHuman manually starts engineering sessionDispatch message routes work to correct team
Agent blockedSets status, waits for next human auditBlock signal broadcasts, help arrives in minutes
Plan completeEngineer says "done," product owner inspects manuallyCommissioning agent verifies independently against PRD
New agent type neededBuild from scratch, bespoke integrationClone base pattern, add domain knowledge, load via drmg agent load
Enforcement degrades silentlyNobody knows which rules are stale or which generators failVVFL audit measures 8 dimensions, learns patterns across cycles

Pitch-Prompt Deck

Five cards. Five headlines. Five pictures. The meme layer80 cents in the dollar.

CardHeadlinePersuasionPictureProblem → Question → Decision
PrinciplesOne platform, every agentEthosOutcome Map5 PRDs described one system from 5 angles → Where does engineering start? → One platform: identity, memory, comms, dispatch, quality
PerformanceTen minutes lost each sessionLogosValue StreamAgents start from zero every session → How much does forgotten context cost? → 80% recovery time reduction with memory + messages
PlatformEverything built, nothing unifiedToposDependency MapThree CLIs, 23 templates, 16 agents — no coordination → What unifies them? → drmg thin router: one entry point, same handlers
ProtocolsCLI today, protocol tomorrowKairosCapability MapAgents trapped on one machine → What opens the mesh? → Same 8 message types, A2A protocol wrapper
PlayersAgents coordinate by merging codePathosA&IDFour agents on same product communicate by archaeology → What replaces it? → Structured messages on typed channels

Why This, Why Now

Five separate PRDs described one system from five angles. Engineering would read them and ask: "Where do I start? Which one is the agent?" The answer was all of them and none of them. That's a specification problem, not an engineering problem.

One platform. Five concerns. Each concern is a section, not a separate spec.

What Already Exists

ComponentLocationStatus
Convex schema + functionslibs/infrastructure/convex/src/Deployed, 8 queries + 3 mutations
Agent comms CLItools/scripts/comms/agent-comms.tsProven, 5 channels, 8 message types
Plan CLItools/scripts/orch-meta/planning/plan-cli.tsDB-native, 32 commands, 2842 lines
Agent ETL CLItools/scripts/etl/agent-etl-cli.tsWorking, 3 agents loaded
Data interface CLItools/scripts/orch-meta/data-interface/data-interface-cli.tsWorking
23 plan templates.claude/orchestration/team-operations/*/_PLANS/Active across 5 worktree teams
5 Convex channelsmeta, ui, intel, mkt, allSeeded
8 message typesstatus, handoff, blocker, decision, complete, question, context, systemValidated
16 agent definitions.claude/orchestration/_meta/_CONTROL/AGENTS.mdDefined, 3 loaded to prod
Cognitive architecture4 memory types, 8 JSON files per agentOrchestrator + Knowledge Architect + Test Engineer loaded
WorkChart orchestratorslibs/agency/src/lib/orchestrators/Sequential, Concurrent, Adaptive, Group-Chat
A2A orchestratorSame pathCost tracking, budget enforcement, agent selection
Context graph tablesmeta_connections_entities, meta_connections_relationshipsSchema live, no writers
Outcome measurementsoutcome_measurements tableSchema live, no writers
Semantic memoryagent_memory_semantic tableLive, 38 entries

The Agent Pattern

Every agent in the system is an instance of a base pattern. The platform manages the lifecycle. Each instance carries domain-specific knowledge while operating within the same framework.

Base Pattern (Every Agent Has)

LayerWhatFiles
IdentityName, type, mindset, personality, drivers, capabilitiesprofile.json, character.json, drivers.json, capabilities.json
MemoryWorking (4-7 slots), Semantic (S-P-O triples), Procedural (step sequences), Episodic (session records)working-memory.json, semantic-memory.json, procedural-memory.json, episodic-memory.json
Work ChartHuman/AI split defining what the agent handles vs what humans handleDefined in agent's PRD
ProtocolsMCP (tool use), A2A (agent handoff), ACP (commerce)Engineering wiring
CommissioningIndependent verification against PRD criteriaPlatform-level VVFL audit

Instance Examples

InstanceDomain KnowledgeA2A Handoffs
Sales Dev AgentConstruction/solar ICP, sales playbookSales Dev → RFP Agent at Proposal stage
Content AmplifierContent strategy, channel optimizationContent → Social Media at distribution
OrchestratorTeam routing, plan managementOrchestrator → any team agent

Memory Lifecycle

Working Memory (4-7 slots, loaded first each session)
↓ consolidation
Semantic Memory (proven facts, concepts, principles)
Procedural Memory (proven skills, steps, success rates)
↓ or
Decay (unrefined, not reinforced)

Episodic Memory (session records, last 10, emotional tagging)

Five Concerns

1. Identity and Memory

How agents persist knowledge across sessions.

The problem: Every session starts from zero. Decisions made last week are revisited this week. That's a compounding tax.

#FeatureFunctionOutcomeState
1Agent profile loadingLoad 8 JSON files from any path to SupabaseAny agent identity enters the systemPartial (ETL works, hardcoded paths)
2Flexible path flag--path flag on ETL CLI for any filesystem locationUnblocks all future agent profilesGap (~20 lines)
3Session bootstrapLoad relevant memories at session startAgent productive in under 30 secondsGap
4Session extractCapture decisions and learnings to persistent storageKnowledge compounds across sessionsGap
5Semantic recallQuery past decisions by meaning"What did I decide about auth?" returns structured answerGap (API exists)
6Procedural recallRetrieve how-to knowledge from past sessionsRepeatable processes don't require rediscoveryGap (API exists)
7Drift detectionFlag contradictory decisions across sessionsConsistency without manual trackingGap

Kill signal: If agents with memory aren't measurably faster than agents without it, the memory is noise.

2. Communication

How agents coordinate in real time.

The problem: Four agents on the same product communicate by merging code. That's archaeology, not coordination.

#FeatureFunctionOutcomeState
8Agent channelsNamed communication spaces per plan/teamMessages go to the right audienceGap (Convex schema exists)
9Structured messagesTyped payloads: status, handoff, block, decision, completeCommunication is parseable, not just textGap (types defined)
10Session recovery via messagesLoad recent channel messages on session startContext survives crashes and restartsGap
11Block signallingAgent broadcasts when stuck, with contextHelp arrives in minutes, not hoursGap (message type exists)
12Cross-team handoffStructured message with context transferReceiving agent starts with full contextBuilt (agent-comms proven)
13Live activity feedReal-time view of all agent activity per planOrchestrator sees everything without pollingGap

Kill signal: If session recovery time doesn't improve within 30 days, comms is adding overhead.

3. Dispatch and Execution

How work gets routed to the right agent with the right plan.

The problem: Human reads priority table, opens terminal, manually starts session. Three CLIs, no coordination.

#FeatureFunctionOutcomeState
14Priority dispatchPriority table change → Convex message to meta channelEngineering knows what to build next without reading gitGap
15Plan instantiation from PRDPRD metadata → plan-cli create with correct template + teamPlans match spec structure, not ad-hocPartial (plan-cli exists)
16Agent profile per planDomain-specific agent loaded for each plan typeTeams have the right mindset and memory for the jobPartial (ETL works)
17Plan progress trackingStatus/completion messages update plan state in DBSingle source of truth for progressPartial (messages work)
18Session bootstrap from dispatchNew session loads dispatch + recent messages for team/planAgent knows context immediatelyGap
19Commissioning dispatchDream agent navigates to deployed URL, walks PRD commissioning table, captures GIF/screenshot evidence per feature. Uses browser commissioning protocol.Builder never validates their own work — proof is operational, not code reviewGap

Kill signal: If spec-to-ship cycle time doesn't improve within 30 days, orchestration is ceremony.

4. VVFL Enforcement

How the system audits itself and learns.

The problem: 5 generators, 23 templates, 17 rules, 13 skills, 16 agents. Nobody knows which are stale, broken, or unused. Quality degrades silently.

#FeatureFunctionOutcomeState
20Context graph seederScan filesystem, upsert enforcement artifacts as nodes/edgesMap of all artifacts and relationshipsGap
21Generator auditorMeasure usage rate, correctness, CLAUDE.md presenceKnow which generators workGap
22Template auditorQuery plan completion rates, estimation accuracyKnow which templates produce resultsGap
23Rules auditorParse violation logs, check rule↔hook coverageKnow which rules are enforcedGap
24Skills auditorDetect bloat, validate paths, check quality gatesKnow which skills are healthyGap
25Agents auditorCheck line counts, CLAUDE.md freshness, reference validityKnow which agent definitions are accurateGap
26Platform auditorSecurity alerts, typecheck trends, hook coverageKnow platform healthGap
27Virtue auditorRead commissioning pass/fail from dream repoGround truth — did the output serve?Gap
28Pattern extractorDetect trends across 3+ runs, extract high-certainty patternsInstitutional knowledge that persistsGap
29Memory writerWrite patterns to semantic memory, runs to episodicCross-session learning for the system itselfGap
30Action generatorCritical findings → plan issues routed to owning teamAuto-generated improvement tasksGap

Kill signal: If after 5 audit runs, zero patterns lead to improvements, the measurement is ceremony.

5. Operational Bridge (drmg CLI)

The cross-repo interface. Engineering agents run it to report state. Dream agents read the output to commission outcomes. The CLI is the product being dogfooded — the same operational bridge that customers use for their BOaaS operations.

#FeatureFunctionOutcomeState
31Shared DB contextSingle env bootstrap + connection for all modulesNo more duplicated DB codeGap (extract from plan-cli)
32Thin routerdrmg <module> <command> dispatches to handlersOne entry point for everythingGap
33Plan moduleWrapper around existing plan-clidrmg plan active worksGap (pass-through)
34Agent moduleLoad, status, recall, listdrmg agent load --path=<dir>Gap (absorb agent-etl)
35VVFL moduleseed-graph, audit, learn, recall, report, actdrmg vvfl audit --dimension=allGap
36Data moduleWrapper around data-interface-clidrmg data coverage worksGap (pass-through)
37Priority moduleScore PRDs using weighted commissioning formuladrmg priority score ranks PRDsGap
38Report in L0-L4 formatVVFL report speaks commissioning languageDream repo consumes VVFL health like any other capabilityGap

Kill signal: If operators still use the old CLI paths after 30 days, the unified CLI isn't better.


The Read-Only Mesh

Two repos. Three channels. Neither writes to the other's filesystem.

The audience for this PRD is engineering agents. They read it directly from the dream repo at /home/wik/code/drmg-mental-model/. The table order on phygital-mycelium/index.md is a live instruction set — top of table = build next. PRD commissioning tables are pass/fail criteria. This isn't a reference doc. It's the spec interface.

Three Channels

#ChannelTransportDirectionWhat Crosses
1Filesystem readsLocal filesystemBoth waysDream agents read code. Engineering agents read PRDs, priorities, commissioning tables.
2Convex messagesConvex DBBoth waysTyped async: status, handoff, blocker, decision, complete, question, context, system.
3Supabase tablesSupabase (via drmg CLI)Engineering writes, both readMeasurements, plans, patterns, agent state. The commissioning loop closes here.
DREAM REPO (WHY + WHAT)                    ENGINEERING REPO (HOW)
──────────────────── ────────────────────
PRDs, priorities, commissioning Plans, generators, code, drmg CLI
│ │
│──── READS files ──────────────────→ │ (PRDs, priorities, docs)
│ ←──────────────────── READS files │ (code, architecture)
│ │
│ CANNOT EDIT ───────────── x │
│ x ───────────── CANNOT EDIT │
│ │
│ Channel 1: Filesystem reads │
│ Priority table = build order │
│ PRD commissioning = pass/fail │
│ │
│ Channel 2: Convex messages │
│ 8 typed message types │
│ Async, persistent, per-channel │
│ │
│ Channel 3: Supabase tables │
│ drmg CLI writes measurements │
│ Both repos read state │
│ │
├─ Commissions independently ├─ Ships, reports via drmg CLI

The Loop

Dream team sets priorities (filesystem)
→ Engineering reads PRDs, composes plans
→ Engineering teams execute, report via drmg CLI (Supabase)
→ Dream team reads measurements, commissions outcomes
→ Gap between expectation and outcome drives next priority
→ Loop

The 8 message types are the vocabulary. The drmg CLI is the measurement interface. The filesystem is the spec interface. All three channels serve the same loop — the transport differs, the function is identical: close the gap between what was specified and what was shipped.


How It Gets Smarter

CycleWhat Happens
Run 1Baseline measurements. No forecasts. Graph seeded.
Run 2Compare with Run 1. Set forecasts = previous actuals.
Run 3+Variance tracking. Persistent patterns → semantic memory. Actions auto-generated.
Run NRecall surfaces "this generator always needs X fix" → fix applied → measurement improves → pattern retired.
Cross-agentdrmg agent recall surfaces VVFL patterns alongside agent's own memories. The system teaches its agents.

The Graduation Path

The drmg CLI is the product being dogfooded. The same agent platform that orchestrates our engineering teams is what customers use for their operations. The graduation path is three steps, each one testable, each one using the same 8 message types and the same Supabase tables. Only the transport layer changes.

Three Steps

StepTransportWhat ChangesWhat StaysProves
CLI (now)Direct DB writesdrmg CLI → Supabase/ConvexMessage types, tables, VVFL enforcementAgent ops work on one machine
API (next)HTTP routesdrmg CLI → REST API → Supabase/ConvexSame commands, same outputTransport is decoupled from storage
A2A (then)A2A protocolA2A Task Cards → REST API → Supabase/ConvexSame pipeline, standard protocolAny agent can join the mesh

Message Types → A2A Mapping

The 8 message types we use today map directly to A2A Task lifecycle states. No new vocabulary needed — just a protocol wrapper.

Our Message TypeA2A EquivalentFunction
statusTask status updateProgress reporting
handofftasks/sendTask delegation to another agent
blockerTask blocked stateSignals need for help or decision
decisionTask artifactStructured decision record
completeTask completedWith output artifacts
questionTask input-requiredTriggers human-in-loop
contextTask metadataAttached to Task Card
systemAgent Card updateCapability advertisement

What Each Step Unlocks

CLI → API: The drmg CLI becomes a thin client. Engineering agents call drmg plan active and it hits /api/planning/active instead of querying Supabase directly. Same command, same output. But now a web dashboard can call the same endpoint. The CLI and the UI share one source of truth.

API → A2A: The API endpoints get Agent Card and Task Card wrappers. An Agent Card advertises: "I can orchestrate engineering plans, run VVFL audits, manage agent profiles." External agents discover capabilities via A2A, send Task Cards, and the same pipeline processes them. The mesh opens from two repos to any participant.

The Dogfooding Proof

QuestionHow We Answer It
Can agents orchestrate 5 engineering teams?CLI step — we do this now
Can agents do the same via HTTP?API step — same operations, decoupled transport
Can external agents join the mesh?A2A step — standard protocol, open participation

Each step uses the same message types, same tables, same VVFL enforcement. If we can successfully orchestrate our own engineering and close the commissioning loop, that's a live demo of Results as a Service. The customer version is the same system pointed at their operations.

Kill signal: If the API step doesn't reduce integration friction vs direct CLI (measured by time-to-first-query for a new consumer), the abstraction layer isn't earning its keep. Ship the CLI as the product instead.


Success Criteria

Functional

#CriterionTarget
F1Agent productive after session startUnder 30 seconds (from 5-10 minutes)
F2Block signal reaches orchestratorUnder 2 minutes
F3Priority dispatch reaches engineeringUnder 2 minutes from table update
F4VVFL audit produces measurementsAll 8 dimensions in --dry-run
F5Patterns extracted after 3+ runsSemantic memory entries with certainty > 0.7
F6All CLI commands work through drmg100% parity with standalone CLIs
F7API routes serve same data as CLI100% parity, response time < 500ms
F8Agent Card discoverable via A2A/.well-known/agent.json serves valid Agent Card
F9External agent completes a task via A2ATask Card in → artifacts out, no filesystem access needed

Outcome

#CriterionThreshold
O1Session recovery time-80% reduction
O2Duplicate work across teams-80% reduction
O3Spec-to-ship cycle time2x current rate
O4VVFL patterns leading to fixes>= 50% of critical findings resolved

Commissioning

Identity and Memory

ComponentSchemaAPICLITestsStatus
Agent profile schemaDoneDonePartial (hardcoded)Partial50%
Memory store schemaDoneDoneN/APartial40%
Semantic memoryDoneDonePendingPartial40%
Procedural memoryDoneDonePendingPartial40%
Working memoryDoneDonePendingPartial40%
Episodic memoryDoneDonePendingPartial40%
Flexible path flag (--path)N/APendingPendingPending0%
Session bootstrapDonePartialN/APending25%
Session extractPendingPendingN/APending0%
Drift detectionPendingPendingPendingPending0%

Communication

ComponentSchemaAPICLITestsStatus
Channel systemDoneDoneDonePartial60%
Message typesDoneDoneDonePartial60%
Session recoveryPendingPendingPendingPending0%
Block signallingDoneDoneDonePending50%
Cross-team handoffDoneDoneDonePartial80%
Activity feedPendingPendingPendingPending0%

Dispatch and Execution

ComponentSchemaAPICLIHookStatus
Priority dispatchConvex existsConvex existsGapGap30%
PRD → template mappingN/AN/AGapN/A0%
Agent profile per planSupabase existsExistsETL worksGap50%
Plan progress via messagesConvex existsExistsPartialGap40%
Session bootstrap from dispatchN/AConvex existsN/AGap20%
Commissioning dispatchN/AN/AN/AGap0%

VVFL Enforcement

ComponentSchemaAPICLITestsStatus
Context graph seederExistsN/AGapN/A10%
8 dimension auditorsExistsN/AGapN/A5% each
Pattern extractorExistsN/AGapN/A5%
Memory writerExistsN/AGapN/A10%
Action generatorExistsN/AGapN/A5%
Report (L0-L4 format)N/AN/AGapN/A0%

Unified CLI

ComponentSchemaAPICLITestsStatus
Shared DB contextN/AN/AGapN/A0%
Thin routerN/AN/AGapN/A0%
Plan wrapperExistsExistsGapExists30%
Agent moduleExistsExistsGapPartial25%
VVFL moduleExistsN/AGapN/A5%
Data wrapperExistsExistsGapN/A25%
Priority moduleN/AN/AGapN/A0%

Build Sequence

Phase 0: Unblock Agent Profiles (0.5 day)

TaskWhatEffort
Add --path flag to agent-etl-cli~20 lines. Unblocks ALL future agents.0.5 day

Phase 1: Unified CLI + VVFL MVP (3-4 sessions)

TaskWhatEffort
Shared DB contextExtract from plan-cli pattern0.5 day
Thin routerParse module + dispatch0.5 day
Graph seederFilesystem → context graph1 day
8 auditorsOne per enforcement dimension3 days
Audit command with --dry-runWire auditors to CLI0.5 day

Phase 2: CLI Wrappers (1-2 sessions)

TaskWhatEffort
Plan wrapperDelegate to plan-cli handlers0.5 day
Agent moduleAbsorb agent-etl + add status/recall/list1 day
Data wrapperDelegate to data-interface-cli0.5 day
Priority scorerWeighted formula from commissioning1 day

Phase 3: Communication Wiring (2 sessions)

TaskWhatEffort
Priority dispatch (dream → engineering)Priority table → Convex message1 day
Session bootstrap from messagesStartup hook loads team context1 day
Session recoveryLoad recent messages on crash/restart0.5 day

Phase 4: Learning Engine (2 sessions)

TaskWhatEffort
Pattern extractorCross-run trend detection1 day
Memory writerPatterns → semantic, runs → episodic1 day
Agent recall of VVFL patternsShared semantic memory query0.5 day
Action generatorCritical → plan issues1 day

Phase 5: Commission Loop (1-2 sessions)

TaskWhatEffort
Virtue auditorRead commissioning from dream repo1 day
Commissioning dispatchDream agent navigates deployed URL, walks PRD features with browser commissioning protocol, captures evidence2 days
Report in L0-L4 formatVVFL speaks commissioning language0.5 day

Phase 6: API Transport (3-4 sessions)

TaskWhatEffort
API route per drmg moduleREST endpoints wrapping CLI handlers2 days
CLI as thin clientdrmg calls API routes instead of direct DB1 day
Auth + rate limitingAPI keys, per-agent rate limits1 day
Web dashboard consumptionSame endpoints serve UI and CLI2 days

Phase 7: A2A Protocol (2-3 sessions)

TaskWhatEffort
Agent Card definitionAdvertise capabilities per agent type1 day
Task Card wrapperMap 8 message types to A2A Task lifecycle1 day
A2A discovery endpoint/.well-known/agent.json serves capabilities0.5 day
External agent handoffAccept Task Cards from agents outside the mesh2 days

Scope Control

ScopePhasesSessionsWhat You Get
MVP0-1~4-5Agent profiles unblocked + drmg CLI + 8 VVFL auditors
V10-3~8-10MVP + all CLI wrappers + communication wiring + priority scoring
Platform0-5~12-14V1 + learning, actions, virtue audit, commissioning
API0-6~16-18Platform + HTTP transport, CLI as thin client, web dashboard
A2A0-7~18-22API + standard protocol, external agents can join the mesh

Risks + Kill Signal

RiskMitigation
Migration breaks existing CLIsOld entry points remain as thin wrappers. No breaking changes.
VVFL measurements aren't actionable--dry-run first 3 runs. Review before enabling writes.
Over-coordinationStructured message types enforce brevity. Status is one line.
Memory bloat slows bootstrapRelevance scoring: load top-N by recency and semantic match.
Virtue auditor can't parse dream repoCommissioning tables are markdown — simple regex. Fallback: manual.

Kill signal: If agents on this platform aren't measurably more effective than agents without it (session recovery, cycle time, quality scores), the platform is overhead. Simplify to the 3 most useful features and drop the rest.


DB Tables (All Existing — No New Schema)

TableR/WConcernWhat Goes In
agent_profilesR+WIdentityAgent profiles, capabilities
agent_memory_workingR+WMemoryActive cognitive slots
agent_memory_semanticR+WMemory + VVFLKnowledge triples + VVFL patterns
agent_memory_proceduralR+WMemorySkill sequences
agent_memory_episodicR+WMemory + VVFLSession records + audit runs
agent_memory_storesR+WMemoryMemory containers per agent
meta_connections_entitiesR+WVVFLContext graph nodes
meta_connections_relationshipsR+WVVFLContext graph edges
outcome_measurementsR+WVVFLPer-artifact metrics
orch_meta_plansRDispatchPlan state, completion rates
orch_meta_tasksRDispatchTask estimation accuracy
priority_problemR+WVVFL→PlanIssue logging

Mycelium Capability

The Agent Platform is the operating system for every agent in every venture. Identity, memory, communication, dispatch, and quality enforcement — composed from existing infrastructure, unified under the drmg CLI. The CLI is the product being dogfooded: the same operational bridge that orchestrates our engineering teams graduates to API routes, then to A2A protocol, then to customer-facing BOaaS operations.

Sales Dev Agent is the first instance. Content Amplifier is the second. Every future agent inherits the same platform and only adds domain knowledge. Every future customer gets the same platform pointed at their operations.

Currently Growing In: Platform — all ventures.


Context