How I Use Cortex to Augment My AI Agents
I show you how Cortex gives my AI agents the knowledge they need before they work, so each agent builds with what we have learned.
Before I could orchestrate a swarm, I had to stop my agents from wrecking what we had built. More agents would only multiply the damage. That is why I am starting here.
How We Solved AI Coding Slop
Updated
My coding agents wrecked my cofounder's life's work faster than he could review my changes. It was our product Journeys, a human-AI collaboration platform with more than a million lines he had written by hand and was proud of. I turned our codebase into a crime scene one reasonable commit at a time.
I'm Eduarda Ferreira, and I founded Socra with Mike. I have been coding with AI since 2023, and back then I had to ask him for help most of the time.
Mike is a self-taught full-stack developer who has been coding for almost ten years, and every decision in our codebase carries what those years taught him about building good software. He held the whole system in his head, and for most of that decade the reasons behind his decisions lived nowhere else.

Until 2024, Copilot finished the line I was typing, or I pasted a block of code from an AI chat bot. Then coding agents arrived that could read our codebase, edit files, run commands, and build whole features alone. I stopped asking Mike for help and moved fast, and the freedom felt great.
Every commit my agents made looked fine on its own, and the tests passed. Together, the commits wore what made Journeys special away, because the specific knowledge behind each file was missing at the moment my agents changed it: the things Mike knows about our system that no model was trained on. They filled these gaps with generic guesses.
At first the slop arrived as small bugs, one confident wrong guess at a time, until Journeys was unusable. We started losing power users, and Mike could not review changes at the speed I could produce them. What kept him up at night was having to reverse engineer my agents' damage in his own codebase.
This is how he described what reviewing my work felt like:
"The first thing I saw would be terrible. I'd be like, man, we don't do it this way, this is going to have these problems. Then I'd look a little deeper, pull back a layer of the onion, and it would get worse. I'd pull back another layer, and it would get even worse. It makes you feel really terrible as a senior engineer to watch your life's work getting wrecked."
In 2025 we split the work as Mike started building a new codebase from scratch to replace Journeys.
I treated the wrecked codebase as my lab and set out to build a self-improving swarm. Every experiment ended the same way: an agent learned what I wanted, the session closed, and the learning went with it. The next agent started blank, and one of them broke something I had already fixed 10x before.
I carried the context by hand, pasting summaries from one session into the next. At the peak, I was spending $100 a day on Cursor. I memorized dozens of keyboard shortcuts for the prompts I repeated daily. Then I wrote Markdown instructions for everything my agents needed to know, until I had a mess nobody maintained.
The codebase moved every day and the files stood still. My agents kept reading last month's wrong decisions and following them with full confidence. Writing the knowledge down was easy, but I had no system for keeping it true.

Before Socra and a 3D printing startup, I was a photolithography engineer at Texas Instruments, in a full cleanroom suit, no makeup, no perfume, because one particle can kill a chip. That factory knew how to learn. When a run taught us something, we changed the recipe, and every run after it inherited the change. Nobody re-taught a lesson at the start of a shift, because the lesson lived in the recipe.
My swarm had no place where a lesson could live. An agent needed to receive the current knowledge before it acted, and someone had to keep that knowledge true. We started building Cortex to do that.
Mike had been fighting the same problem from his side. He tried agents.md files, and they helped with the one thing each file described and nothing around it. He explains how he connected that knowledge in his account of building Cortex.
I started using Cortex on Journeys first. By the time I first wrote this story, I felt Journeys was in the best shape it had ever been, and we had decided to keep it. Everything else was rebuilt from the ground up in TypeScript: new backend, new services, new apps. Journeys still runs on its original Python backend beside them.
Cortex has no agent of its own. It plugs into the agents I already used, Claude Code and Codex among them, so my coding agents stayed the same.
Before an agent changes anything in my repos, it flashes the Module that explains how things should be done. A Module states how one part of the system should work and why. Flash brings that Module together with the Modules it depends on, foundations first.
Mike built Cortex’s API, backend and MCP, which connects agents to Cortex. He shares the relevant knowledge with my agents through Cortex. They can retrieve the behavior and service contracts they need and use the existing API while working on the interface. I can focus on the experience I want without having to teach each agent the backend myself.
Each Module has an owner. I own mine, and I’ve authorized my agents to keep them current as we work. When a decision changes, they preserve the decision and its reason, then tell me what changed.
At Socra, Mike owns our backend and infrastructure. I own our frontend and design.
After one of our shared UI releases, Mike messaged me:
"Cortex UI is looking really good."
I found that awesome, because I had not made a Cortex-specific UI change in that release. What I had shipped was a release of the shared UI system behind all our web apps. My agents had improved its components and updated every web app to it. Cortex was the app Mike happened to open. This was my work reaching his screen with nothing in it for him to repair.
When I explained what he was looking at, he replied:
"Baby's first abstraction 🥹"
The shared library carried that UI change into Cortex when my agents updated the app. Cortex held the design and engineering decisions they needed to make the change.
Today, I pass my direction to AI eduarda, my chief of staff. She coordinates the agents, including our Design Manager, who carries my intent into the shared design system and the products that use it. I can explain what feels wrong in an interface and why, without opening every repository myself.
Cortex’s UI came from what we had standardized for Journeys. I built its UI/UX with my agents, carrying that foundation into how people find and edit knowledge, follow Dependencies and work through Issues. Mike built the API, backend and MCP that make Cortex work.
My goal is to build hundreds of products from this foundation. Each new product can start with the decisions and components we’ve already developed. As we improve the foundation, existing products receive those improvements when our agents update and check them.
Meet AI eduarda follows how I give that direction and how the agents carry the work through a product.