Curltale AI

Docs › Agents

Build your first model with an agent

Let an AI agent draft the Excel workbook that describes your data, using the Curltale docs MCP and a ready prompt, while you review the meaning.

Describing a database by hand is the slow part of starting with Curltale AI. An agent can do the first draft for you: it reads the docs through the docs MCP, reads your schema, writes the Excel workbook, and fixes whatever the upload report complains about. You then review what it could only guess: the meaning.

The agent never writes into Curltale. It produces a file, you upload it, Curltale checks it, and a person publishes.

What you need#

  • An agent that can use MCP servers and read and write files (for example Claude Code).
  • The docs MCP connected, and ideally its ready advisor prompt as the agent's base instructions, so it reads the rules from the documentation and not from memory.
  • Your schema: CREATE TABLE statements, or a column export, for the tables you want to describe.
  • Anything that defines your words: a glossary, the SQL behind a dashboard, a data dictionary, a document. This is where the meaning comes from.

Two routes#

RouteHowBest when
From a connectorConnect the database, Generate draft model, export the draft to Excel (Changes & versions), let the agent enrich it, and upload it back.You can connect the database. Structure, keys and joins are already right.
From the schemaGive the agent the DDL and the context. It builds the workbook from scratch.You cannot or do not want to connect yet, or the data model is described in files.

Either way the loop is the same: the agent writes the workbook, you upload it on Ontology > Changes & versions, read the report (it names every problem by sheet, row and column), paste it back, and the agent fixes it. When the report is clean you have a draft. Review it, then publish.

Extra instructions for the modelling task#

Add this to the advisor prompt (or use it alone), then give the agent your schema and context.

You are helping me describe a database as a Curltale AI ontology: an Excel workbook that I will upload, check and review.

Tools: the Curltale docs MCP (use library_context for how-to questions, describe and search for the model's own concepts) and file tools to read my schema and write an .xlsx with openpyxl.

Before you write anything:
1. Read the pages "The Excel template" (including "A minimal workbook" and the column reference) and "The model" through the docs MCP. Do not rely on memory.
2. Ask me for what you are missing: the schema (CREATE TABLE statements or a column export), which schemas and tables are in scope, my glossary, and any SQL, dashboards or documents that define words like "active" or "open".

Then build the workbook:
- The workbook must contain all nine sheets, even empty ones: Instructions, Model, Entities, Fields, Values, Filters, Checks, Relationships, Examples. The Model sheet has a header row (setting, value) and a row "name".
- One entity per business concept. Use a lower_snake_case key. Fill every required column. If several tables are one concept, or one table holds several, tell me what you decided and why.
- entity_key and applies_to use entity KEYS. A field's "references" and the "from" and "to" of a relationship use entity NAMES.
- Give every field a sensitivity: internal, confidential, personal or restricted. When unsure, choose the more protective class. A restricted field must have agent_access none and no example value. Personal fields (names, emails, phone numbers, addresses) are personal.
- Allowed values: only values you saw in the data or the documents. Add a label when you know the meaning.
- Filters: the conditions people actually use ("open order", "unpaid invoice"), as SQL on the entity's table with unqualified columns. Mark them working until I confirm.
- Relationships: from the foreign keys, with the exact join and the cardinality. Mark a link unreliable if the column is often empty or wrong.
- Examples: only from real queries I give you.
- NEVER invent business meaning. Where you are guessing, set review_status to needs_review and add the question to a list for me.

When you are done: save the workbook, then give me (a) a short list of assumptions, (b) the questions I must answer, and (c) the upload steps. After I upload it I will paste the report back: fix every error it lists and tell me what changed.

Tips#

  • Start small. One domain, ten to twenty entities. Publish it, ask Alfred or an agent questions, and see what is missing. The model grows with use.
  • Let the report drive. The upload check lists every problem by sheet, row and column. That precision is what makes the agent loop fast.
  • Review the meaning, not the columns. Structure, types and keys are mostly right. Descriptions, allowed values, filters and sensitivity are where a person's knowledge matters most. Everything marked needs_review is flagged to agents until someone settles it.
  • The same agent can prepare documents. For the knowledge library, ask it to turn exports into clean Markdown, one subject per document, and upload them: see Collections and documents.
  • You do not need a connector to try the result. After publishing, build the demo database from your model and ask questions of it.

This documentation covers version 0.2.0. Something missing or wrong? Open an issue.