Support agents · Guardrails · Audit trails

The escalation decision
belongs in code.

Configent runs a support agent as a three-tier graph. It answers from your documentation with citations, searches again when the first attempt falls short, and offers a drafted ticket when the documentation cannot know the answer. Every route is Python, not a choice the model makes. Nothing is filed until the person asking says so.

Every stage on the record, as it happens
gcp-platform-support.yaml
client_id: gcp-platform-support
name: Cloud Platform Support

branding:
  assistant_name: DeployBot
  primary_color: "#1a73e8"

corpus:
  source: corpora/gcp-platform-support/

agent:
  mode: graph
  model: anthropic/claude-haiku-4.5
  # discard weak retrieval
  retrieval_drop_floor: 0.3
  # level 1 falls short on weak retrieval
  escalate_below: 0.45
  # either level falls short on weak grounding
  confidence_threshold: 0.6
  # search again before offering a ticket
  corrective:
    enabled: true

The decision is not the model's to make

A support agent that guesses when it doesn't know is worse than no agent. This one measures whether the retrieved documentation actually supports an answer, and routes to a human when it doesn't — in Python, on numbers you can read afterwards.

⑂

A branch, not a judgement call

Two signals — retrieval similarity and scored groundedness — are compared against thresholds from the config. The answering model never sees a ticket tool, so it cannot escalate and cannot decline to.

▤

Every stage on the record

Each stage emits an event as it finishes and commits to the run before the next one starts. The trail shows the confidence value and the threshold it failed, and it survives a reload.

⇄

Escalation is a real integration

Filing a ticket is an HTTP POST to a separate service with an idempotency key. The service assigns the id. Nothing about the hand-off to a human is faked in-process.

⬡

Config, not code, per client

Corpus, prompts, model, thresholds and engine are declared in one YAML file. A second support domain is a new file and a folder of documents.

From config to answer

One YAML file and a folder of documents become a running support graph. Here is what happens between the question and the reply.

1. Author config client_id: gcp-platform-support agent: model: haiku-4-5 escalate_below: 0.45 corrective: enabled: true config.yaml CONFIGENT SUPPORT GRAPH · LANGGRAPH LEVEL 1 RAG LEVEL 2 corrective RAG LEVEL 3 human retrieve embed → pgvector · drop below 0.30 grade cheap model · groundedness + kind decide_level1 · plain Python similarity ≥ 0.45 and groundedness ≥ 0.60 converse no ticket greeting pass falls short rewrite semantic variants + exact keywords hybrid_retrieve pgvector + Postgres full-text · rank fusion regrade → decide_level2 · plain Python groundedness ≥ 0.60 pass falls short answer cited, streamed search_result blocks no tools in the request escalate draft the ticket · offer it ticket interrupt() · files after the user confirms Run.steps · one entry per node, committed before the next · a LangGraph checkpoint after every node Corpus Google Cloud docs vectors + tsvector Postgres · per client_id Ticket service separate process assigns the ticket id Every route is a Python function · LangGraph owns checkpoints and the pause · nothing is filed until the user confirms
01

Author a config

A solutions engineer writes one YAML file declaring the client, its corpus, the model, the prompts, and the thresholds the guardrail reads. No Python. This file is the whole integration spec.

config/gcp-platform-support.yaml
client_id: gcp-platform-support
name: "Cloud Platform Support"

branding:
  assistant_name: "DeployBot"
  primary_color: "#1a73e8"

corpus:
  source: corpora/gcp-platform-support/
  chunking:
    chunk_size: 512
    overlap: 64

agent:
  mode: graph
  model: anthropic/claude-haiku-4.5
  system_prompt_file: prompts/gcp-platform-support/answer.md
  # Retrieval below this similarity is discarded before the model sees it.
  retrieval_drop_floor: 0.3
  # Level 1 falls short when the best surviving hit is weaker than this.
  escalate_below: 0.45
  # Either level falls short when the grader's groundedness is below this.
  confidence_threshold: 0.6
  # Level 2: rewrite the question and search again before offering a ticket.
  corrective:
    enabled: true
    query_rewrites: 3
02

The engine builds the client at startup

On boot the registry reads every config in config/ and:

  • Parses, chunks, and embeds the corpus with Voyage AI voyage-3 into pgvector, scoped by a client_id column
  • Validates the threshold relationship — escalate_below must exceed retrieval_drop_floor, or the escalation signal could never fire
  • Resolves tool names against the registry and rejects unknown ones immediately
  • Loads one prompt per model-calling node (answer, grade, rewrite, ticket draft), so the grading step stays auditable instead of hiding inside a mega-prompt

A malformed config fails at startup, not on someone's first question.

03

A question moves down the tiers only as far as it has to

  1. retrieve — the question is embedded and matched against that client's chunks. Anything below the drop floor is discarded.
  2. grade — a cheap model rates how well the surviving passages support an answer, and whether the message is a support question at all. A greeting leaves here with a short reply and no ticket.
  3. decide_level1 — Python compares similarity and groundedness to the configured thresholds. Both clear: answer. Otherwise: Level 2.
  4. rewrite → hybrid_retrieve → regrade — Level 2 rewrites the question with the conversation in view, searches semantic and keyword at once, fuses the results by rank, and grades again. decide_level2 answers if the new evidence holds.
  5. answer — passages go to the model as search_result blocks in top-level user content, so the API attaches citations at generation time. No tool definitions are sent on this call.
  6. escalate → ticket — neither level could answer, so a structured ticket is drafted and offered, and the graph pauses. On confirmation it resumes and POSTs to the ticket service, which assigns the id. A queue is only worth reading if what reaches it needed a human.
04

The trail outlives the request

Every node emits a step event over SSE as it completes, and commits itself to the run through a session of its own. The UI renders the trail above the reply — the node, its reasoning, the confidence, the latency.

Because those writes don't share the request's transaction, killing the process mid-run leaves the finished nodes intact rather than rolling them back. LangGraph checkpoints every node beside the trail, which is what lets the graph pause on a ticket offer and pick up again in a later request.

Why it's shaped this way

The full log, including the decisions that were reversed and the gaps still open, lives in docs/decisions.md.

D2

The guardrail is two signals, in code

Retrieval similarity and a model-scored groundedness value are both compared against configured thresholds. Either one failing forces escalation. The model is never asked whether it should escalate, so the answer to "what if it decides wrong?" is that it does not decide.

D3

Durability writes commit independently

Each stage records itself through a short-lived session that commits immediately, separate from the request transaction. A process death leaves the completed stages on disk instead of rolling them back with everything else.

D4

A ticket is filed exactly once

Escalation POSTs to a separate service with an idempotency key derived from the run. The service assigns the id. A retry after a timeout cannot put a second ticket in someone's queue.

D11

One engine, not two

A free-form tool-use loop shipped beside the graph for clients the demo never loaded. It was deleted rather than kept: disabled code still has to pass its tests, and the case for a loop is argued in the docs, with the old code one git command away.

P2

pgvector, not a dedicated vector DB

Vector search runs in the same Postgres instance as everything else. No second datastore to operate, and client corpora are isolated by a client_id column rather than by hoping two systems agree.

D10

A framework for mechanism, not decisions

The support graph uses LangGraph for two things: checkpoints, and the pause before a ticket is filed. Routing, model calls, citations and cost stay plain code, and the move from a hand-written pipeline is documented.

See it decide

Three questions, two branches, and the trail each one leaves behind.