# Add an AI assistant to your app without writing a backend

You have a small app: a tracker, a planner, a list. Now you'd like to ask it things. "Plan next month for me." "Break this task into steps." "Give me five ideas like these."

An AI assistant inside the app can do that, with your app's own data as context. This guide shows how to add one from ChatGPT or Claude, without writing server code, and the one design choice that keeps it safe: **the AI proposes, you apply.**

![You ask in the app. A server action adds your key and asks the AI. The AI's answer comes back as proposed changes, and nothing is saved until you tap Apply.](/blog/images/ai-assistant-flow.svg)

## How it works

Three parts:

1. **A chat panel in the page.** You type a request and see the answers.
2. **An action on the server.** It reads your data, adds your AI key, calls the AI service, and saves the answer. The key never reaches the page.
3. **Proposed changes.** The AI doesn't edit your data. It answers in words, plus a list of changes it suggests ("add phase", "add note", "move this video to Scripted"). You see them, then tap **Apply** or **Dismiss**.

Part 3 is the one to insist on. An AI will sometimes misread a request, or invent something. If it can only propose, the worst a bad answer can do is waste a tap. And applied changes go through the same access rules as your own edits, so the AI can never do more than you could.

Here it is in a real app, a channel growth tracker. On the left, the roadmap has an **Ask AI** box and an **✦ AI** button on every item. On the right, the assistant answers a question about one item:

![Two phone screens from a growth tracker app: the roadmap with an Ask AI box and AI buttons on each checklist item, and the AI tab where Claude answers a question about one item.](/blog/images/growth-tracker-ai-screens.jpg)

## Step 1: Ask for it

With [Toupas added to your chat](/chat), describe what you want in plain words:

```
Add an AI assistant to my tracker app.
A chat panel where I can ask it to plan or change my roadmap.
It should use Claude with my own API key.
It must only propose changes: show them to me with an Apply button,
and change nothing until I tap it.
Save the chats so I can come back to them.
```

Name the AI service you have an account with: Claude, OpenAI or Gemini. If you want other people to use their own accounts, say so; [that's covered here](/blog/let-users-bring-their-own-ai-key).

## Step 2: Add your key, in the right place

The chat gives you a Toupas link to add your key. Paste it there, **never into the chat**. Toupas keeps it and adds it to each request to that one service. The app's code never sees it, and it never appears in the page.

Get the key from the AI service's own dashboard, and **set a monthly spending limit there too**. A busy day, or a bug that loops, then can't run up a large bill.

## Step 3: Approve what it sends

Because the assistant sends your data to another service, Toupas holds the change until you approve it. The approval page shows which service it calls and what it sends, using one of your own rows as the example. Read it: if it sends more than you expected, tell the chat.

You can also set a daily limit on how many times the action runs.

## Step 4: Try it, then add shortcuts

Ask for something small first: "What should I focus on this week?" Then ask it to change something, and check that **Apply** saves what it showed.

Once it works, shortcuts make it far more useful than a blank chat box:

- **Buttons with ready-made questions**, such as "Suggest the next phase" or "Review and improve".
- **An AI button on each item**, which sends that item and its notes along with the question: "Break into steps", "How do I do this?", "Ideas and examples".
- **Saving answers as notes**, so a good answer stays with the item it's about.

Ask for these in the same chat: "Add an AI button to each checklist item with four quick questions, and let me save useful parts of the answer as notes on that item."

## Things to know

- **Replies arrive all at once**, not word by word, and each one must finish within 3 minutes. That's plenty for planning and ideas.
- **You pay the AI service for each message**, on your own account. For one person, it's usually small.
- **Ask for structured answers.** The app needs the AI's changes in a fixed format. Tell the chat to use the AI service's structured output, so the answer is always readable. [Why that matters](/blog/get-valid-json-from-claude-chatgpt-gemini).
- **The chat that builds the app can't see your data.** It knows the shape of your data and how many rows there are, not what's in them.

## Questions

### Can I add ChatGPT or Claude to my own app?

Yes. Your app calls the AI service's API from a server action with your key, and shows the answer in the page. With Toupas, you can ask for this in a chat without writing a backend.

### Is it safe to let an AI change my app's data?

Safer if it only proposes changes and you apply them. Applied changes then go through the same access rules as your own edits.

### Where do I put my API key for an AI assistant?

On the server, never in the page. On Toupas, you add it through a link in the panel, and Toupas adds it to each request itself.

### How much does an AI assistant in my app cost?

The app's hosting is the same; each message is billed by the AI service to your account. Set a spending limit in its dashboard.
