Live in 5 minutes
By the end of this guide you'll have a widget answering from your knowledge base on your site, and an agent that has completed its first task. You only need to touch code at the embed step (copy-paste).
What is SemAgent?
SemAgent is a single platform with two products:
- RAG Widget — a chat widget that answers visitors with citations, from a knowledge base built from your site and documents.
- AI Agent — an agent that gets work done on your behalf (and with your approval) across email, calendar, Drive, databases and Shopify.
Both share the same knowledge base: everything you teach the widget, the agent knows too.
Quickstart: set up the Widget (5 min)
1. Create an account and start the knowledge base
- Start your free trial at semagent.ai/register (7 days, 250 credits — no credit card).
- In the panel, go to Knowledge Base → Add Source and enter your site URL.
- Click Start Crawl. Your sitemap is found automatically; if you have a forum, its engine (Discourse, phpBB, XenForo, vBulletin, inSided) is auto-detected.
You can carry on while the crawl runs — the widget's knowledge grows as pages get indexed. More: Build your knowledge base.
2. Add the embed code to your site
Get your tenant ID from Widget → Setup in the panel and paste this one line just before your </body> tag:
<script src="https://semagent.ai/static/widget.js" data-tenant-id="your-slug" defer></script>
// app/layout.tsx import Script from "next/script"; <Script src="https://semagent.ai/static/widget.js" data-tenant-id="your-slug" strategy="lazyOnload" />
// Appearance → Theme Editor → footer.php // (or a "header/footer scripts" plugin) <script src="https://semagent.ai/static/widget.js" data-tenant-id="your-slug" defer></script>
3. Test it
- Refresh your site — the widget bubble appears at the bottom right.
- Ask a question your site does answer → you get a cited answer.
- Ask a question your site doesn't answer → the widget says it doesn't know instead of making something up. That's strict-KB grounding working.
That's it — your widget is live. For assistant name, tone, color and greeting: Widget setup & persona (soon).
Quickstart: your first agent task
The agent works by chatting in the Agent tab — no separate setup. Your knowledge base is enough for a first task; connectors are optional.
1. Choose your autonomy level
Agent → Settings → Autonomy: if you're just starting, stay on Supervised — reading and drafting run automatically, sending/writing actions come to you for approval.
2. Give the first task
Prepare a short, customer-ready document summarizing
our return and shipping policy from the knowledge base.The agent searches the knowledge base with kb_search and produces a Word document with doc_generate. Both are read/draft (T1) tools, so no approval is needed — the result lands as an artifact in a few minutes.
3. Approve an action
Email this document to me.Sending email is a T2 (action) tool: the agent prepares a draft and shows an approval card. When you click "Approve", it sends. You've just seen the approval flow — the heart of the agent's safety model.
4. (Optional) Schedule the task
Every Monday at 09:00, summarize new content added to
the knowledge base and email it to me.The agent schedules it with schedule_task; it appears under Settings → Scheduled Tasks and can be cancelled from chat.
Core concepts
| Concept | Meaning |
|---|---|
| Tenant | Your isolated workspace — knowledge base, widget, agent and team members live here. |
| Knowledge base (KB) | A semantically searchable content pool built from crawled pages + uploaded documents. |
| Strict-KB grounding | The widget answers only from the KB, with citations; below a confidence threshold it says "I don't know". |
| T1 / T2 tools | T1 = read/draft (side-effect free), T2 = write/send (subject to approval). Tool reference → |
| Autonomy level | How high a risk level the agent runs without approval (Supervised → Autonomous, 4 levels). |
| Connector | A secure link to Google, Notion, a database or your MCP server; credentials in an encrypted vault. |
Next steps
- Build your knowledge base — crawl sources, forums, files, the quality loop.
- Agent tool reference — all 50+ tools, risk classes and approval behavior.
- Widget Chat API — for building your own interface.
SemAgent