BookbagBookbag

Build your first AI agent

A complete walkthrough: create an agent, train it on your store's data, test it in the playground, and deploy it to your website — in about ten minutes.

View as Markdown

This guide takes you from an empty workspace to a deployed, store-grounded agent in about ten minutes. By the end you'll have an agent answering real questions on your website.

Prerequisites

A free Bookbag account and a public URL for your store or help center. That's it — new workspaces include free credits so you can build and test right away.

Step 1 — Create and train your agent

Create the agent

From the dashboard, click New agent. You can either start blank or describe your agent in plain language and let the builder draft it for you:

Support agent for Acme — a Shopify store selling outdoor gear.
Handles order status, returns within 30 days, and shipping questions.
Friendly, concise, never makes up policy.

The builder turns this into a system prompt, sets a sensible default model, and creates the agent.

Add training data

Open the agent and go to Data sources. Add knowledge in whichever form you have it:

Enter your URL and Bookbag crawls your pages, extracts the readable text, and indexes it. Great for help centers and policy pages.

tip

Point the crawler at your help center or FAQ first — it's the highest-signal content for support.

check

When a source finishes training its status turns to Trained. Your agent can now answer from it.

Step 2 — Test and optimize

Open the Playground and start chatting. Ask the questions your customers actually ask:

  • "How long do I have to return something?"
  • "Where is my order?"
  • "Do you ship to Canada?"

For each answer, expand the sources to see exactly which chunks the agent used, and use Inspect prompt to see the full prompt sent to the model. If an answer is wrong or vague, the fix is almost always in the data — add a Q&A pair or a clearer source.

Tighten high-stakes answers

For anything involving money or policy (refunds, warranties), add an explicit Q&A pair. It pins the answer so the model can't paraphrase it incorrectly.

Step 3 — Deploy

Go to Deploy to put your agent in front of customers. The fastest path is the website widget:

  1. 1
    Copy the embed snippet
    Deploy → Website widget gives you a one-line script tag.
  2. 2
    Paste it before </body>
    Add it to your store's theme. On Shopify, that's your theme.liquid layout.
  3. 3
    Connect more channels
    Add email and messaging channels so the same agent answers everywhere.
theme.liquid
<script
  src="https://app.bookbag.ai/widget/embed"
  data-agent-id="YOUR_AGENT_ID"
  defer
></script>
check

Reload your store — the chat bubble appears in the corner and answers from your data.

Congratulations

You have a deployed agent grounded in your store's data. From here, make it resolve more on its own and route the rest to your team.