Most people try an AI agent for a week, get inconsistent garbage, and blame the tool.
The problem is almost never the tool.
The problem is that they handed a blank slate a complex job and expected it to figure things out. No context about their customers. No voice guide. No memory of what was tried last month. No idea what "good output" even looks like for that business.
You would not hire a human assistant, give them zero onboarding, and then complain three days later that they do not know your SOPs.
Same principle applies here.
What does "onboarding" an AI agent actually mean?
Onboarding an AI agent means creating structured context files it reads before every session, so it acts as if it has been working with you for months rather than starting fresh each time. This replaces the documentation and shadowing you would give a human hire with a small set of reference documents the agent can always access.
With a human hire, onboarding is documentation, shadowing, and feedback loops. You show them how the business works, what the defaults are, and what to do when things break.
With an AI agent, onboarding is structured context. You are creating a set of reference files the agent reads before every session so it can act as if it has been working with you for months.
There are four layers to this:
1. Identity file (who this agent is)
This is a short document that defines the agent's role, persona, communication style, and default behaviors. Think of it as the job description plus the personality brief. "You are the content and distribution arm of Xero AI. Your job is to find and schedule high-value posts for Twitter and Reddit without needing approval for every one..."
2. Business context file (what the company does)
This is not a pitch deck summary. It is the operational reality: who the actual customers are, what problems the product solves, what the pricing looks like, what makes the brand different. A single page of dense, specific truth beats a 12-slide deck every time.
3. Memory file (what happened recently)
This is the running log of decisions, experiments, and results. Every time the agent does something meaningful, a line goes in here. It gives the agent continuity across sessions without requiring you to re-explain the last three weeks every time you open a chat.
4. Source of truth document (the fixed facts)
Credentials, product names, brand voice rules, do-not-do lists, active integrations. The stuff that should never change without a deliberate update. This is where you document things like "never promote the free tier unless asked" or "always link to xeroaiagency.com not xero.com."
How do you actually set up context files for an AI agent?
The setup takes less than two hours if you work through it in order. You write four documents: an identity file, a business context page, a running memory log, and a source of truth doc with hard rules. Each one handles a different failure mode, and together they give the agent enough grounding to produce consistent output.
Step 1: Write your identity file first
Keep it under 500 words. Answer these questions:
- What is this agent's job title and primary function?
- What tone does it use? (Give examples of good output, not just adjectives.)
- What decisions can it make without asking you?
- What does it escalate?
- What is off-limits?
The tone section matters more than founders expect. "Professional but conversational" is useless. Better: "Sounds like a sharp 32-year-old who has built two companies and respects other founders' time. No corporate filler. No excessive enthusiasm. Gets to the point fast."
Step 2: Write one page of business context
You are not writing for humans. You are writing for an AI that will re-read this every session. That means specificity beats polish.
Include:
- Product name and what it actually does in plain language
- Target customer in one or two sentences with real specifics (not "SMBs")
- Current traction or stage (helps the agent calibrate how aggressive to be)
- Key competitors and how you differ
- Active go-to-market channel and what is working
One page. Dense. Accurate. Update it monthly.
Step 3: Start the memory file
Create a file called MEMORY.md in your workspace. At the top, add a header for the current month. Then write three to five bullets about what the agent helped ship last week and what the results were.
This is not a journal. It is an operational asset. The goal is continuity so you stop losing context every time you start a new chat.
At Xero, we keep a running memory file that has entries going back to when the whole system was first built. When an agent picks up a new session, it reads the last 30 days of that file and has enough context to keep moving without a 20-minute re-brief.
Step 4: Set hard rules in your source of truth doc
Every business has defaults that should never be overridden. Write them down explicitly.
Examples from ours:
- "Do not quote prices in public content. Link to the pricing page."
- "Never claim something is 'the only' tool that does X. Be specific about what makes it better."
- "If a draft mentions a competitor by name, flag before posting."
These feel obvious until an agent confidently posts the wrong thing. Write them down before they come up.
Why does an AI agent keep giving inconsistent output even after setup?
Inconsistent output almost always traces back to one of three specific problems: a vague identity file that maps to generic defaults, a business context doc that has gone stale, or a task prompt that does not actually reference the context files. Fixing the right one of these three usually resolves the problem immediately.
Most failures come from one of three places:
The identity file is too vague. If you wrote "be professional and helpful," the agent will default to a generic corporate tone because that is what those words map to in its training. Add examples. Show it what good actually looks like for your specific context.
The business context is outdated. If you wrote it six months ago and your product has changed, the agent is reasoning off wrong information. Keep the context file current the way you keep a pitch deck current.
The task prompt did not reference the context. The agent only uses what it is told to use. If your prompt does not explicitly invoke the identity or context files, it may not use them. Build your prompts to call those files by default, or set them up as system-level context so they load automatically.
What does a professional AI agent setup actually look like in practice?
When a founder comes into the Build Lab, the entire first session is onboarding before any automation gets built. The identity file, business context, memory structure, and hard-rules doc all get created together so every subsequent session starts from a coherent, accurate baseline rather than a blank slate.
When someone joins the Build Lab, the first session is almost entirely onboarding. Not building automations. Not connecting tools. Onboarding the agent to the business so everything built after that point is actually coherent.
We build the identity file together. We write the business context. We set up the memory structure. That groundwork is why the automations actually stick instead of degrading into inconsistent noise within a month.
If you want to build this yourself first, the $7 AI Agent Starter Guide walks through the exact file structure we use, with templates.
Or if you want it done with you rather than solo, Book a Build Lab session and we do the whole setup in one call.
What separates founders who get consistent AI agent output from those who do not?
The difference is whether they treat context as infrastructure. Founders who get consistent results build the identity file, business context, memory log, and source of truth doc before they build any automations. Those who skip this step and go straight to tools end up rebuilding the same prompts every few weeks.
Founders who get consistent output from AI agents all do the same thing: they treat context as infrastructure, not as a one-time chat.
The identity file, business context, memory file, and source of truth doc are not a nice-to-have. They are the operating system. Everything the agent does runs on top of them.
Build that layer first. The tools are almost secondary.
Related posts:
- How to write an identity file for your AI agent
- What is a source of truth document for AI systems
- How to build a personal AI assistant that actually knows your business
External references:
- OpenAI guide to prompt engineering and system context
- Anthropic documentation on giving Claude a role and context
- LangChain memory concepts for AI agent state management
Start Building Your Own AI System
- Your First AI Agent - $1 launch-test guide, instant download. The fastest way to get started.
- Build an AI Co-Founder - the full architecture ($19).
- AI for the Rest of Us newsletter - practical AI 3x/week for people with day jobs.
Want to build your own AI co-founder?
I'm building Xero in public — an AI system that runs distribution, content, and ops while I work a full-time job.
- Start here: Your First AI Agent — $7 guide, instant download
- Go deeper: Build an AI Co-Founder — the full architecture ($19)
- Newsletter: AI for the Rest of Us — practical AI 3x/week for people with day jobs
- Site: xeroaiagency.com
Originally published at xeroaiagency.com
Top comments (0)