Skip to content
Agencei
Demonstrative project

Customer support and software vendors

Demo project: AI customer support agent connected to ticketing

This project is presented for demonstration purposes: it illustrates how we design and deliver, without corresponding to an identified client.

Context

This demo project shows how we build a level 1 AI support agent: it is not a client deployment but a complete system we maintain to illustrate our architecture choices and guardrails.

The modelled case is a software vendor whose support team receives repetitive requests (configuration, billing, common errors) whose answers already exist in the documentation and help articles.

The agent answers simple requests relying exclusively on that documentation, creates or updates tickets in the ticketing tool, and hands off to a human agent as soon as a request falls outside its scope.

Problem

An assistant based on a generic language model makes up answers, does not know the product and has no idea of the customer's context. Without guardrails, it creates more work for support than it removes.

Answers therefore have to be grounded in the documentation, what the agent is allowed to do has to be bounded, answer quality has to be measured and model call costs have to be controlled.

Constraints

  • Answers must be grounded in the documentation and cite their sources; when no source exists, the agent must say so and hand off.
  • The agent must never promise a refund, modify a subscription or access another customer's data.
  • Handoff to a human must be seamless, with the full conversation history attached to the ticket.
  • Quality must be measured on an evaluation set before every change to the prompt, the model or the index.
  • Cost per conversation must be tracked and capped.

Architecture

A Python service (FastAPI) receives messages from the chat widget or from incoming tickets in the ticketing tool via webhook.

An ingestion pipeline splits the documentation (help pages, release notes, FAQ) into chunks, computes their vector embeddings and stores them in PostgreSQL with the pgvector extension, along with version and source metadata.

For every question, the service retrieves the most relevant chunks (vector search combined with keyword search), builds a constrained prompt and calls the language model API.

A guardrail layer validates the input (sensitive data detection, off-topic requests) and the output (presence of sources, absence of forbidden commitments) before anything is sent to the user.

The agent has a limited set of tools: read the ticket, add a reply or an internal note, change its status and hand it off to a human. Redis manages conversation state and cost caps.

Every call is traced (OpenTelemetry) with token count, latency and cost, and an evaluation set is replayed automatically in the continuous integration pipeline.

Solution

The core of the approach is retrieval-augmented generation (RAG): the agent only answers from the retrieved documentation chunks and cites the corresponding pages. If the search returns nothing relevant or confidence is low, the agent says so clearly and offers a handoff rather than guessing.

Guardrails are implemented as separate steps, testable independently of the model: filtering of out-of-scope requests, masking of personal data in logs, an explicit list of allowed actions and verification of the answer before sending. An answer that fails these checks is replaced by a handoff.

Human handoff is a normal case, not a failure: the agent summarises the request, attaches the conversation and the sources consulted to the ticket, and places it in the right queue. The human agent sees exactly what was said and why the handoff happened.

Quality and costs are measured continuously. An evaluation set of representative questions with expected answers is replayed on every change; regressions block the deployment. Costs per conversation are tracked and a cap suspends the agent in favour of humans if the budget is exceeded.

Outcome

  • Answers are grounded in the documentation and cite their sources, which makes them verifiable by the user and by the support team.
  • Out-of-scope or risky requests are systematically handed off to a human with the full context.
  • Every change to the prompt, model or index is evaluated automatically before being deployed.
  • The cost of every conversation is known, traced and capped.
  • The agent fits into the support team's existing workflow, with no additional tool for human agents to check.

Improvements achieved

  • Add further actions under human approval (password reset, invoice resend).
  • Personalise answers according to the customer's plan and configuration, after authentication.
  • Grow the evaluation set from handoffs and corrections made by human agents.
  • Support several languages with documentation indexed per language.
  • Compare several models on the evaluation set to trade off quality, latency and cost.

Screenshots

Screenshots will be added once the project is published.

Tell us about your project

Describe your need in a few lines: we come back to you with a first analysis and the next steps.