Skip to content

Set up your AI agent’s instructions and knowledge

Use one prompt to organise your Codex project and create a place to keep sources, decisions and useful work.

Use this first, before connecting Xero or building a tax agent. It gives the project a place for instructions, plans and reusable knowledge.

This guide is for Codex on your PC. It does not install or run Eve. For Hermes on a VPS, use the Hermes setup guide.

Why we do this

Before we build the agent, we give it a clear way to work and a place to keep what we learn.

The project structure tells Codex where instructions, tools and tests belong. The second brain keeps sources, decisions and useful knowledge in readable files.

That way, each session builds on the last—and you can inspect and correct the work instead of relying on chat history alone.

An agent in a folder

Think of the folder as the agent's working kit—not the AI itself.

It holds instructions for how to work, knowledge to refer to, and files showing decisions and results. As you develop the project, you can add reusable skills, tested scripts and checks for its particular job.

Codex does the work using the model and tools available in your session. The folder gives that work a purpose and a record you can inspect. For example, an accounting project can keep its accounting procedures and workpapers separate from a research project's sources and notes.

The folder is not an always-on service. Saved files can be read in a later session, but they do not automatically become memory, grant access to accounts or make the agent run in the background.

Where this fits in the seven components

In class, we describe an AI agent through seven components. This first setup establishes its instructions and knowledge, and prepares the structure for skills, tools and saved work. Codex supplies the model and working environment. We build and test the remaining capabilities as we go.

Class componentWhat this setup contributes
LLMCodex supplies the model; the folder does not contain it.
IdentityInstructions define the agent's role, rules and boundaries.
KnowledgeThe second brain organises sources and maintained notes.
MemorySaved decisions and work provide continuity when retrieved—not automatic recall.
SkillsThe structure provides places for reusable procedures; useful skills still need to be developed and tested.
ToolsCodex supplies available tools. This setup does not connect new APIs or accounts.
GovernanceInstructions document review and approval boundaries; technical enforcement needs separate implementation.

In the class slide, governance, control, privacy and safety surround the other six components. They apply to the whole agent, not just one folder or tool. Writing a rule is not the same as technically enforcing it.

The setup at a glance

What lives in the folder

Your project folder

Contains
  • Instructions & plans

    How to work and what to build.

  • Original sources

    The evidence you started with.

  • Maintained knowledge

    Connected notes, an index and a log.

  • Work files

    Drafts, decisions and results.

Reusable skills and tested scripts can be added later. The folder does not install or run them by itself.

How the work happens

  1. Your folder

    Instructions, sources and previous work

  2. Codex

    Reads relevant files; uses available model and tools

  3. You

    Inspect results, resolve questions and approve actions

Ask Codex to save useful results and decisions back to the folder for the next session.

A supervised loop—not an always-on service. Saved files can be read later; they do not automatically become memory or grant account access.

1. Open the project folder

Create a folder for the work, or choose an existing project. Open that folder as a project in Codex and start a chat there.

Choose the specific project folder—not your Downloads folder or a parent folder containing unrelated projects. You do not need to create a Git repository just for this lesson. If the folder already has files, leave them in place.

2. Paste the first prompt

Copy the whole prompt below into the project's chat. Let Codex inspect the folder before it makes changes. Answer any question about the target folder or conflicting instructions.

Implement these two guides in this Codex project:
https://gist.github.com/oruenboi/0b62aa40908d9562e4385deb850c2852
https://gist.github.com/oruenboi/4493518384a206a62afb3ce6fe3a0e26

3. Check what changed

Ask Codex to show the files it created or changed and the results of its checks. Inspect the files yourself.

You should find the equivalent of:

  • AGENTS.md: instructions for Codex working in this project.
  • devplan/: the goal, implementation plan and task list.
  • Architecture documentation and a non-executable agent design package. Exact names should fit the project.
  • raw/sources/ and raw/assets/: preserved inputs and attachments.
  • wiki/index.md, wiki/log.md and templates: navigation, maintenance history and reusable page formats.
  • A README or tools note explaining how to maintain and search the wiki.

Existing projects may already have these files. Merging them is preferable to creating duplicates. Empty folders can use .gitkeep.

These files organise work; they do not create an autonomous service or connect accounts. A statement that “setup is complete” is not a substitute for the file list and checks.

4. Try the second brain

Use a short, non-confidential source you can read yourself. For example, save a note about the workflow you want to build.

Ask:

Ingest this source into the project's second brain. Preserve the original, record its provenance, update the relevant wiki pages, index and log. Do not publish it.

Then ask a question whose answer is in that source:

Answer this question from the second brain: [your question]. Cite the source and separate supported facts from inference and missing evidence.

Compare the answer with the source. Finally:

Save the useful answer in the wiki. Keep the source references, update the index and append a log entry. Do not publish it.

If Codex cannot read a Gist, supply its Markdown content rather than accepting an invented implementation. If search is unavailable, it should disclose the limitation and read relevant files directly.

Next

Try Build an AI agent to prepare LinkedIn posts and comments as the next exercise. For accounting workflows, continue with Connect Xero or Build a tax computation agent. Account connections, installations and consequential actions need their own decisions and approvals.

References

Prepared from the Gist revisions inspected on 10 October 2026. This is a setup lesson, not a recorded student run; creating files does not prove later accounting workflows work.

Download Markdown guide