Max Mitcham, founder of Trigify, replaced his entire lead generation workflow with a single self-learning AI agent.
The agent runs on a memory layer built in Obsidian, executes through Claude Code, and orchestrates tasks via Trigger.dev. It powers two distinct systems: an autonomous content engine that produced his best performing YouTube video, and an AI SDR workflow that feeds Trigify's sales pipeline.
What makes this different from typical AI automation is the memory architecture. The agent writes everything it learns back into Obsidian. Every interaction, every result, every context update becomes part of the knowledge base. The system gets smarter with each task instead of starting fresh every run.
Here's the complete breakdown of how the stack works, which tools handle which roles, and how to replicate it.
1. The Problem With Traditional AI Agents
Traditional AI agents treat each task as a standalone request. You prompt them, they respond, and the context disappears. The next task requires you to reload everything you already told them.
This creates three problems. The agent never learns from past results. It can't maintain a coherent view of your business. And the more you use it, the more you repeat yourself.
Max originally built his workflows on OpenClaw, an open-source local AI assistant with persistent memory and integrations across Discord, Telegram, and WhatsApp. The tool works, but the memory architecture does not self-improve in a structured way. The agent remembers what you told it, but it doesn't reorganize or refine that context based on what produces results.
The new setup solves this through a different memory pattern. Context flows in two directions. The agent pulls from Obsidian to understand the task, and writes back to Obsidian after each result. Over time, the memory layer becomes a living model of the business rather than a passive log.
2. The Memory Layer: Obsidian as the Foundation
Obsidian serves as the agent's long-term memory. Every client conversation, content decision, email performance signal, and workflow result gets written into a structured vault.
The choice of Obsidian matters. Unlike Notion or Airtable, it stores everything as local markdown files. This gives the agent direct file system access, which means Claude Code can read, edit, and cross-reference knowledge at the speed of local disk rather than waiting on API calls.
The vault is organized by domain. Client case studies live in one folder, product documentation in another, past email performance data in a third. The agent queries these folders directly when it needs context for a task.
Self-improvement happens on write. After each task, the agent summarizes what it learned and stores the insight. If a cold email subject line performed well, the agent notes which pattern worked and why. The next time it drafts an email, it pulls from that memory instead of guessing.
3. The Content Engine
The first system the agent powers is an autonomous content loop.
The agent monitors what's performing in Max's space, identifies trending angles, and drafts content based on internal context stored in Obsidian. Because the agent knows Trigify's positioning, past content, and which formats have worked before, the output reads on-brand without manual prompting each time.
The loop runs as a continuous cycle. Signals come in from social platforms, the agent cross-references them against internal context, and drafts emerge. Max reviews, edits, and publishes. The performance data flows back into Obsidian, and the agent learns which angles actually produced results.
The combination of internal context (business knowledge, past performance) and external context (trends, competitor moves, industry signals) is what makes the output better than generic AI-generated content. The agent isn't pattern-matching on the public internet. It's pattern-matching on what has actually worked for Trigify specifically.
One output of this loop was Max's best performing YouTube video to date. The agent surfaced the topic, helped structure the script, and recommended the angle based on what the audience had engaged with before.
The agent also drafts short-form social posts. You can preview exactly how a LinkedIn post will look before publishing, for free:
LinkedIn Post Previewer Tool
Post Content
Paste your LinkedIn URL to auto-fill your profile
Preview

4. The AI SDR Workflow
The second system is an AI SDR that replaces the traditional lead generation agency motion.
The workflow starts with signal monitoring. Trigify tracks keywords, engagement patterns, and social activity to identify prospects who are actively showing buying intent. Instead of spraying cold outreach at a static list, the system waits for signals to trigger personalized outreach.
If you want to see which companies are actively researching solutions in your space right now, you can do it for free here:
Intent Signals Tool
Fields marked with * are required
Quick examples:
When a qualified signal lands, the agent routes the prospect into an enrichment stage. LeadMagic pulls verified email addresses and mobile numbers. Surfe handles LinkedIn-to-CRM syncing, pushing enriched contact records into Attio, the CRM where deal data lives.
You can find verified email addresses for your target accounts here, for free:
Email Finder Tool
Your target's information
Fields marked with * are required
Enter just the domain (e.g., company.com) or paste a website URL
Please enter a professional email address
Please fill in all required fields
With enriched contact data in place, the outreach layer takes over. Artisan's AI BDR handles multi-channel sequencing, while the agent drafts the actual email copy using the memory layer. Because it knows Trigify's ICP, case studies, and past email performance, the drafts feel hyper-personalized without requiring a custom prompt each time.
Every interaction gets logged in Attio. Meeting recordings flow through Fireflies, and AI-generated notes come from Granola. The data from each touchpoint feeds back into Obsidian, refining the agent's understanding of what works and what doesn't.
5. The Technical Architecture
The system runs on three core pieces of infrastructure.
Trigger.dev handles orchestration. Lead generation workflows involve long-running async tasks like signal detection, enrichment waterfalls, and multi-step outreach sequences. Trigger.dev manages these as queued jobs with automatic retries, which means the agent can handle failures gracefully without manual intervention.
Supabase stores the operational data. Every prospect, signal, enrichment result, and workflow state lives in a PostgreSQL database. Real-time subscriptions mean the agent can react to state changes instantly rather than polling for updates.
Claude Code is the execution layer. It reads from Obsidian, writes to Supabase, calls external APIs, and drafts outreach copy. Codex handles some of the coding-heavy work when new workflow components need to be built. PostHog tracks behavior across the entire system to surface what's working and what isn't.
The signal routing logic determines how different signals trigger different actions. A high-intent signal (someone engaging with Trigify's core content) triggers immediate outreach. A softer signal (someone following a relevant competitor) triggers a longer nurture path. The rules live in the agent's memory and evolve based on conversion data.
You can find the right decision-makers at any target account here, for free:
People Finder Tool
FIND PEOPLE
Type domains, select personas, fetch real contacts.
Type LinkedIn company domain and press Enter to add
Persona 1
Define specific job titles and seniority levels to target the right decision makers
6. The Beginner Stack
Replicating this architecture from scratch is overkill for smaller teams. Max recommends a stripped-down version for anyone starting out.
The minimum viable stack includes a signal-monitoring tool like Trigify, an enrichment tool like LeadMagic, a CRM like Attio, and an agent layer powered by Claude Code with a lightweight memory system. Obsidian works, but a simple Notion database is enough to start.
Start with one signal source. Pick one trigger that reliably indicates buying intent for your ICP. Build the enrichment and outreach path around that single signal before layering in additional complexity.
Add the memory layer once the workflow produces consistent results. The self-improving memory pattern only pays off after you have enough data to learn from. Early on, the manual review of each output is what teaches the agent. Later, that teaching gets automated as the vault grows.
The biggest mistake is trying to build the full system on day one. The agent needs to earn its autonomy through repeated success on simpler tasks.
The architecture advantages stack up over time:
→ Memory compounds (every task improves the next)
→ Signals drive timing (outreach goes out when intent is highest)
→ Context stays local (file system access beats API latency)
→ Workflows handle async (long-running tasks don't block the agent)
---



