Your Personal Agent Operating Layer.
Build an AI that inherits your logic, style, and memory, instead of just answering prompts.
digital-twin is a file-first blueprint for building a personal agent operating layer: keep your knowledge in inspectable files, route work to focused capabilities, produce durable outputs, and write reusable lessons back into the system.
If you only have 5 minutes, start here:
- Read the thesis to understand the operating model.
- Open
playground/to see the file structure of a personal twin. - Follow TRY_IT.md to run a small writing/research workflow against local files.
- Browse the live docs: https://stevenchouai.github.io/digital-twin/.
Most AI agents start from scratch every time you talk to them. They don't know what you know, how you think, or where you save things.
digital-twin is different. It is not a prompt pack, a generic RAG demo, or a chatbot persona. It is a Personal Agent Operating Layer blueprint: a file-based template for making an agent inherit your long-running knowledge, workflows, skills, and learning loop.
This repository currently ships the operating model and workspace structure, not a hosted runtime. The point is to show how to organize a personal AI system so any capable coding agent or AI IDE can run it against real files.
- ๐ Traditional AI: Prompt -> Answer -> End.
- ๐ข Digital Twin: Understand Intent -> Retrieve your Knowledge -> Route to your Skills -> Execute -> Write Back & Learn.
How the system works: Raw Input โ Knowledge Wiki โ Capability Router โ Execute & Write Back โ Learning Loop
What makes a digital twin powerful is not a mega-prompt โ it's knowing which skill to use for which task.
The twin doesn't do everything the same way. It detects your intent, then routes to the right capability module โ each with its own workflow, constraints, and output format.
| Intent | Capability | What It Does |
|---|---|---|
| ๅๆ็ซ ใๆด็ๅฃ่ฏญ่ฎฐๅฝ | Content Creation | Reads wiki & style guide โ drafts โ publishes to Blog/ |
| ๅทๆฐ็ฅ่ฏๅบใingest ่ตๆ | Wiki Management | Scans raw/ for increments โ creates summaries โ updates index |
| ็ ็ฉถไปฃ็ ๅบใๅๆๆถๆ | Codebase Research | Builds mental model โ extracts value โ produces research report |
| ๆน็ฝ็ซใไผๅ SEO | Site Improvement | Checks existing positioning โ edits files โ writes back rules |
| ๆน็ฎๅใJD ๅๆ | Resume Craft | Reads career context โ tailors to JD โ outputs draft |
| ๅค็ใๆฒๆท็ป้ช | Learning Loop | Asks 4 questions โ extracts durable rules โ writes to wiki |
| review ็ฅ่ฏๅบใ่็ฑปๆด็ | Knowledge Growth | Syncs state โ digests new notes โ clusters topics โ reviews timeline |
Each capability is a standalone file. You can add, remove, or modify them without touching the core system.
- ๐ง Personal Wiki First: Pulls from your
wiki/, prior outputs, style rules, andagent-learnings/before acting. - ๐งญ Intent Routing: Classifies the request before execution, then chooses the right capability instead of forcing everything through one mega-prompt.
- ๐ Skills / Capabilities: Keeps reusable workflows in standalone capability files for writing, research, wiki management, resume work, site improvement, and learning loops.
- ๐พ Write-back System: Generates durable files in your workspace, not just chat bubbles.
- ๐ Learning Loop: Distills new preferences, failure modes, and reusable rules into future context.
The market is moving from "ask a model a question" toward personal agent systems that can remember context, call tools, and operate inside a user's real workflow. digital-twin maps that trend into a practical local blueprint:
| Trend | What it means in practice | How this repo handles it today |
|---|---|---|
| Agent memory | Useful agents need durable context across sessions, not just a longer chat window. | Uses wiki/, published outputs, and agent-learnings/ as inspectable memory files. |
| MCP / tools / skills | Agents increasingly need standard ways to reach files, apps, tools, and repeatable workflows. | Models capabilities as modular skill files that can later be connected to MCP servers or AI IDE tools. |
| Personal AI workflow | The differentiator is not a generic assistant; it is whether the agent follows one person's actual operating model. | Routes by intent, reads Steven-style assets, executes in the workspace, then writes back rules. |
| Local-first / BYO knowledge | Users need control over private notes, project files, and knowledge boundaries. | Keeps the template file-based and bring-your-own-knowledge instead of requiring a proprietary memory store. |
The project is intentionally honest about its current state: it is a blueprint/template for a Personal Agent OS, not a claim that every connector, scheduler, memory service, or UI has already been implemented.
We don't just talk about it โ we built a complete demo to prove it. The Elon Musk Digital Twin shows how the system uses real public resources to operate with his logic.
- 4 raw sources โ Starship engineering feedback, Tesla production lessons, SpaceX culture, AI risk stance
- 4 wiki pages โ Management rules, First Principles, Decision-Making framework, Communication style
- Each resource has a reason โ See
SHOWCASE.mdfor why each was collected and how they connect
| Without wiki | With wiki loaded | |
|---|---|---|
| Opening | "Dear Team, I wanted to provide an update..." | "The tile process has an Idiot Index problem." |
| Instruction | "I'd like to suggest we explore improvements..." | "DELETE the manual gap check. Effective immediately." |
| Sign-off | "Best regards, Elon" | "This is not optional. Elon" |
graph TD
A[User Intent] --> B(1. Understand Intent)
B --> C(2. Retrieve Context)
C -->|Reads wiki/ & learnings/| D(3. Route to Capability)
D --> E(4. Execute & Write Back)
E -->|Saves files| F(5. Learning Loop)
F -->|Updates rules| C
You don't need a massive database to start. The playground/ folder is a lightweight Steven-style workflow demo that shows the full operating loop with real files.
| Step | File / Action | What to observe |
|---|---|---|
| Input | playground/raw/thoughts/2026-04-23-why-most-ai-feels-generic.md |
Raw thought material enters the system. |
| Knowledge retrieval | playground/wiki/_index.md, prior blog posts, and learning notes |
The agent checks existing context before writing. |
| Capability routing | capabilities/content-creation.md |
The request routes to content creation instead of generic chat. |
| Execution | playground/Blog/Published/ |
The expected output is a durable draft file. |
| Write-back learning | playground/wiki/outputs/agent-learnings/ |
The run should leave reusable writing rules for next time. |
- Open
playground/in Cursor, Claude Code, Codex, Windsurf, or your agent runner of choice. - Open
playground/FIRST_PROMPT.md. - Ask the agent to execute it inside the workspace.
- Check that it writes a blog draft under
playground/Blog/Published/and a learning note underplayground/wiki/outputs/agent-learnings/.
If the agent only returns a chat answer, the demo failed: the operating layer is about retrieval, routing, execution, and write-back. For a stricter proof check, use the Steven Workflow success checklist.
To make it yours, replace the files in playground/raw/thoughts/ and wiki/ with your own notes, transcripts, and rules. Keep the loop.
Dive deeper into the philosophy and architecture:
- ๐ Documentation Website
THESIS.md: The core philosophy behind the Personal Agent Operating Layer.WORKFLOW.md: How the 5-step loop actually runs under the hood.SKILL.md: How to define specific capabilities.docs/demo/proof-chain.md: A reviewer-facing map from claims to inspectable artifacts.docs/demo/steven-workflow.md: A walkthrough of the self-workflow demo.
Contributions are welcome when they make the operating loop easier to inspect, run, or adapt. Please read CONTRIBUTING.md before opening a PR.
This project is licensed under the MIT License.