Skip to main content
MindStudio
Pricing
BlogAbout
My Workspace

How to Build an AI Second Brain OS With GPT-6 Astra and Codex

A practical guide to building a personal AI operating system with Codex, agents.md files, and a four-part framework for context and connections.

Edited by Luis Chavez-Mattos, Director of Product RSS
How to Build an AI Second Brain OS With GPT-6 Astra and Codex

What is an AI second brain, and how do you actually build one?

An AI second brain is a personal knowledge system connected to an AI model so the model can answer questions, draft work, and take action using your actual business or life data instead of generic training knowledge. You build one by feeding an AI coding tool like Codex a structured folder of your own information (goals, meetings, writing samples, project files) plus a routing file (commonly called agents.md or claude.md) that tells the AI where to find things. Once that structure exists, you can work from a single chat interface instead of switching between a dozen apps.

TL;DR

  • An AI second brain pairs a large language model with your own stored knowledge (business docs, meetings, notes) so responses are specific instead of generic.
  • The setup relies on a four-part framework, context, connections, capabilities, and cadence, where each layer builds on the one before it.
  • Context covers things that rarely change (your goals, business description, priorities), while connections cover live tools like email, Slack, and project management that update constantly.
  • An agents.md file (the Codex equivalent of Claude’s claude.md) acts as a routing map the AI reads before every response, telling it which folder to check for which type of question.
  • You can test whether your system is working with three checks: does it answer faster than a teammate would, does it cut down on tab switching, and can you stop mentally rehearsing information because retrieval is reliable.
  • The setup starts with a local project folder opened inside a coding tool like Codex, followed by an onboarding process that generates markdown files for context and priorities.
  • Capabilities and automations (skills, autonomous agents) are far less useful without solid context and connections in place first, since they end up producing generic output.

Why does context matter more than automation?

Automation gets the attention because it looks impressive: agents running tasks on their own, workflows firing without you touching them. But automation built on top of a model that doesn’t know your business produces generic results. A skill that writes a report or an agent that drafts a reply is only as good as what it can pull from.

That’s why context comes first in the four-part structure. Context means the stable facts about you or your business: what you do, who your customers are, your quarterly or yearly goals, your pain points, your voice and writing style. This information doesn’t change week to week, so it makes sense to store it as static files the AI can reference any time.

Connections are different. These are the live systems, email, Slack, calendar, project management tools, financial data, where the actual day-to-day information lives and constantly updates. The AI doesn’t need to store all of this permanently. It needs the ability to reach into these tools “just in time” when a question requires it.

Only after those two layers are solid do capabilities (custom skills) and cadence (autonomous agents and scheduled automations) start producing output that actually reflects your situation instead of a plausible-sounding guess.

How does the agents.md file work?

The agents.md file is a plain text routing map that the AI reads before it reads your actual message. If you’ve used Claude’s claude.md file, this is functionally the same idea, adapted for Codex. In practice, it contains a short identity statement (who the AI is acting as and what its job is), a handful of operating rules (formatting preferences, tone, things to avoid), and then a routing section that maps topics to file locations.

For example, a routing map might specify that questions about business advice or team structure should pull from a wiki folder, questions about writing style should pull from a separate notes file, and questions about a specific project should pull from that project’s folder. The value isn’t the file itself, it’s that the AI checks this map every single time before responding, so it knows where to look instead of guessing or defaulting to generic knowledge.

If you’re migrating from Claude to Codex, the practical shortcut is copying an existing claude.md file and renaming it agents.md, since the structure and purpose are the same.

How do you set this up from scratch?

The process described in this workflow breaks down into a few concrete steps:

  1. Create a local folder. Make a new folder on your computer dedicated to this project, something as simple as a desktop folder.
  2. Open it in Codex. Using the Codex desktop app, create a new local project, name it, and point it at that folder. This becomes the working directory for everything that follows.
  3. Install a starter resource pack. A onboarding process can install a set of skills into that folder, including an onboarding skill that sets up your initial file and folder structure, an audit skill for periodic reviews, a routing/link skill, a “level up” skill that suggests improvements after an audit, and a visualization skill that turns your knowledge into a navigable 3D map.
  4. Run the onboarding conversation. This walks through a series of questions (roughly seven, covering who you are, what your business does, and samples of your writing) and saves your answers into markdown files as it goes.
  5. Check the generated structure. After onboarding, a context folder appears with files like “about me,” “about business,” and “priorities,” along with the beginnings of an agents.md file. These files get more detailed over time as you keep using the system.
  6. Map your connections. List out the tools you actually use daily, categorized loosely around revenue, customers, calendar, communications, tasks, meetings, and knowledge. Then ask the AI how to connect each one, whether through an API key, an MCP server, or browser automation.

Everyone else built a construction worker.
We built the contractor.

🦺
CODING AGENT
Types the code you tell it to.
One file at a time.
🧠
CONTRACTOR · REMY
Runs the entire build.
UI, API, database, deploy.

Once this is in place, a simple prompt like “make me a sizzle reel for my community” can pull from stored context and connected tools without you specifying every detail, because the routing and background information already exist.

Is building an AI operating system worth the effort?

The upfront work is real. Structuring folders, writing context files, and mapping connections takes time, and the payoff depends on how consistently you feed the system information afterward. But the three tests worth applying are: whether the AI answers a question faster and more specifically than a teammate would, whether it measurably reduces how often you switch between apps and tabs to get something done, and whether you can stop mentally holding onto details because you trust the system to retrieve them from meetings, email, or chat threads.

If none of those improve after setup, the system probably needs more context or better-connected tools rather than more automation. Automation without a knowledge base behind it just produces faster generic output, which isn’t the point.

Frequently Asked Questions

What’s the difference between context and connections in this framework?

Context is stable information that rarely changes, like your business description, goals, and priorities, stored as files the AI reads directly. Connections are live data sources, like email, Slack, or a CRM, that update constantly and get queried on demand rather than stored permanently.

Do I need Codex specifically, or does this work with other AI tools?

The routing file concept (agents.md) mirrors Claude’s claude.md file, so the same structure applies across coding-oriented AI assistants that support project folders and persistent file access. The naming convention differs by tool, but the underlying idea, a file the AI reads first to know where information lives, transfers.

How much writing do I need to do to set this up?

The initial onboarding is short, built around a handful of questions about your background, business, and writing samples. The context files then grow incrementally over time as you keep using the system and updating it, rather than requiring a massive upfront documentation effort.

What happens if I skip straight to automation without setting up context first?

Automations and autonomous agents built without a context and connections layer tend to produce generic results, since they have nothing specific to pull from. The framework treats context and connections as prerequisites, with capabilities and cadence layered on top only once those foundations exist.

Can this AI operating system replace tools like Slack or a project management app?

Not exactly. It’s designed to sit on top of and connect to those tools rather than replace them, pulling relevant information from them into a single interface so you don’t have to manually check each one separately.

Editorial standards

Presented by MindStudio

No spam. Unsubscribe anytime.