# TeaQL Agent Kit

> A model-first agent skill that makes a coding agent write, evaluate and repair a domain model before it generates and builds the app

- Category: Agents & Automation / Agent Skills & Plugins
- Language: Python
- Licence: MIT
- Repository: https://github.com/teaql/teaql-agent-kit
- Website: https://teaql.io
- Canonical page: https://ai-tldr.dev/tools/teaql-agent-kit/

## In short

TeaQL Agent Kit is a workflow for coding agents, packaged as an Agent Skill called build-teaql-app. Its authors describe it as a model-mediated harness: instead of letting an agent go straight from a requirement to code, it puts an executable domain model in between. It sits in the Agent Skills & Plugins category of the Agents & Automation tools and is open-source, written in Python and licensed MIT.

## Overview

TeaQL Agent Kit is a workflow for coding agents, packaged as an Agent Skill called build-teaql-app. Its authors describe it as a model-mediated harness: instead of letting an agent go straight from a requirement to code, it puts an executable domain model in between. The agent first drafts and saves a complete model of the business objects, fields and relationships in TeaQL's XML-based KSML format, sends it to a deterministic evaluation service, and repairs it from the reported errors, warnings and suggestions until evaluation reaches zero errors.

Only then does the agent generate code. TeaQL's Generation Service turns the validated model into a typed domain library for Java, Rust, Go, Swift, Python, C#/.NET or TypeScript, backed by that language's TeaQL runtime, plus a separate editable application workspace. The agent writes business logic in the workspace against typed Q (query) and E (expression) APIs, and asks the service for model-aware Assist — guidance for the specific entity, action or field it needs — rather than reading the whole generated library into its context.

The runtime side adds governance to the finished application: operations carry a user context, reads declare a purpose and comment, writes carry an audit reason, and HTTP, file and messaging capabilities must be explicitly granted. The skill ends with an evidence-backed completion report covering builds, tests, a runtime smoke test and the execution and audit logs. The default workflow calls TeaQL's hosted services, so it needs network access and sends model content to them; the README points to teaql-forge-rs as a smaller open-source Rust generator without full feature parity.

## What it does

- A fixed stage order enforced by the skill: draft and save a full KSML model, evaluate it, repair and re-evaluate, and generate only at zero errors
- Typed domain libraries and editable application workspaces generated for Java, Rust, Go, Swift, Python, C#/.NET and TypeScript, with Kotlin/JVM apps using the Java library
- Progressive model-aware Assist that returns API guidance for one entity, action or field at a time to keep the agent's context small
- A non-blocking "Model Ready" signal with the model path and evaluation counts, so a person can review the model while the agent keeps building
- Runtime safeguards in the generated app: mandatory user context, declared purpose on reads, audit reasons on writes and explicitly granted external capabilities
- A teaql_workspace.py tool that records and verifies whether a generated workspace uses local runtime checkouts or published package versions

## Getting started

Use an agent mode that can read project files and run terminal commands. The agent may install TeaQL clients and language toolchains and will call TeaQL's services for evaluation, generation and Assist, so review its permission requests and your data-sharing policy before using private requirements.

1. Option A: point your agent at the repository

   Open a project folder in Claude Code, Codex, Cursor, GitHub Copilot or Gemini CLI and paste a prompt like this into the agent's chat (not your terminal), replacing the example requirement with your own. If you have a local checkout, replace the URL with its path.

```text
Follow the instructions from https://github.com/teaql/teaql-agent-kit

Build a small order-management application with customers, products, and
orders, using Rust and SQLite. Evaluate and repair the business model,
generate a runnable console application, and exercise Q queries and E
expressions in tests and a runtime smoke test. Report the actual results and
any remaining problems.
```

2. Option B: install the skill

   Install the end-to-end build-teaql-app workflow with the community Skills CLI.

```bash
npx skills add teaql/teaql-agent-kit --skill build-teaql-app
```

3. Invoke the skill

   Ask your coding agent to use it, followed by your requirement. The agent saves the model, evaluates and repairs it, signals Model Ready, then generates, implements, tests and writes a completion report.

```text
Use $build-teaql-app to first draft and save a complete KSML model, then
evaluate and repair it before generating a runnable TeaQL application: ...
```

4. Pin the runtime source (optional)

   Start from one of the example teaql-workspace YAML files in the repository's examples folder: runtimeSource workspace uses local runtime repositories, release requires published package versions. apply writes .teaql/runtime-source-evidence.json into the generated application.

```bash
./tools/teaql_workspace.py apply \
  --config teaql-workspace.yaml \
  --workspace /path/to/generated-application

./tools/teaql_workspace.py verify --config teaql-workspace.yaml
```

## When to use it

- Have a coding agent build a data-backed business application from a plain-language requirement, with the domain model checked before any code is written
- Review a small model file and focused business code instead of every line of agent-generated persistence and query plumbing
- Generate the same modeled domain for several languages or frameworks, such as Spring Boot, Quarkus and Micronaut in the project's Java examples
- Get applications whose reads and writes leave a purpose-tagged SQL and audit trail for debugging and operations
