Web Agent guide
The Web Agent is an AI chat assistant that lives on your website and answers visitors in real time. This guide walks you through configuring it in the dashboard and installing it on your site yourself — step by step, no developer needed.
The whole idea in one line
You configure the agent once in your Safqat dashboard, then paste a short code snippet into your website. A chat bubble appears for your visitors and the AI answers their questions from the knowledge you provided.
The Web Agent is a chat widget you embed on your website. It greets visitors, answers their questions instantly using your uploaded knowledge base, replies in their language, and hands the conversation over to your team whenever a human is needed. Every conversation, rating, and lead is captured in your dashboard.
Open your Safqat dashboard and go to Web Agent → Setup. A guided 7-step wizard walks you through everything below. You can change any of these later from Web Agent → Settings.
Step 1
Pick the main language your agent speaks (Arabic, English, French, and 11+ more) and the focus area that best fits your business — customer service, sales, support, or feedback. This shapes how the agent introduces itself and replies.
Step 2
Enter your business name (shown to visitors), optionally upload your logo, and choose a tone of voice.
Step 3
Provide four agent names. These are the friendly names visitors see in the chat (for example a greeting from "Sarah"). The wizard pre-fills sensible names for your chosen language — keep them or change them.
Step 4
Pick a primary color that matches your brand and choose light or dark mode. This controls how the chat bubble and window look on your site.
Step 5
List the website domains where the agent is allowed to run (for example yourstore.com). This protects your agent so it only works on sites you own.
Step 6
This is what makes the agent smart. Upload documents or paste text describing your products, policies, hours, shipping, returns — anything customers ask about. The agent answers from this content.
Step 7
Write the first message visitors see when they open the chat, review your settings, then activate the agent. The final screen also shows your install code — that's what you'll use in Part 2.
Once your agent is active, installing it is a copy-and-paste job. The snippet is two short lines of code that load the widget and connect it to your agent.
Go to Web Agent → Settings → Integration Code (it's also shown on the last step of the setup wizard). Click the copy button to grab your snippet — it already contains your unique agent ID.
Your snippet looks like this:
<script src="https://cdn.safqat.ai/widget.js" data-safqat-api-base="https://safqat.ai"></script>
<script>
Safqat.init({
agentId: "your-agent-id",
apiBase: "https://safqat.ai"
});
</script>Copy your snippet from the dashboard
Use the copy button so your real agent ID is included. The example above uses "your-agent-id" as a placeholder — yours will be a unique value.
Paste it into your website
Add the snippet just before the closing </body> tag on every page where you want the chat to appear. On platforms like Shopify, WordPress, or Wix, paste it into the "custom code" or "header/footer scripts" section so it loads site-wide.
Publish and refresh
Save and publish your site, then reload the page. A chat bubble appears in the corner — click it to start a conversation.
If your site has accounts, you can pass each visitor's details so conversations are tied to the right person. Only do this for visitors you actually know (e.g. after login).
Safqat.init({
agentId: "your-agent-id",
apiBase: "https://safqat.ai",
user: {
id: currentUser.id, // unique per visitor
name: currentUser.name,
email: currentUser.email
}
});Important: use each visitor's own unique id. Never paste one fixed id for everyone — if you do, all visitors will share the same conversation.
Before telling customers about it, do a quick check on your live site: