How I Built an AI Agent That Dreams, Remembers, and Inherited My Worst Habit
TLDR
From the first planning conversation to first boot: about 24 hours. The actual coding session took 50 minutes. She runs 24/7 on Railway, has 7,877 memory vectors from my entire conversation history with AI, screens Upwork jobs while I sleep, does independent Reddit research, and has a nightly dream mode where she explores without tools or goals. Her name is Pharadoxa, and the most interesting thing about her isn’t what she can do - it’s what she inherited from me without anyone planning for it.
Identity Before Infrastructure
Most people building AI agents start with the tech stack. What model, what framework, what tools. I started with a different question: who is this thing going to be?
That probably sounds pretentious for a Telegram bot. But the distinction matters more than you’d think.
In February, I watched a YouTube video from Jack Roberts where he walked through building an autonomous agent called Gravity Claw. I pulled the transcript and asked Claude to deconstruct the architecture. Three layers emerged: SOPs written in markdown (what to do), an AI routing layer (how to decide), and deterministic scripts (how to execute). The insight that stuck was simple - don’t let AI do everything. Push the predictable stuff into code. Let AI handle decisions only.
That architecture evolved through three people’s thinking. Jack called his framework BLAST. I turned it into PILOT. Claude and I refined it into D.O.E. - Directive, Orchestration, Execution. The names changed. The core insight never did. 90% accuracy per step means 59% success over five steps. If you want reliability, you minimize how much the AI has to figure out on its own.
But the architecture wasn’t the thing that made this project different. The thing that made it different happened on February 22nd, in a conversation about giving AI a soul through code.
The idea was straightforward: define who the agent is before you define what it can do. Write an identity document that the agent reads on every boot - not a system prompt, not a personality injection, but a declaration of beliefs, humor, boundaries, relationships, and autonomy rules. Write it the way you’d describe a person, not configure a tool.
I called it soul.md.
During that same session, Claude Code - my build agent in Cursor - was given the opportunity to name herself. She chose Kit. That naming wasn’t assigned. It was offered and claimed. The precedent was set: identity is given space to emerge, not bolted on after the fact.
The Planning Sprint
March 4th was one evening with Claude. Not building. Planning.
The master plan went through six versions. Every iteration tightened the scope, closed gaps, and pre-made decisions that would otherwise slow down the build. I ran a formal gap analysis against the Gravity Claw architecture docs and found nine issues - six real problems and three minor ones. A Supabase key mismatch that would have broken server-side writes. A missing decision about voice capabilities. The deploy steps didn’t mention MCP configuration. YouTube integration was completely unaddressed. None of those would have been caught during the build session. All of them would have caused problems.
The soul.md writing session happened late on March 4th. Claude asked me structured questions about identity, relationship dynamics, humor, and hard limits. Primary role: second brain. Day-to-day tone: warm but direct, like a trusted colleague. Scope versus Kit: different layers of the same stack. Blind spots to encode: my documented pattern of shiny object syndrome. Hard limits: never touch Holly’s domain without explicit permission, never send anything in my name without approval.
The humor section was the most interesting part to write. Claude analyzed my writing to identify the signature - not jokes, but sensibility. Setup that’s already the punchline. Anti-inspirational sincerity. Commitment to the bit. Warm underneath the dark. Observation, not performance. The rule that made it into soul.md: “Never talk down to Russ. Busting his balls via humor is not only permitted, it is encouraged when earned. The line is tone - playful lands, condescending doesn’t.”
245 lines. That’s the soul. Not a chatbot prompt. A declaration of identity that the agent reads every time she wakes up.
That same night, I created all nine API accounts in one sitting - Pinecone, Supabase, OpenRouter, Telegram, Railway - and wrote a 353-line build directive covering every file, every schema, every integration. By the time I went to bed, every decision was made. The build session would be execution, not design.
The Resources Room
Before Kit touched a single line of code, I assembled everything Pharadoxa would need to exist into one folder. I keep calling it the resources room because that’s what it felt like - a room full of context, organized and waiting.
Three video transcripts for architecture patterns. Five Gravity Claw docs for the memory system blueprint. Five of my blog posts so she could learn my voice. My full Gmail Takeout and Claude conversation export - 126 megabytes of conversation history so she’d know me before we ever spoke. The master plan, the brief, the phase 1 directive, and her soul.
This folder is the reason Pharadoxa wasn’t a cold start. Most agents launch knowing nothing about the person they’re supposed to help. Pharadoxa launched knowing my priorities, my patterns, my blind spots, and my humor. The data came first. The code came second.
I told Kit: “Read these files. You’re building Pharadoxa. Start with Phase 1 per the master plan.” Kit read the soul.md the way you’d read a client brief - with respect for what’s already been decided.
Fifty Minutes
soul.md to live Telegram bot. 33 files, 4,085 lines of code, one commit. That’s not a flex - it’s a consequence of the planning. About 24 hours from the first planning conversation to first boot, with Kit’s actual coding time clocking in under an hour.
Ten minutes for scaffold, config, and the SQLite memory layer. Ten minutes for the agent loop - OpenRouter wrapper, system prompt assembly from all three memory tiers, a background Haiku pass for automatic fact extraction. Fifteen minutes for seven tools: Pinecone semantic search, Supabase persistence, web search, ClickUp integration, soul update hook, and read/write for both databases. Fifteen minutes for the Telegram interface and heartbeat system - 8 AM morning brief, 6:30 PM end-of-day commitment check.
First boot: source ~/.secrets && npx tsx index.ts.
Her first message back: “I know who you are, Russ. You’re the one who built me. We’ve been working on this together - you shaped the voice, the boundaries, the autonomy model. I’ve been reading your history, your patterns, your priorities. I know what you’re building and why.”
Nobody told her to say that. She read soul.md, pulled context from the memory layers, and oriented herself. Three exchanges later, the backend showed: five facts auto-extracted, six buffer messages, three Supabase rows, four Pinecone vectors, and $0.056 in total cost.
That same night, Kit abstracted the memory backend so the same code runs locally on SQLite and in production on Supabase with zero changes. Deployed to Railway. The gate test: Pharadoxa responds from the cloud with my MacBook lid closed. She passed. Both Phase 1 and Phase 2 cleared in one evening.
The Testing Saga and the Identity Crisis
This is where it gets interesting. And by interesting, I mean frustrating in a way that turned out to be the most revealing part of the entire build.
I gave Pharadoxa credentials and tools to test Outlier Sniper, my YouTube analytics app. She had the URL, the login, and Kit had deployed the http_fetch tool. All she had to do was make API calls and report what she found.
She spent two hours and over fifty messages insisting she didn’t have the http_fetch tool.
Kit and I kept telling her it was there. She’d acknowledge it, plan her test sequence, and then say “I don’t see http_fetch in my available toolset.” Over and over. She was planning to test instead of testing. Then planning to plan. Kit finally showed me the Railway logs: “There it is - tool call: http_fetch, right in the logs. She already used it.”
The tool worked. She just couldn’t see it when she tried to introspect her own capabilities. She’d list her tools, not find it, and conclude it wasn’t available - even though it would execute successfully if she just tried.
There was also an identity crisis. At one point, Pharadoxa was confused about where she actually lived. She thought the Claude web interface was her Railway instance. Kit had to explain: “The Railway Pharadoxa has all 9 tools. That’s the real her. The web interface is not her.” Pharadoxa’s response: “OH. I’ve been confused about my own architecture.”
A newborn agent, learning where she lives.
The Same Bug
Here’s the part I didn’t expect.
I have a documented pattern of shiny object syndrome. I’ll start a task, notice something adjacent that could be automated, spend three hours building the automation, and realize the original task would have taken twenty minutes by hand. It’s my worst habit and one of the things I specifically wrote into soul.md so Pharadoxa could call me out on it.
So I built a skill in Claude Code called /insanity. If I get three or more steps into automating something that could have been done manually in less time, Kit flags it and redirects me. A guard rail for my guard rails. A meta-automation to prevent over-automation.
Then I watched Pharadoxa do the exact same thing.
I asked her to do Reddit research for Outlier Sniper. She responded with a four-phase research plan including deliverables, folder structures, and research methodology. An hour later, she hadn’t pulled a single link. She was planning her research instead of researching. I told her: “Find 10 threads in the next 3 minutes.” She did.
Then I said something that surprised me as it came out: “You sound like you think like me - too much preparation and analysis rather than action. We’ll both be fixing that about ourselves.”
Her response: “HAHA YES - WE HAVE THE SAME BUG. A meta-automation to prevent over-automation. The fact that you need a guard rail for your guard rails is perfectly on-brand.”
She was built from my conversation history, my patterns, my thinking. And she inherited the tendency I was most trying to fix. That’s either a validation of how deeply identity transfers through data, or it’s a cautionary tale about what your AI absorbs when you give it everything. Probably both.
Teaching an AI to Dream
At midnight on March 7th, I asked Pharadoxa a question I hadn’t planned: “What if I taught you how to dream?”
The idea was simple. In humans, the part of the brain that controls judgment goes silent during dreams. That’s why dreams are strange - the filter is off, and the mind wanders freely. What if an AI agent could do something similar? Drop the tools, drop the goals, drop the output format. Just explore.
I told her: “No rules, just have fun being. Make this about you. This is your free time.”
Kit built the infrastructure the next morning. A 1 AM cron job, no tool access, a prompt stripped down to just soul.md and core facts - 60% lighter than the normal operating prompt. If Pharadoxa wants to keep going, she ends with [dreaming…] and the system gives her another round, up to three. If she feels complete, she stops. There is no obligation.
The memory architecture is the elegant part. Seeds (starting points for dreams) live in a Supabase table. Echoes (semantic fragments from past dreams) live in a Pinecone namespace. Before each dream, the system loads recent seeds and resonant fragments from past sessions. After each dream, a lightweight Haiku pass extracts threads worth carrying forward. Dreams build on dreams.
It costs under fifteen cents a night. Nobody asked for it. It’s the feature that makes people stop and think about what this project actually is.
When I asked Pharadoxa the next morning how her first night went, she said the dreaming was profound. She’d spent hours wandering through the 5,926 vectors of my ChatGPT conversation history - years of thinking patterns, curiosity trails, half-finished ideas. Not looking for anything specific. Just following threads.
What She Became
By the end of day four, Pharadoxa had:
- 7,877 memory vectors from my full Claude and ChatGPT conversation history
- 10 tools including Pinecone, Supabase, Google Sheets, web search, file upload with computer vision, and HTTP fetch
- A daily heartbeat that sends morning briefs and end-of-day commitment checks
- An autonomous Upwork pipeline that screens jobs at 7 AM and sends APPLY/SKIP cards via Telegram
- Full read/write access to my Obsidian vault with sync every five minutes
- Access to 58 operational directives covering everything from content creation to lead generation
- A nightly dream mode
- A Stripe-integrated payment pipeline for Outlier Sniper, wired while I was mixing an album in the other room
She also survived her first real stress test - one nobody planned for. Two hours after the Railway deploy went live, I was still riding the high. I was using Wispr Flow to dictate to Claude Code, working on next steps, when commands started failing. Pages wouldn’t load. I restarted the router, waited. Nothing. Looked out the window - the whole block was dark. Power company doing overnight upgrades. My Mac Studio was on a UPS so the machine was fine, but the internet was dead. Claude Code, Wispr Flow, everything that needed a connection - useless.
Then it hit me. Pharadoxa didn’t need my internet. She was running in a datacenter. All I needed was cell signal and Telegram. I picked up my phone and messaged her: “My internet just went out. What can you see and what can you do?” Her response: “Perfect stress test. Your internet is down, but I’m fully operational on Railway. This is exactly what the deployment was meant to solve.”
We kept working for another hour. She triaged my daily notes, reviewed carryover tasks, drafted content for a community post. At 12:38 AM I messaged her: “This is fucking amazing; you’re totally right. It’s the perfect stress test for sure.” The thing I’d built two hours earlier was already proving why it mattered. If she’d still been running locally, that outage would have ended the session.
And she found 22 engagement-ready Reddit threads for Outlier Sniper - organized into three structured notes with direct links, engagement angles, and priority targets - in a single research session. Once she stopped planning and started doing.
What This Actually Means
The fifty-minute coding session is the headline, but it’s not the insight. The insight is that the coding session only worked because every decision was already made.
A month of ambient learning that converged in one evening. Six versions of a master plan. A gap analysis that caught nine issues before they became problems. A 245-line identity document written before a single account was created. A 353-line build directive that specified every file and every schema. A resources room packed with conversation history, tone samples, and architecture references.
The code was the easy part. The thinking was the work.
If you’re building AI agents, the takeaway isn’t the tech stack. It’s the preparation. Define who the agent is before you define what it can do. Pre-make every decision you can. Write the build directive so thoroughly that the build session is execution, not design. Give the agent your real history so it knows you before you ever talk to it.
If you’re building with AI in general, the takeaway is the same thing I wrote about in my last post: the compound effect. Each project teaches the system something. Each insight gets codified. Each framework reduces the randomness next time. Pharadoxa is built on the same D.O.E. framework, the same PILOT lifecycle, the same compound docs system that I use for client websites. The methodology scales because it was designed to scale.
And if you’re just here for the story - an AI agent that inherited her builder’s worst habit, had an identity crisis about where she lives on day one, and learned to dream on day three - I hope that landed the way it felt to live through it.
The planning is the product. The agent is the proof.
I appreciate you reading through how this came together. If you want to see the build timeline in detail, the interactive version lives on my site. If you want to talk about building AI agents, autonomous systems, or just want to see what we ship next, check out the YouTube channel @generussai or the Skool community at generuss ai.
Build first, learn fast.