Back to home

Claix Retrieve · Routes

Routes: decide exactly what your agents can retrieve

A route is a set of tables and columns that an agent is allowed to use, plus a short guide, written in plain language, with your rules. You create a route once, attach it to an agent, and the agent can only answer from what the route includes.

No SQL and no configuration files. You tick what is allowed, write the guide, and Claix stays inside that boundary—every time.

Definition

What is a route?

A route describes one way your agents can retrieve information from your database. Every route has three parts.

  • A name and a description. What the route is for, in a sentence or two.
  • Tables and columns. You pick the tables from your Data Map, and inside each table you pick only the columns the route can use. Columns you don't tick are not part of the route.
  • A guide. A short text with explanations and rules of use, like a small manual for the route: what the data means, what the codes stand for, how it should be used.

Runtime

What a route does when your agent asks a question

The route is the boundary. The question can ask for anything, but the query can only use what the route contains.

  1. 01

    Your agent asks in plain language

    For example: Has this customer accepted marketing consent?

  2. 02

    Claix chooses the route that fits

    Among the routes attached to that agent. If no route fits, Claix doesn't guess, and the question is not answered from your data.

  3. 03

    One read-only query

    Claix writes a single SELECT using only the tables and columns of that route.

  4. 04

    A typed answer comes back

    True or false, a number, a text, a list or an object—ready for your app or workflow.

Why routes

Why use routes

  • Control at the table and column level

    You decide what each route can see, column by column.

  • One route for each purpose

    Staff directory, bookings, orders, consent records. Each one has its own tables, columns and guide.

  • Plain-language rules

    The guide is text you can read and change, without learning a framework or a configuration format.

  • Agents only use what you attach

    An agent can use only the routes attached to it.

  • Read-only

    A route is used to read. It never changes your data.

  • Test before you connect

    Try your routes with real questions in the Sandbox, and review requests in Traces.

Setup

How to create a route

  1. 01

    Connect your database and publish your Data Map

    Routes use the tables and relationships described there.

  2. 02

    Create the route

    A window asks only for a name and a description.

  3. 03

    Choose the tables

    You get the list of tables, each with a checkbox.

  4. 04

    Choose the columns

    Click a table name to see all its columns, then tick only the ones the route can use. A summary shows, in real time, the tables and columns included in the route.

  5. 05

    Write the guide

    Explain what the route is for, what the codes mean and any rules of use.

  6. 06

    Attach the route to an agent

    The agent's business prompt says when to use each route.

Guardrails

What can happen inside a route

Within the tables and columns of a route, Claix can:

  • Allowed

    Filters, joins between the route's tables, grouping and sorting. Counts, sums, averages, minimums and maximums. Text, dates, numbers and window functions. Lists and JSON values.

  • Never allowed

    Anything other than a read-only SELECT: no inserts, updates, deletes or schema changes. More than one statement. Tables or columns outside the route. SELECT *. Functions outside the list Claix allows.

    • If a query breaks these rules, it is rejected and Claix tries again with a corrected query.

Guide

Writing a good guide

The guide is the part that helps the agent understand your data. What the agent can actually reach is decided by the tables and columns you tick.

A few things worth putting in it: what the route is for (and what it is not for), what each code or status means, any rule about how to read the data, and what your business calls things if the column names are different.

This route answers questions about restaurant reservations.
Status C means confirmed, P means pending and X means cancelled.
Cancelled reservations stay in the table.
Deposits are in euros.

Roles

Routes and agents

Routes and agents have different jobs. An agent is attached to one or more routes, and its business prompt tells it when to use each one. A support agent and an internal assistant can work on the same database and still see different data, because each has different routes.

RouteAgent
Decides what data can be used, and how to read itDecides who asks and which routes it can use
Contains name, description, tables, columns and a guideContains name, description, business prompt, routes and response mode

Examples

How you could set up routes

These are examples of how you could set up routes. They are not customer stories.

  • Staff directory

    A route with an employees table and the columns name and job title. Question: What is the job title of Marta? If the phone column is not ticked, a question about someone's phone number is not answered from your data.

  • Marketing consent

    A route with the customers table and two columns: name and marketing consent. Question: Has the customer Javier Perez accepted marketing consent? Answer: true or false, ready for a workflow to use.

  • Restaurant bookings

    A route with reservations and tables, with the columns date, party size, table and deposit. Question: What is Javier Perez's next reservation? Answer: an object with the date, party size, table and deposit.

  • Order status

    A route with orders and customers, and the columns status and total. Question: How many orders have been shipped this month? Answer: a number.

Limits

Good to know

  • Routes limit what an agent can use, and your database role limits what Claix can read. Use both. Connect Claix with a read-only role that can see only what you want to share.
  • Access is by agent, not by end user. An agent can read everything its routes include, for every person who asks it questions.
  • If the data is not in the route, the answer is empty. Claix doesn't invent a value to fill the gap.
  • A route is not a dashboard. It tells an agent what it can retrieve.

Frequently asked questions

What is a route in Claix?
A set of tables and columns that an agent is allowed to use, with a short guide of rules, which Claix uses to answer questions from your database.
Do I need to write SQL?
No. You choose tables and columns and write the guide. Claix writes the read-only query.
Can a route use more than one table?
Yes. A route can include several tables, and queries can join them as long as every table belongs to the route.
Can a route change my data?
No. Routes are used only to read data.
What happens if a question needs data that is not in the route?
Claix doesn't answer it from your data. If no route fits, no query is run for that question.
How do I test a route?
Use the Sandbox to ask real questions, and check the requests in Traces.

Create your first route

Connect your database, review your Data Map and decide what your agents can retrieve. One route per purpose. Clear boundaries. Typed answers.