---
title: "The 5 Levels of an AI Second Brain: From a Single File to an Always-On Memory OS"
title_ar: "المستويات الخمسة للدماغ الثاني بالذكاء الاصطناعي: من ملف واحد إلى نظام ذاكرة دائم"
url: "https://www.aiwithmo.com/prompts/five-levels-ai-second-brain"
canonical: "https://www.aiwithmo.com/prompts/five-levels-ai-second-brain"
published: 2026-06-11
updated: 2026-07-02
category: ai-tools
languages: [ar, en]
author: Mohamed Khair
site: aiwithmo
---

# The 5 Levels of an AI Second Brain: From a Single File to an Always-On Memory OS

## المستويات الخمسة للدماغ الثاني بالذكاء الاصطناعي: من ملف واحد إلى نظام ذاكرة دائم

Source: https://www.aiwithmo.com/prompts/five-levels-ai-second-brain · Author: Mohamed Khair (محمد خير), aiwithmo · Published in Arabic and English.

## English

Everyone wants an AI second brain, but almost no one talks about the fact that it comes in levels, and that the highest level is not the one you should aim for. The real skill is finding the lowest level that actually solves your problem, because adding complexity you do not need just creates noise you will have to maintain later.

A second brain, stripped of the hype, is a place to store your notes, meeting transcripts, decisions, and client history in a way that both you and your AI agent can reliably find again. The whole thing is just markdown files and folders, organized well. That is why it is tool-agnostic: the same structure works with Claude Code, Codex, or any agent, because it is files, not a platform. Your data is your moat: the trick is organizing it so the AI recalls it accurately instead of hallucinating or burning tokens searching blindly.

The single most important mindset is to work backwards. Design your structure around the questions you will ask later, not around how the information arrives. You do not build a square basketball because you know it has to pass through a round hoop, so start with how you will retrieve the data, and let that decide how you store it.

The five levels each answer a different retrieval question. Level 1: can you find a file by an exact word or name? Level 2: can you pull everything on a topic together? Level 3: can you find things by meaning, even when you search different words than you wrote? Level 4: can you trace a chain of relationships from one topic back to another? Level 5: is the whole thing autonomous and always-on, syncing itself without you thinking about it?

Crucially, your whole system does not sit at one level: one folder might be Level 2 while another is Level 4. You match each part to the pain it actually has. No pain, no need to level up.

Follow for more:
- https://www.instagram.com/ai.with.mo/

Course Registration: https://halaqa.app/enrollment?course=start-with-ai

## العربية

الكل بدّه دماغ ثاني بالذكاء الاصطناعي، بس ما حدا بيحكي إنه بيجي على مستويات مختلفة تماما، وإن أعلى مستوى مو هو اللي لازم تستهدفه! 
المهارة الحقيقية إنك تلاقي أدنى مستوى فعلاً بيحلّ مشكلتك، لأن إضافة تعقيد ما بتحتاجه بس بيخلق ضجيج رح تضطر تصونه بعدين.

الدماغ الثاني، بعيداً عن المبالغة، هو مكان تخزّن فيه ملاحظاتك، وتفريغات اجتماعاتك، وقراراتك، وتاريخ عملائك بطريقة إنت ووكيلك الذكي الاثنين تقدروا تلاقوها من جديد بثقة. كل الموضوع مجرّد ملفات markdown ومجلدات، منظّمة صح. 
لهيك هو مستقل عن الأداة: نفس الهيكل بيشتغل مع Claude Code وCodex وأي وكيل، لأنه ملفات مو منصّة. بياناتك هي حاجزك التنافسي، والحيلة إنك تنظّمها حتى الذكاء الاصطناعي يستحضرها بدقة بدل ما يهلوس أو يحرق توكنز عم يدوّر عالعمى.

أهم عقلية على الإطلاق إنك تشتغل بالمقلوب. صمّم هيكلك حول الأسئلة اللي رح تسألها بعدين، مو حول كيف بتوصلك المعلومة. ما بتبني كرة سلة مربّعة لأنك عارف إنها لازم تفوت بحلقة دائرية، فابدأ من كيف رح تسترجع البيانات، وخلّي هاد يقرّر كيف تخزّنها.

المستويات الخمسة كل واحد بيجاوب على سؤال استرجاع مختلف. المستوى الأول: بتقدر تلاقي ملف بكلمة أو اسم بالضبط؟ المستوى الثاني: بتقدر تجمّع كل شي عن موضوع سوا؟ المستوى الثالث: بتقدر تلاقي أشياء بالمعنى، حتى لو بحثت بكلمات غير اللي كتبتها؟ المستوى الرابع: بتقدر تتبّع سلسلة علاقات من موضوع لموضوع تاني؟ المستوى الخامس: هل الموضوع كله مستقل ودائم التشغيل، بيزامن حاله بدون ما تفكّر فيه؟

والأهم، نظامك كله ما بيقعد على مستوى واحد، مجلد ممكن يكون المستوى الثاني بينما تاني يكون الرابع. بتطابق كل جزء مع الوجع اللي فعلاً عنده. ما في وجع، ما في داعي تطلع مستوى.

تابع حسابي على الانستغرام:
- https://www.instagram.com/ai.with.mo/

رابط الانضمام للدورة:
- https://halaqa.app/enrollment?course=start-with-ai

قناة الواتس اب اذا مهتم:
- https://whatsapp.com/channel/0029Valr4OGFMqrek98WtF3S

## Steps

### 1. The Mindset: Work Backwards From the Question

*How you will retrieve the data decides how you should store it*

Before any folder structure, there is one mindset that determines whether a second brain works: you have to build it backwards. Do not organize your data around how it arrives - organize it around the questions you will ask it later, because the way information gets recalled determines the way it should be stored in the first place. The analogy is a basketball and a hoop: you know the hoop is round and the ball has to pass through it, so you would never design a square ball. Start with the shape of the retrieval, and the storage follows. The job of a second brain, underneath all the visuals and hype, is simple to state: can your agent find it again, and can you find it again? If the answer is no, you do not have a memory problem - you have a routing and folder-architecture problem. And the entire thing is just markdown files and folders, which is what makes it tool-agnostic. The same structure works in Claude Code, in Codex, or with any agent harness, because you are organizing files, not committing to a platform. Your data is your moat; the structure is what lets the AI use it without hallucinating or wasting tokens searching blindly.

### 2. Levels 1 and 2: The Router File and the Ingested Wiki

*Where almost everyone should actually live*

Level 1 is where you always start, and it is deceptively powerful. You create a CLAUDE.md (or AGENTS.md for Codex) that loads automatically every session - but the key insight is to treat it as a router, not just a system prompt. Beyond telling the AI who you are, it holds routing rules: personal background lives in /context, quarterly priorities live in a specific folder, decisions live in an append-only log with dates. The reason your agent sometimes says I do not know what you are talking about when the files clearly exist is that you never gave it a rule pointing there - it will not, and should not, search your whole vault automatically, because that wastes time and tokens. Set the routing properly and you simply stop re-explaining things. Level 2 builds directly on top: you start ingesting notes and transcripts into a wiki, where the agent auto-creates an indexed set of concept pages that backlink to each other, and your CLAUDE.md grows to route to /wiki, /references, and /memory. In Claude Code you can turn on auto-memory, and the AI writes and updates the memory file on its own. This is the level most people should sit at - it handles thirty-plus notes you keep forgetting, and the wiki's indexes let the agent drill from a topic into its sub-pages. Backlinks feel like a knowledge graph but are not one; they connect pages without describing how they relate, which is the difference that matters at higher levels.

### 3. Levels 3, 4, and 5: Semantic Search, Knowledge Graphs, and the Always-On OS

*More power, more maintenance - only climb if you feel real pain*

Level 3 adds semantic search: instead of keyword matching, a vector layer - through Obsidian smart search, Supabase, Pinecone, or Qdrant - chunks your documents, embeds them, and stores them by meaning. Keyword search says X equals X; semantic search says X is similar to X, Y, and Z, so you find things even when you search different words than you originally wrote. Its one catch is that it retrieves matching chunks, not whole documents, which is exactly why the work-backwards mindset matters: you have to chunk your data around the questions you will ask. Level 4 is a knowledge graph, where nodes connect through typed relationships - this is endorsed by that, this blocks that, this depends on that - letting you trace a chain from one topic all the way back to another. You only need it if you genuinely require relationship chains; if backlinks are enough, do not build it. Level 5 is the always-on brain OS: everything above, plus constant background syncing and refreshing through crons or background agents, so it updates itself autonomously. It is the most powerful and the one many experienced builders deliberately avoid, because too much auto-ingested context can do more harm than good. The honest guidance is that Level 5 is not the goal - the goal is the lowest level that removes your actual pain. And one more distinction underpins all of it: separate context from connections. Context is evergreen - quarterly goals, locked decisions, durable notes - and belongs ingested into the brain. Connections are things that change weekly - Slack threads, emails, live customer data - which you should not ingest as they become noise you have to prune; instead, give the brain access to fetch them on demand, routing to your CRM or ClickUp as the last stop in its search order. Ask of any piece of data: in a year, will this memory still be useful? If yes, ingest it. If not, just make it reachable.

### 4. Finding Your Level: Match Each Folder to Its Pain

*Your system is not one level - and it should not be*

The most freeing idea in this whole framework is that your project does not sit at a single level, and it is not supposed to. One folder might be Level 2, another Level 4, another still at Level 1 - each part matched to the retrieval problem it actually has. So diagnose by symptom. If you are re-explaining your setup and hunting by exact words and filenames, you are at Level 1 and that may be all you need. If you have thirty or more notes and keep forgetting what is in them, move that area to Level 2 with an ingested wiki. If your routing keeps whiffing on notes you know exist because you search different words than you wrote, that folder wants Level 3 semantic search. If you need to follow chains of questions and relationships across topics, that is a Level 4 knowledge-graph problem. And if you are running offline agents over huge data and syncing several agent harnesses together, only then are you looking at Level 5. The discipline that ties it together is simple: if a folder has no pain, do not level it up. Complexity you do not need is not sophistication - it is future maintenance and noise. Get your own system working end to end at the lowest level that serves you, use it every single day until it is second nature, and only climb a level when a real, felt problem forces you to. That is how a second brain stays an asset instead of becoming another system you have to manage.

## الخطوات

### 1. العقلية: اشتغل بالمقلوب من السؤال

*كيف رح تسترجع البيانات بيقرّر كيف لازم تخزّنها*

قبل أي هيكل مجلدات، في عقلية وحدة بتقرّر إذا الدماغ الثاني رح يشتغل: لازم تبنيه بالمقلوب. لا تنظّم بياناتك حول كيف بتوصل - نظّمها حول الأسئلة اللي رح تسألها بعدين، لأن طريقة استرجاع المعلومة بتقرّر طريقة تخزينها من الأساس. التشبيه كرة سلة وحلقة: إنت عارف إن الحلقة دائرية والكرة لازم تفوت فيها، فأبداً ما رح تصمّم كرة مربّعة. ابدأ من شكل الاسترجاع، والتخزين بيتبع. وظيفة الدماغ الثاني، تحت كل الفيجوال والمبالغة، بسيطة: هل وكيلك بيقدر يلاقيها من جديد، وهل إنت بتقدر تلاقيها من جديد؟ إذا الجواب لأ، ما عندك مشكلة ذاكرة - عندك مشكلة توجيه (Routing) وهندسة مجلدات. وكل الموضوع مجرّد ملفات markdown ومجلدات، وهاد اللي بيخلّيه مستقل عن الأداة. نفس الهيكل بيشتغل بـ Claude Code، وبـ Codex، ومع أي وكيل، لأنك عم تنظّم ملفات مو عم تلتزم بمنصّة. بياناتك هي حاجزك التنافسي؛ والهيكل هو اللي بيخلّي الذكاء الاصطناعي يستخدمها بدون ما يهلوس أو يهدر توكنز عم يدوّر عالعمى.

### 2. المستوى الأول والثاني: ملف التوجيه والويكي المُدمَج

*وين المفروض معظم الناس فعلاً يقعدوا*

المستوى الأول هو من وين دايماً بتبدأ، وهو أقوى مما بيبيّن. بتعمل CLAUDE.md (أو AGENTS.md لـ Codex) بيتحمّل تلقائياً كل جلسة - بس الفكرة المفتاح إنك تتعامل معه كموجّه (Router)، مو بس system prompt. أبعد من إنه يقول للذكاء الاصطناعي مين إنت، بيحمل قواعد توجيه: الخلفية الشخصية بـ /context، أولويات الربع بمجلد محدّد، القرارات بسجلّ إضافة-فقط مع تواريخ. السبب اللي بيخلّي وكيلك أحياناً يقول «ما بعرف عن شو عم تحكي» بينما الملفات موجودة بوضوح إنك أبداً ما أعطيته قاعدة بتأشّر لهناك - هو ما رح، ولا لازم، يبحث بكل الـ vault تلقائياً، لأن هاد بيهدر وقت وتوكنز. ظبّط التوجيه صح وببساطة بتوقف تعيد الشرح. المستوى الثاني بيبني مباشرة فوقه: بتبلّش تدمج ملاحظات وتفريغات بويكي، وين الوكيل بيعمل تلقائياً مجموعة صفحات مفاهيم مفهرسة بتترابط ببعضها، وCLAUDE.md بيكبر ليوجّه لـ /wiki و/references و/memory. بـ Claude Code بتقدر تشغّل auto-memory، والذكاء الاصطناعي بيكتب ويحدّث ملف الذاكرة لحاله. هاد المستوى اللي معظم الناس المفروض يقعدوا فيه - بيتعامل مع ثلاثين ملاحظة وأكثر بتنساها، وفهارس الويكي بتخلّي الوكيل يحفر من موضوع لصفحاته الفرعية. الـ backlinks بتحسّها knowledge graph بس مو هيك؛ بتوصل صفحات بدون ما توصّف كيف بترتبط، وهاد الفرق اللي بيهم بالمستويات الأعلى.

### 3. المستويات 3 و4 و5: البحث الدلالي، ومخططات المعرفة، والنظام الدائم

*قوّة أكثر، صيانة أكثر - اطلع بس إذا حسّيت وجع حقيقي*

المستوى الثالث بيضيف البحث الدلالي: بدل مطابقة الكلمات، طبقة vector - عبر Obsidian smart search أو Supabase أو Pinecone أو Qdrant - بتقسّم وثائقك، بتعمللها embedding، وبتخزّنها بالمعنى. البحث بالكلمة بيقول X بيساوي X؛ والبحث الدلالي بيقول X شبيه بـ X وY وZ، فبتلاقي أشياء حتى لو بحثت بكلمات غير اللي كتبتها أصلاً. مشكلته الوحيدة إنه بيسترجع أجزاء (chunks) مطابقة مو وثائق كاملة، وهاد بالضبط ليش عقلية الاشتغال-بالمقلوب بتهم: لازم تقسّم بياناتك حول الأسئلة اللي رح تسألها. المستوى الرابع هو knowledge graph، وين العقد بتترابط بعلاقات موصوفة - هاد مدعوم من هاد، هاد بيمنع هاد، هاد بيعتمد على هاد - فبتقدر تتبّع سلسلة من موضوع لموضوع تاني بالكامل. بتحتاجه بس إذا فعلاً بدك سلاسل علاقات؛ إذا الـ backlinks بتكفي، لا تبنيه. المستوى الخامس هو نظام الدماغ الدائم: كل اللي فوق، زائد مزامنة وتحديث مستمرين بالخلفية عبر crons أو وكلاء خلفيين، فبيحدّث حاله باستقلالية. هو الأقوى واللي كتير بنّائين خبيرين بيتجنّبوه بقصد، لأن سياق مُدمَج زيادة بيقدر يعمل ضرر أكثر من فايدة. التوجيه الصادق إن المستوى الخامس مو الهدف - الهدف أدنى مستوى بيشيل وجعك الفعلي. وفي تمييز أخير بيسند كل هاد: افصل السياق (Context) عن الاتصالات (Connections). السياق دائم - أهداف الربع، القرارات المقفلة، الملاحظات المتينة - وبينتمي للدمج بالدماغ. الاتصالات أشياء بتتغيّر أسبوعياً - Slack threads، إيميلات، بيانات عملاء حيّة - اللي ما لازم تدمجها لأنها بتصير ضجيج لازم تنقّيه؛ بدالها، أعطِ الدماغ وصول يجيبها عند الطلب، بتوجيه للـ CRM أو ClickUp كآخر محطة بترتيب بحثه. اسأل عن أي بيانات: بعد سنة، هالذاكرة رح تضل مفيدة؟ إذا آه، ادمجها. إذا لأ، بس خلّيها قابلة للوصول.

### 4. إيجاد مستواك: طابق كل مجلد مع وجعه

*نظامك مو مستوى واحد - ولا لازم يكون*

أكثر فكرة محرّرة بهالإطار كله إن مشروعك ما بيقعد على مستوى واحد، ومو مفروض يكون. مجلد ممكن يكون المستوى الثاني، وتاني الرابع، وتالت لسا بالأول - كل جزء مطابَق مع مشكلة الاسترجاع اللي فعلاً عنده. فشخّص بالعَرَض. إذا عم تعيد شرح إعدادك وعم تصطاد بكلمات وأسماء ملفات بالضبط، إنت بالمستوى الأول وممكن هاد كل اللي بتحتاجه. إذا عندك ثلاثين ملاحظة أو أكثر وبتنسى شو فيها، حرّك هالمنطقة للمستوى الثاني بويكي مُدمَج. إذا توجيهك بيضيّع ملاحظات بتعرف إنها موجودة لأنك بتبحث بكلمات غير اللي كتبتها، هالمجلد بدّه بحث دلالي مستوى ثالث. إذا بدك تتبّع سلاسل أسئلة وعلاقات عبر مواضيع، هاد مشكلة knowledge graph مستوى رابع. وإذا عم تشغّل وكلاء أوفلاين على بيانات ضخمة وعم تزامن كذا وكيل سوا، بس وقتها عم تبصّ على المستوى الخامس. الانضباط اللي بيربط كل هاد بسيط: إذا مجلد ما عنده وجع، لا تطلّعه مستوى. التعقيد اللي ما بتحتاجه مو تطوّر - هو صيانة مستقبلية وضجيج. خلّي نظامك يشتغل من أوله لآخره بأدنى مستوى بيخدمك، استخدمه كل يوم لحتى يصير طبيعة ثانية، وبس اطلع مستوى لما مشكلة حقيقية محسوسة تجبرك. هيك الدماغ الثاني بيضل أصل بدل ما يصير نظام تاني لازم تديره.

## Prompt (البرومبت)

```text
# THE 5 LEVELS OF AN AI SECOND BRAIN: STRUCTURE REFERENCE
# It is all markdown files + folders. Tool-agnostic: Claude Code, Codex, any agent.
# Core rule: work BACKWARDS from the questions you will ask.

# ════════════════════════════════════════
# LEVEL 1: EXACT WORD / NAME  (start here, always)
# ════════════════════════════════════════
# A CLAUDE.md (or AGENTS.md) that loads every session + a few folders.
# The CLAUDE.md is a ROUTER, not just a system prompt. Example:
"""
# WHERE THINGS LIVE (routing rules)
- Personal background about me → /context/about-me.md
- Tech stack & tools → /context/stack.md
- Big decisions (append-only log with dates) → /context/decisions.md
- Ongoing projects & clients → /projects/<name>.md
Always read /context first. Never search the whole vault blindly.
"""
# Folders: /context (about-me, stack, decisions), /projects (per project/client)
# Fixes: re-explaining yourself. If the agent asks "where is that?", you
#   never gave it a routing rule pointing there.

# ════════════════════════════════════════
# LEVEL 2: PULL A WHOLE TOPIC TOGETHER  (LLM wiki + memory)
# ════════════════════════════════════════
# Add an INGESTED WIKI: tell the agent to ingest transcripts/notes into a
#   /wiki with an index + backlinked concept pages it auto-creates.
# CLAUDE.md now also routes to: /wiki, /references, /memory
# Turn on auto-memory (Claude Code: /memory → on). The agent writes and
#   updates /memory on its own.
# Tool-agnostic tip: copy CLAUDE.md → AGENTS.md so Codex reads it too;
#   point Codex to memory.md manually ("for memories, read /memory.md").
# Good for 30+ notes you keep forgetting. The wiki has indexes, so the
#   agent drills: topic → sub-page → deeper page. (Backlinks ≠ knowledge graph.)

# ════════════════════════════════════════
# LEVEL 3: SEMANTIC SEARCH  (meaning, not keywords)
# ════════════════════════════════════════
# Add a vector layer (Obsidian smart search / Supabase / Pinecone / Qdrant).
# Documents are chunked → embedded → stored by MEANING in vector space.
# Keyword search = "X equals X". Semantic = "X is similar to X, Y, Z".
# Solves: your routing whiffs on notes you KNOW exist because you searched
#   different words than you wrote.
# Watch-out: it returns matching CHUNKS, not whole docs. Design your
#   chunks around the questions you will ask ("summarize the Mar 5 meeting").

# ════════════════════════════════════════
# LEVEL 4: KNOWLEDGE GRAPH  (relationship chains)
# ════════════════════════════════════════
# Nodes + typed relationships ("endorsed by", "blocks", "depends on").
# Lets you trace a chain: ask about topic X → follow it back to topic A.
# Use ONLY if you genuinely need relationship chains + semantic meaning.
#   If backlinks are enough, you do not need this.

# ════════════════════════════════════════
# LEVEL 5: ALWAYS-ON BRAIN OS  (autonomous, self-syncing)
# ════════════════════════════════════════
# Everything above + constant syncing/refreshing (crons, background agents).
# Powerful, but risky: too much auto-ingested context can do more harm
#   than good. Many pros deliberately stay BELOW this and stay in control
#   of what gets ingested.

# ─── CONTEXT vs CONNECTIONS (what to INGEST vs what to REACH) ───
# INGEST (evergreen, keep forever): quarterly goals, locked decisions,
#   durable notes. Ask: "in a year, is this still worth having?"
# DO NOT INGEST (changes weekly = noise): Slack threads, emails, live
#   customer data. Instead, give the brain ACCESS to fetch it on demand
#   (e.g. route to ClickUp/CRM via MCP as the last stop in the search order).

# ─── HOW TO FIND YOUR LEVEL ───
# Re-explaining setup / need exact-word lookup → Level 1
# 30+ notes, forget what is in them → Level 2
# Routing whiffs on notes you know exist → Level 3
# Need relationship chains → Level 4
# Offline agents + huge data + syncing many agents → Level 5
# Match each FOLDER to its own level. No pain in a folder = leave it.
```

---

More free bilingual AI guides: https://www.aiwithmo.com/prompts · One to one AI mentorship in Arabic or English: https://www.aiwithmo.com/mentorship
