How it works

A database connector tells Echo7 about your data – which tables exist, what they mean and the rules to follow – so an SQL agent can turn a user’s question into a query.

Part Role
Connector Holds the database schema, security rules and synonym dictionary.
SQL agent Understands the question, collects any details needed and generates the query using the connector.
Your application Runs the query, applying your own permissions, limits and security filters.
Response Echo7 turns the result into a text answer, table, chart or report.

Typical questions include totals and counts, monthly reports, best-selling products, top customers or orders by status.

Step 1: Create the connector

1

Open Database Connectors at the level you need – assistant, manager, reseller or system – and click Add.

2

Enter a Connector Name and a Connector Title such as “Order database”.

3

Choose the Database Type.

Step 2: Describe your schema

In Database Schema, describe the tables and fields the agent may use, in JSON. For each table include a description, its fields, any relationships and tags that describe when to use it.

  • Every table must have a description – tables without one are ignored.
  • Only expose the tables and fields that are actually needed. Leave out personal or sensitive data unless it’s essential.
  • Describe fields by what they mean, not just their name – for example whether an amount includes VAT.
  • Use foreign_keys to describe relationships, important for key fields and table_tags for typical questions.

Step 3: Add security rules

Use the Initial and Final Rules for the Custom System Prompt to control how queries are written. We strongly recommend rules that:

  • Only allow read-only SELECT queries.
  • Always apply a filter for the current organisation or user, using placeholders your application replaces before running the query.
  • Limit the number of rows returned in lists.
  • Ask the user for clarification instead of guessing – for example when a year is missing.

Step 4: Add a synonym dictionary

Map the words people use to the terms in your data – for example “purchase”, “sale” and “customer order” to Order. Avoid synonyms so general that they could match the wrong tables.

Step 5: Activate the SQL agent

Enable the SQL agent linked to the connector (for example db_query) on your assistant, and make sure its activation questions describe the kinds of questions users will ask.

Need help?

  • Database connectors are powerful and need careful security design. Our team can help you plan the schema and rules – book a training session below.

Prefer a guided walkthrough? Book a training session and an Echo7 specialist will help your team set it up.

Book a training session

Want to go deeper?

This guide covers the essentials. For detailed reference on every setting and feature, explore the full Echo7 Wiki.

Echo7 Wiki

Want a hand getting set up?

Book a training session with an Echo7 specialist and get your assistant working for your team.