SaaS Helpdesk Agent
Answer tier-1 support questions from your help docs, create and track tickets in your ticketing system, and route complex cases to a human agent.
What you'll build
An agent that deflects tier-1 support tickets by answering questions from your help docs and FAQ knowledge base. For issues it cannot resolve, it creates a ticket in your ticketing system and confirms the ticket number to the user. P1 outages and billing emergencies route directly to a human via escalation email.
Prerequisites
- BimpeAI account with an API key (
sk_…) - Read Anatomy of a workflow agent first — this recipe skips steps covered there
- Ticketing system connected in the Console dashboard (see Step 4)
- Web chat widget and WhatsApp Business number connected in the Console dashboard (see Step 4)
- Escalation email configured under Settings → Escalation for P1 issues (see Step 4)
Steps
1. Find the workflow
import { BimpeAI } from "@bimpeai/sdk";
const bimpe = new BimpeAI({ apiKey: process.env.BIMPEAI_API_KEY! });
const page = await bimpe.workflows.list({ scope: "public", search: "helpdesk" });
const workflow = page.data[0];
console.log(workflow.id, workflow.name);import os
from bimpeai import BimpeAI
client = BimpeAI(api_key=os.environ["BIMPEAI_API_KEY"])
page = client.workflows.list(scope="public", search="helpdesk")
workflow = page.data[0]
print(workflow.id, workflow.name)2. Create the agent
const agent = await bimpe.agents.create(
{
name: "SaaS helpdesk agent",
system_prompt:
"You are the first-line support agent for a SaaS product. " +
"Answer questions using the help docs and FAQ knowledge base before suggesting anything else. " +
"If you cannot resolve the issue, collect a brief description and create a support ticket " +
"via the ticketing system integration. Confirm the ticket number to the user. " +
"For P1 issues (product completely unusable, data loss, security incidents) or billing emergencies, " +
"escalate immediately rather than creating a ticket. " +
"For ticket status queries, look up the ticket ID provided by the user. " +
"Never promise a resolution time you cannot confirm from the SLA knowledge base.",
agent_workflow_id: workflow.id,
},
{ idempotencyKey: "create-saas-helpdesk-agent-v1" },
);
console.log(agent.id);agent = client.agents.create(
name="SaaS helpdesk agent",
system_prompt=(
"You are the first-line support agent for a SaaS product. "
"Answer questions using the help docs and FAQ knowledge base before suggesting anything else. "
"If you cannot resolve the issue, collect a brief description and create a support ticket "
"via the ticketing system integration. Confirm the ticket number to the user. "
"For P1 issues (product completely unusable, data loss, security incidents) or billing emergencies, "
"escalate immediately rather than creating a ticket. "
"For ticket status queries, look up the ticket ID provided by the user. "
"Never promise a resolution time you cannot confirm from the SLA knowledge base."
),
agent_workflow_id=workflow.id,
idempotency_key="create-saas-helpdesk-agent-v1",
)
print(agent.id)3. Add knowledge bases
Point a URL knowledge base at your published help docs, then add a text entry for the FAQ and SLA so the agent can answer without fetching live pages on every query.
// Help docs from your published documentation site
await bimpe.agents.knowledgeBases.create(agent.id, {
type: "url",
name: "Help docs",
url: "https://docs.yourproduct.com",
});
// Frequently asked questions
await bimpe.agents.knowledgeBases.create(agent.id, {
type: "text",
name: "FAQ",
content:
"Q: How do I reset my password?\n" +
"A: Go to Settings → Security → Change Password. If locked out, use Forgot Password on the login screen.\n\n" +
"Q: How do I add a team member?\n" +
"A: Settings → Team → Invite Member. Admin role required.\n\n" +
"Q: Where can I download my invoices?\n" +
"A: Settings → Billing → Invoice History.\n\n" +
"Q: What browsers are supported?\n" +
"A: Chrome 110+, Firefox 110+, Edge 110+, Safari 16+.",
});
// SLA commitments
await bimpe.agents.knowledgeBases.create(agent.id, {
type: "text",
name: "SLA",
content:
"P1 (service unusable): first response within 1 hour, 24/7.\n" +
"P2 (major feature broken): first response within 4 hours, business hours.\n" +
"P3 (minor issue or question): first response within 1 business day.\n" +
"P4 (feature request or feedback): acknowledged within 3 business days.",
});# Help docs from your published documentation site
client.agents.knowledge_bases.create(agent.id, {
"type": "url",
"name": "Help docs",
"url": "https://docs.yourproduct.com",
})
# Frequently asked questions
client.agents.knowledge_bases.create(agent.id, {
"type": "text",
"name": "FAQ",
"content": (
"Q: How do I reset my password?\n"
"A: Go to Settings → Security → Change Password. If locked out, use Forgot Password on the login screen.\n\n"
"Q: How do I add a team member?\n"
"A: Settings → Team → Invite Member. Admin role required.\n\n"
"Q: Where can I download my invoices?\n"
"A: Settings → Billing → Invoice History.\n\n"
"Q: What browsers are supported?\n"
"A: Chrome 110+, Firefox 110+, Edge 110+, Safari 16+."
),
})
# SLA commitments
client.agents.knowledge_bases.create(agent.id, {
"type": "text",
"name": "SLA",
"content": (
"P1 (service unusable): first response within 1 hour, 24/7.\n"
"P2 (major feature broken): first response within 4 hours, business hours.\n"
"P3 (minor issue or question): first response within 1 business day.\n"
"P4 (feature request or feedback): acknowledged within 3 business days."
),
})4. Connect channels and integrations (dashboard)
Channels, ticketing system, and escalation email are configured in the dashboard
The API cannot create channel connections or integrations. The web chat widget, WhatsApp Business number, ticketing system connection, and escalation email are all connected in the Console dashboard. The SDK can list active integrations but cannot create or modify them. Escalation email for P1 issues is set under Settings → Escalation.
- Open Console dashboard → Agents → select your agent.
- Under Channels, enable the web chat widget and paste the embed snippet into your app.
- Under Channels, connect your WhatsApp Business number for users who contact support via WhatsApp.
- Under Integrations, connect your ticketing system (e.g. Zendesk, Linear, or Jira Service Management).
- Under Settings → Escalation, enter the on-call email for P1 escalations.
5. Go live
const integrations = await bimpe.agents.integrations.list(agent.id);
const channels = await bimpe.agents.channels.list(agent.id);
console.log("Integrations:", integrations.map((i) => i.name));
console.log("Channels:", channels.map((c) => c.type));integrations = client.agents.integrations.list(agent.id)
channels = client.agents.channels.list(agent.id)
print("Integrations:", [i.name for i in integrations])
print("Channels:", [c.type for c in channels])Full example
import { BimpeAI } from "@bimpeai/sdk";
const bimpe = new BimpeAI({ apiKey: process.env.BIMPEAI_API_KEY! });
// 1. Find workflow
const page = await bimpe.workflows.list({ scope: "public", search: "helpdesk" });
const workflow = page.data[0];
// 2. Create agent
const agent = await bimpe.agents.create(
{
name: "SaaS helpdesk agent",
system_prompt:
"You are tier-1 support for a SaaS product. Answer from help docs and FAQ first. " +
"Create a ticket if you cannot resolve the issue. Escalate P1 and billing emergencies immediately.",
agent_workflow_id: workflow.id,
},
{ idempotencyKey: "create-saas-helpdesk-agent-v1" },
);
// 3. Add knowledge bases
await bimpe.agents.knowledgeBases.create(agent.id, {
type: "url",
name: "Help docs",
url: "https://docs.yourproduct.com",
});
await bimpe.agents.knowledgeBases.create(agent.id, {
type: "text",
name: "FAQ",
content:
"Reset password: Settings → Security → Change Password.\n" +
"Add team member: Settings → Team → Invite Member (admin required).\n" +
"Download invoices: Settings → Billing → Invoice History.",
});
await bimpe.agents.knowledgeBases.create(agent.id, {
type: "text",
name: "SLA",
content:
"P1: 1 hour response, 24/7. P2: 4 hours, business hours. P3: 1 business day. P4: 3 business days.",
});
// 4. Verify channels and integrations (configured via dashboard)
const integrations = await bimpe.agents.integrations.list(agent.id);
const channels = await bimpe.agents.channels.list(agent.id);
console.log("Agent ID:", agent.id);
console.log("Integrations:", integrations.map((i) => i.name));
console.log("Channels:", channels.map((c) => c.type));
// 5. Stream web chat conversations
const controller = new AbortController();
const conversations = await bimpe.conversations.list(agent.id, { channel: "webchat" });
const conv = conversations.data[0];
if (conv) {
for await (const event of bimpe.conversations.messages.stream(agent.id, conv.id, {
signal: controller.signal,
})) {
console.log(event.role, event.message);
}
}import os
from bimpeai import BimpeAI
client = BimpeAI(api_key=os.environ["BIMPEAI_API_KEY"])
# 1. Find workflow
page = client.workflows.list(scope="public", search="helpdesk")
workflow = page.data[0]
# 2. Create agent
agent = client.agents.create(
name="SaaS helpdesk agent",
system_prompt=(
"You are tier-1 support for a SaaS product. Answer from help docs and FAQ first. "
"Create a ticket if you cannot resolve the issue. Escalate P1 and billing emergencies immediately."
),
agent_workflow_id=workflow.id,
idempotency_key="create-saas-helpdesk-agent-v1",
)
# 3. Add knowledge bases
client.agents.knowledge_bases.create(agent.id, {
"type": "url",
"name": "Help docs",
"url": "https://docs.yourproduct.com",
})
client.agents.knowledge_bases.create(agent.id, {
"type": "text",
"name": "FAQ",
"content": (
"Reset password: Settings → Security → Change Password.\n"
"Add team member: Settings → Team → Invite Member (admin required).\n"
"Download invoices: Settings → Billing → Invoice History."
),
})
client.agents.knowledge_bases.create(agent.id, {
"type": "text",
"name": "SLA",
"content": "P1: 1 hour response, 24/7. P2: 4 hours, business hours. P3: 1 business day. P4: 3 business days.",
})
# 4. Verify channels and integrations (configured via dashboard)
integrations = client.agents.integrations.list(agent.id)
channels = client.agents.channels.list(agent.id)
print("Agent ID:", agent.id)
print("Integrations:", [i.name for i in integrations])
print("Channels:", [c.type for c in channels])
# 5. Stream web chat conversations
conversations = client.conversations.list(agent.id, channel="webchat")
if conversations.data:
conv = conversations.data[0]
for msg in client.conversations.messages.stream(agent.id, conv.id):
print(msg.role, msg.message)Deploy
Store your API key in BIMPEAI_API_KEY. Confirm the ticketing system integration appears in integrations.list before going live — ticket creation silently fails if the integration is unconnected. Refresh the URL knowledge base by calling knowledgeBases.update whenever you publish major documentation changes; the agent re-indexes on the next update.
Variations
- Add a
rulesfield on the agent that hard-routes any message containing "data breach" or "gdpr" to escalation regardless of conversation context. - Extend the FAQ knowledge base with release notes so the agent can answer "what changed in the last update" without a ticket.
- Use
conversations.messages.listafter each resolved conversation to calculate deflection rate by comparing conversations with and without a ticket created.
Returns & Refund Processing Agent
Handle return requests, check eligibility against your order management system, track refund status, and schedule replacements.
Salon & Spa Booking Agent
Let clients browse services, match with a stylist, and book appointments across WhatsApp, Instagram, and web chat — with Google Calendar handling availability.