The short answer
Start with one narrow job your users already do by hand, such as answering questions about their own account or drafting a reply, and build only what that job needs: a model API, retrieval over the customer’s own data, a few tool calls into your API that run with the signed-in user’s permissions, and a chat panel or inline button. Keep every tenant’s data separate on the server, ask the user to confirm anything that changes data, and test against real questions before launch. Then release it behind a feature flag to a few customers and measure whether people use it and finish their task.
Key points
- Pick one job the copilot does well before adding a second. A copilot that does everything usually does nothing reliably.
- The copilot should act as the signed-in user, through your own API, with exactly that user’s permissions and nothing more.
- Tenant isolation is enforced by your server on every retrieval and tool call, never by instructions to the model.
- Reading is low risk; writing, sending and deleting need a confirmation step the user can see.
- Read each model provider’s data-usage terms and sign its data processing terms before customer data goes through it.
- Release behind a feature flag, starting with your own team and a few willing customers, and measure task completion, not just messages sent.
Pick the first job the copilot should do
An AI copilot, or assistant, is a feature inside your product that understands a request in plain language and helps the user get something done: find an answer, draft something, summarize a record, or carry out a step on their behalf. The mistake most teams make is starting with a general chat box and hoping users discover what it is good for. A better start is one job that is frequent, a little tedious, and easy to check.
Look at your support tickets, your onboarding calls and the screens where users spend the most time. Jobs that recur there are good candidates. Ask three questions about each: how often does it happen, how bad is a wrong answer, and can the user tell quickly whether the result is right?
| Kind of job | Example | Risk if wrong | Good first pick? |
|---|---|---|---|
| Answer questions about the product | “How do I export last quarter’s report?” | Low: the user tries the steps and sees | Often yes |
| Answer questions about the user’s own data | “Which invoices are overdue for this client?” | Medium: a wrong number can mislead | Yes, if answers link to the records they used |
| Draft or summarize | A reply to a customer, a summary of a long thread | Low to medium: the user edits before sending | Often yes |
| Take actions | Create a task, update a status, send an email | Higher: the change is real | Later, with confirmation steps |
Write the job down in one sentence, with who uses it and what “done” looks like. That sentence decides which data the copilot needs, which actions it may take, and how you will test it.
The building blocks
Most copilots are assembled from the same four parts. None of them requires training your own model.
- A large language model, called through a provider’s API. Your server sends the conversation, the relevant context and a list of tools, and gets back text or a request to call a tool.
- Your data, brought in through retrieval. Instead of putting everything into the prompt, the server finds the few help articles, records or documents that matter for this question and passes only those. RAG explained covers how retrieval works and where it goes wrong.
- Tools that call your own API. A tool is a function the model may ask your server to run, such as “search invoices” or “create task”. Your server runs it through the same API and permission checks your app already uses, as the signed-in user. If your app has roles, the copilot inherits them; What is RBAC? explains how roles and permissions fit together.
- A user interface. Either a chat panel that sits beside the product, or inline actions such as a “Summarize” button on a record or a “Draft reply” button in a composer.
| Interface | Works well for | Watch out for |
|---|---|---|
| Chat panel | Open questions, multi-step tasks, users who know what they want to ask | An empty box gives no hint of what it can do; show a few suggested prompts |
| Inline action | One repeated job on a specific screen, such as summarize or draft | Less flexible; each new job needs its own button |
| Both | Products where a few jobs are common and others are occasional | Two entry points to keep consistent |
Inline actions are often the easier first release. The user already sees the record, the job is obvious, and the result is easy to check.
Keep every customer’s data separate
In a SaaS product, many customers share the same application and often the same database. The copilot must never see, retrieve or mention data from another tenant. Multi-tenant architecture covers the general patterns; for a copilot, three rules matter most.
- The tenant comes from the user’s session on the server, not from anything the model writes. If a tool takes a tenant ID as an argument the model fills in, a crafted message can point it at someone else’s data.
- Retrieval filters by tenant and by user permission before results reach the model. The OWASP Top 10 for LLM applications lists this under vector and embedding weaknesses, and recommends permission-aware stores and strict partitioning so one group’s documents are never retrieved for another’s queries.
- Anything you cache or log is tenant-scoped too: conversation history, embeddings, saved prompts and evaluation samples.
Test this directly. Create two test tenants with similar data, sign in as one, and ask the copilot about the other by name. It should know nothing.
Guardrails and human approval for actions
A copilot that only reads is a search feature with better manners. Once it can create, update, send or delete, it can cause real harm, through a model mistake or through instructions hidden in content it reads, such as an email or a document a customer uploaded. That second risk is prompt injection, and no prompt fully prevents it.
OWASP calls the general problem excessive agency. Its advice fits copilots well: give each tool only the permissions it needs, run actions as the individual user rather than as a shared high-privilege account, and require a person to approve high-impact actions before they happen.
- Split tools into read and write. Read tools can run straight away; write tools return a preview of the change first.
- Show the user exactly what will happen, in plain words, with a confirm button. “Change the status of 14 tasks to Done” is clearer than “Run bulk update”.
- Put limits in code, not in the prompt: how many records one action may touch, which fields it may change, and which actions are not offered at all.
- Log every tool call with the user, tenant, arguments and result, so you can explain later what happened.
The design of these controls is covered in more depth in AI agent guardrails.
Evaluate before launch
A copilot can look impressive in a demo and still be wrong often enough to lose users’ trust. Before release, measure it against questions that look like the ones real users will ask.
- Collect real questions from support tickets, sales calls and your own team’s use. Include awkward ones: vague requests, typos, questions about features you do not have.
- Write down what a good answer or action looks like for each one, including the records it should cite.
- Run the copilot over the set and grade the results, by hand at first and later with automated checks where the answer is clear-cut.
- Add cases that must fail safely: requests for another tenant’s data, actions the user’s role does not allow, and documents with hidden instructions.
- Rerun the full set whenever you change the prompt, the model, the retrieval or a tool, and compare against the last run.
The methods behind this, from test sets to graders, are in How to evaluate AI agents.
Privacy and the model provider’s data terms
When the copilot sends your customers’ data to a model provider, that provider becomes part of how you handle personal and business data. Your customers will ask about it, and many will read your answer closely. Check each provider’s own data-usage page and terms before you choose. Three examples, as their pages read when this guide was written:
| Provider | What its page says about training | Other points on the page |
|---|---|---|
| OpenAI API | API data is not used to train its models unless you opt in | Abuse monitoring logs are kept for a limited period by default; zero data retention is available to approved, eligible customers |
| Anthropic commercial products, including the API | Inputs and outputs are not used for training, with exceptions such as feedback you choose to send | Terms differ from its consumer apps |
| Google Gemini API | Paid services: prompts and responses are not used to improve products. Unpaid services: content may be used to improve products and read by human reviewers | Google tells users not to send sensitive or personal information to the unpaid services; paid use is covered by a data processing addendum |
Terms change, so check them again before launch and whenever you switch models. Beyond training, ask how long prompts are kept, where they are processed, and whether the provider uses other companies to process them.
- Sign the provider’s data processing terms. Under the EU GDPR, a company that processes personal data on your behalf must be bound by a contract that covers instructions, confidentiality, security, sub-processors and deletion at the end; the European Data Protection Board’s guide for small businesses lists the required points. Other countries have their own rules.
- Add the provider to your list of sub-processors and update your privacy policy, if you have customers who rely on them.
- Send only what the job needs. A copilot that summarizes a support thread does not need the customer’s billing details.
- Let workspace admins switch the copilot off for their tenant. Some customers will need that before they can agree to it.
This section is general information, not legal advice. Data protection law differs by country and by industry, so ask a lawyer where you operate to review your terms.
Roll out behind a feature flag and measure use
Ship the copilot behind a feature flag so you can turn it on for some users and off for everyone without a new deploy. Martin Fowler’s article on feature toggles describes the two kinds that matter here: release toggles that hide unfinished work, and permissioning toggles that turn a feature on for chosen users, such as beta customers.
- Turn it on for your own team first and use it on real work.
- Invite a few customers who asked for it, tell them it is a beta, and give them an easy way to report a bad answer.
- Widen the flag gradually while watching quality, error rates and model usage.
- Keep a per-tenant switch so a customer can turn it off, and a global switch so you can.
Measure whether it helps, not just whether it is used:
- Adoption: the share of active users who try it, and the share who come back to it.
- Task completion: for actions, how often a suggestion is confirmed; for drafts, how often the draft is sent and how much it was edited first.
- Quality signals: thumbs up and down, “that is wrong” reports, and conversations that end with the user contacting support.
- Operations: response time, failed tool calls, and model usage per tenant, so you can see what drives your costs and set fair-use limits.
Review a sample of real conversations regularly, with tenant consent and personal data removed, and add the failures to your test set. That loop is what makes a copilot better over time.
If you are planning a copilot for your product, AI agent development describes how we approach the build: the code lives in your GitHub from day one, and the founders are on the calls.
Sources
Checked when this guide was written.
- OpenAI: Data controls in the OpenAI platform
- Anthropic Privacy Center: Is my data used for model training?
- Google: Gemini API Additional Terms of Service
- OWASP Gen AI Security Project: LLM06:2025 Excessive Agency
- OWASP Gen AI Security Project: LLM08:2025 Vector and Embedding Weaknesses
- European Data Protection Board: Data controller or data processor
- Martin Fowler: Feature Toggles (aka Feature Flags)