Support Agent: Case Study
The agent that keepsyour other agents working.
Most AI deployments skip the maintenance layer. Context resets, stale memory, and no operational status mean agents repeat mistakes and lose continuity. We built the support infrastructure first.
Note: The memory and context architecture shown is what we run for our own agent stack. The same patterns, status snapshots, tiered memory, scheduled distillation, apply to any agent deployment, using whatever file formats, databases, or notification channels your team already uses.
The Problem
Agents wake up fresh. Your business does not.
Every AI session starts with a blank slate. Without a support layer, that means agents re-ask questions you already answered, repeat outreach to contacts you already emailed, miss context from yesterday's decisions, and slowly drift out of sync with reality.
The Architecture
Four layers. All automated.
The support agent is not one thing. It is a set of lightweight jobs that run on a schedule, keeping the system accurate and the context current.
Status Refresh
gen-status.js HubSpot API File systemBefore the main agent wakes up, a status script generates a live snapshot of operational state. It reads the outreach queue, checks Apollo and Hunter credit usage, counts staged leads and Reddit posts, and summarizes the last week of outreach activity. The result is written to STATUS.md, a single file the agent reads at session start.
This means the agent never starts a day guessing at queue sizes, credit availability, or recent send history. It reads the facts, then acts on them.
Memory Distillation
Daily notes MEMORY.md Claude (Haiku)Every session produces a raw activity log: what was built, what was decided, what failed, what was fixed. Left alone, these logs grow indefinitely and become noise. The distillation agent runs nightly, reads the day's log, and promotes anything durable into long-term memory.
Durable means: new credentials or integrations, architecture decisions, new contacts, lessons from failures, cron job changes. Not durable: queue states, counts that change daily, routine run results.
Long-term memory stays compact and accurate. Daily logs stay complete. The agent never has to choose between them.
Memory Audit
MEMORY.md STATUS.md Signal reportMemory that is never audited becomes wrong. Entries go stale, decisions get reversed, integrations change. The weekly audit agent reads long-term memory, the current status file, and the last five daily logs. It cross-checks for contradictions, stale entries, and facts that should be promoted but are not.
It delivers a short Signal report: what is stale, what is missing, what looks clean. A 2-minute read that keeps the knowledge base honest over time.
Context Priming
MEMORY.md STATUS.md Daily notesWhen a new session begins, the agent reads four files in sequence before doing anything else: its identity and persona, a description of the user, the current operational status, and recent daily notes. This restores continuity in under a minute without relying on conversation history.
The result: the agent knows who it is working with, what was built yesterday, what the queue looks like right now, and what decisions were made last week. Every session starts informed rather than blank.
Memory Architecture
Three tiers. Each with a different job.
Not all memory is equal. Mixing raw logs with curated facts in a single file is a common mistake. It bloats context, buries what matters, and makes everything slower.
The support layer maintains three distinct tiers: scratch paper for the day, curated long-term memory for what persists, and a live status snapshot for operational state. Each is sized and scoped appropriately. Each is read only when needed.
When context resets, which it always does, the agent recovers in seconds by reading the right tier. It does not re-discover. It resumes.
Daily Notes
Raw log of everything that happened today. Created fresh each morning. Feeds the distillation agent at night. Kept for reference, not for loading into context.
MEMORY.md
Curated, human-readable facts that persist across sessions. Credentials, decisions, people, lessons, integrations. Updated nightly by distillation. Audited weekly. Always loaded at session start.
STATUS.md
Live snapshot generated every morning at 7:30AM. Queue sizes, credit usage, recent activity. Never stale by more than 24 hours. Replaces the need to query multiple systems for current state.
What It Looks Like
The agent reads this before it does anything.
Every morning at 7:30AM, the status script queries live systems and writes a structured snapshot. By 8AM, when the main agent starts work, it already knows the current state without asking a single question.
No "what's in the queue?" No "how many credits do we have?" No "did the last email send?" The support layer answered all of that before the session began.
STATUS.md: Generated 7:30AM today
Nine facts. Zero questions asked. Session starts informed.
The Point
Every agent deployment needs this layer.
It is the last thing teams think about and the first thing that breaks. When agents lose context, they produce worse outputs, repeat work, and require more human oversight, the opposite of what they were built to do.
The support layer is part of every build we deliver. Memory architecture, status generation, pruning schedules, and context priming are not optional extras. They are what make agents reliable over weeks and months rather than just impressive in a demo.
Memory Architecture
Design the right tiers for your agent system: what gets retained, what gets pruned, what stays in context, and what gets archived. Built once, maintained automatically.
Operational Status
A daily-generated snapshot of what matters: queue sizes, credit usage, recent activity, system health. One file. Read at session start. Always current.
Continuity Across Resets
Context windows reset. Agents should not. A well-designed priming sequence restores full context in under a minute after any session restart or handoff.
Fixed price. Two to four weeks. You own the code.