Quickstart

Get a Configent support assistant running locally in under 10 minutes.


This guide walks you from zero to a working support assistant on your own documents. You’ll write one config file, drop in some documents, copy a prompt set, and have the support graph streaming cited answers locally.

Prerequisites

  • Python 3.12 and uv
  • Docker (for Postgres + pgvector)
  • An OpenRouter API key: every model call goes through it (D14)
  • A Voyage AI API key — used for document and query embeddings (voyage-3)

1. Clone and install

git clone https://github.com/shaokiat/configent.git
cd configent

Install backend dependencies:

cd apps/api
uv sync

Install frontend dependencies:

cd ../web
npm install

2. Start Postgres with pgvector

make up

make up starts all services defined in infra/docker-compose.yml, including a Postgres instance with the pgvector extension enabled.

3. Set environment variables

Create apps/api/.env:

OPENROUTER_API_KEY=sk-or-...
VOYAGE_API_KEY=pa-...
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/configent
TICKET_API_URL=http://localhost:9000

.env.example at the repo root is the source of truth for this list. DATABASE_URL needs the +asyncpg driver — the API’s engine is async. TICKET_API_URL points at the mock ticket service that confirmed tickets are POSTed to; make dev starts it.

4. Write your first config

Create config/my-assistant.yaml at the repo root:

client_id: my-assistant
name: "My First Assistant"

branding:
  logo: assets/my-assistant/logo.svg
  primary_color: "#6366f1"
  assistant_name: MyAssistant

corpus:
  source: corpora/my-assistant/
  chunking:
    chunk_size: 800
    overlap: 100

agent:
  model: anthropic/claude-haiku-4.5
  system_prompt_file: prompts/my-assistant/answer.md
  max_tokens: 2048

limits:
  rate_limit_per_minute: 20
  daily_budget_usd: 2.00

The guardrail thresholds and corrective retrieval take their defaults. agent.model must have a row in config/pricing/claude.yaml; Haiku 4.5 and Sonnet 4.6 already do.

Want a complete, real example? Adding a New Use Case walks through the shipped Cloud Platform Support assistant, including the one decision that shapes the prompts: what the corpus can never know.

5. Add your documents and prompts

Documents: place any .pdf, .md, or .html files in corpora/my-assistant/. The ingest step scans this directory recursively.

Prompts: the graph makes four model calls, each with its own prompt. Copy the shipped set and rewrite the domain-specific parts:

cp -r prompts/gcp-platform-support prompts/my-assistant
FileUsed by
answer.mdThe cited answer
grade.mdWhether the passages support an answer, and whether the message is a question at all
rewrite.mdThe Level 2 query rewrite
ticket_draft.mdThe ticket offered when neither level can answer

6. Ingest documents

cd apps/api
uv run python -m app.cli --client my-assistant

The API runs the same reconcile for every client on startup, so a restart also works. The CLI runs it without one.

You’ll see output like:

Ingesting corpus for my-assistant...
          Ingest summary: my-assistant
┌───────────────────────────────┬───────┐
│ Metric                        │ Count │
├───────────────────────────────┼───────┤
│ Documents added               │     4 │
│ Documents replaced            │     0 │
│ Documents skipped (unchanged) │     0 │
│ Total chunks upserted         │    47 │
└───────────────────────────────┴───────┘

Documents are hashed. Re-running ingest skips unchanged files and re-embeds only modified ones.

7. Start the API

uv run alembic upgrade head
uv run uvicorn app.main:app --reload

On the first request the config registry loads every YAML file in config/. A malformed config, an unknown agent key or a model with no price raises immediately.

The API also opens the support graph’s LangGraph checkpointer on Postgres and creates its tables, so the database has to be up first. The Docker image runs alembic upgrade head on every start.

8. Start the frontend

cd apps/web
npm run dev

Open http://localhost:3000. The landing page lists every client the registry loaded, so my-assistant appears as a card once the API is running. Click it to start chatting.


What happened?

When you sent your first message, the support graph:

  1. Loaded the conversation history (empty for a new session) and opened a run
  2. retrieve embedded your message with voyage-3 and searched my-assistant’s chunks in pgvector
  3. grade asked Claude whether the passages support an answer, and whether the message is a question at all
  4. decide_level1 compared the best similarity and the groundedness score against your thresholds
  5. answer streamed a reply from the passages as search_result blocks with citations enabled, and no tools
  6. Each node’s step, the text and the citations streamed back over SSE
  7. The frontend rendered the step trail above the reply, with inline citation popovers

Had the passages fallen short, the graph would have rewritten the question and searched again (Level 2), then offered a drafted ticket (Level 3). A greeting skips all of that and gets a short reply. Expand the step trail above any reply to see which path ran.


Next steps

  • Overview — what Configent is, the stack, and where each design decision is written down
  • Config Reference — every key explained with types and defaults
  • The Support Graph — one question end to end, with the reasoning behind each boundary
  • Example Configs — the live client config from the repo
  • Architecture — the graph diagram, the node walkthrough, and the design decisions