Skip to content

Customer support automation

Customer support is one of the fastest paths to production value with AI agents. Alquimia Platform makes it practical by connecting agents to the channels customers already use, grounding answers in knowledge bases, and keeping a complete audit trail of every interaction.

A customer sends a WhatsApp message asking about an order status. The Alquimia Platform agent:

  1. Receives the message through the WhatsApp channel adapter.
  2. Validates the sender against an allow-list or identity provider.
  3. Looks up the order in the ERP or CRM via a registered tool.
  4. Retrieves the current returns policy from a curated knowledge topic.
  5. Generates a concise, accurate response.
  6. Logs the entire interaction for compliance and quality review.

The same agent can simultaneously accept email, Slack, or web requests through channel-specific adapters that all feed the same execution pipeline.

Instead of embedding CRM URLs or collection names in the agent spec, the support bot references resources that were registered first.

Terminal window
# Register the CRM tool connection
alquimia registry tools add crm-tools \
--provider-id mcp \
--connection-config '{"url": {"$secretRef": "CRM_MCP_URL"}, "auth": {"$secretRef": "CRM_MCP_AUTH"}}'
# Classify its operations
alquimia registry tools set-operation crm-tools get_customer_order \
--severity read-only --tier-grants reader,editor,operator
alquimia registry tools set-operation crm-tools create_refund \
--severity destructive --tier-grants operator --approval-required
# Register the policy topic and ingest the latest returns policy
alquimia registry topics add support-policies \
--severity read-only --tier-grants reader,editor,operator
alquimia registry topics add-file support-policies ./policies/returns.md --hydrate

The agent spec only references those IDs:

{
"assistant_id": "support-bot",
"role": "editor",
"response": {
"provider_id": "alquimia",
"profile": {
"system_prompt": "You are a helpful Acme support agent. Answer from the returns policy topic and the CRM tool only.",
"knowledge_base": [
{
"topic_id": "support-policies",
"search_mode": "rag",
"search_kwargs": {"k": 3}
}
],
"tools": [
{
"provider_id": "mcp",
"tool_ref": "crm-tools",
"human_approval": "NONE"
}
],
"evaluation_strategy": {
"evaluation_strategy_id": "native",
"max_steps": 10
}
},
"config": {
"provider_id": "openai",
"params": {
"model": "gpt-4o-mini",
"temperature": 0.3,
"api_key": {"$secretRef": "RESPONSE_PROVIDER_API_KEY"}
}
}
}
}

Customer-facing agents are exposed to untrusted input. Use shields to classify intent, block toxic content, and detect prompt injection. Shields can also be attached to the CRM tool registration to sanitize tool outputs before they reach the model.

{
"shields": {
"prompt-injection": {
"provider_id": "shield-config",
"connector": {"provider_id": "alquimia/prompt-injection-detection"},
"action": "block",
"threshold": 0.5,
"fail_closed": true,
"block_message": "This request could not be processed for safety reasons."
},
"intent": {
"provider_id": "shield-config",
"connector": {
"provider_id": "alquimia",
"profile": {
"system_prompt": "Classify the customer intent into one of: order_status, return_request, complaint, escalation, other. Output JSON: {\"intent\": \"...\"}",
"evaluation_strategy": {"evaluation_strategy_id": "one-shoot"}
},
"config": {"model_ref": "gpt-4o-mini-classifier"}
},
"action": "observe"
}
}
}

Content shield on the CRM tool registration:

{
"registered_tool_id": "crm-tools",
"provider_id": "mcp",
"connection_config": {"url": {"$secretRef": "CRM_MCP_URL"}},
"operations": [
{"name": "get_customer_order", "severity": "read-only", "tier_grants": ["reader", "editor", "operator"]},
{"name": "create_refund", "severity": "destructive", "tier_grants": ["operator"], "approval_required": true}
],
"shields": {
"pii-check": {
"provider_id": "shield-config",
"connector": {"provider_id": "alquimia/prompt-injection-detection"},
"action": "block",
"threshold": 0.4,
"block_message": "Tool result removed by policy."
}
}
}

Once the agent, tools, topics, and policies are configured in a local or staging agentspace, publish the bundle as a signed OCI artifact and pull it into production.

Terminal window
# Publish from staging
curl -X PUT "http://staging:8080/registry/publish?agentspace_id=support-prod&tag=v1.2.0" \
-H "Authorization: Bearer $API_TOKEN"
# Pull into production
curl -X PUT "http://production:8080/registry/pull?agentspace_id=support-prod&tag=v1.2.0" \
-H "Authorization: Bearer $API_TOKEN"

The OCI artifact contains the agentspace manifest (dist.json), excluding secret values by default. Set ALQUIMIA_OCI_SIGNATURE_POLICY=required and a cosign key to enforce signature verification on every pull.

Multi-channel reach

WhatsApp, Slack, Email, and web endpoints are normalized into one request shape. Build the agent once and expose it everywhere.

Grounded answers

Connect knowledge bases, FAQs, and internal documentation so the agent answers from current sources instead of hallucinating policies.

Escalation gates

Use shield classifiers and human-approval tools to hand off sensitive cases to a person before any action is taken.

Observability by request

Every support interaction carries the same task, session, agent, and user dimensions across metrics, traces, and logs.

Horizontal scaling

Master/worker topology separates request intake from execution. Scale workers during peak support hours without changing the public API.

Audit worklog

The append-only worklog records every tool call, LLM output, and shield verdict for compliance and dispute resolution.

SystemRole
CRM / ERPLook up customers, orders, and account history
Ticketing systemCreate or update support tickets
Knowledge baseRetrieve policies, procedures, and product information
Identity providerAuthenticate users and enforce role-based access
  • First-response time reduced from hours to seconds.
  • Consistent handling of refunds, returns, and policy questions.
  • Full traceability for regulated industries such as finance and healthcare.