TableTalk
TableTalk defines trusted data agents as code. An Agent declares the relations, semantics, policies, and regression suites it may use. TableTalk compiles that source into a content-addressed artifact, shows a semantic plan, runs execution-based evals, and only applies the exact artifact that passed.
At runtime, an applied Agent produces a structured interpretation and query plan, validates generated SQL against its compiled scope, executes a read-only query, and returns claims tied to evidence and reproducible calculations. Missing models, database failures, empty evidence, and unsupported claims are reported explicitly. They are never replaced by heuristic or locally generated answers.
Free local development
Local development defaults to Ollama's free cloud model
gemma4:31b-cloud. Ollama runs the OpenAI-compatible endpoint locally; the
model itself is the cloud model.
ollama signin
ollama pull gemma4:31b-cloud
uv sync --extra duckdb
uv run tabletalk init
uv run tabletalk compile
uv run tabletalk plan
uv run tabletalk eval
uv run tabletalk apply
uv run tabletalk ask starter "How many customers are there?"
The generated tabletalk.yaml contains:
llm:
provider: ollama
model: gemma4:31b-cloud
base_url: http://localhost:11434/v1
api_key: ollama
temperature: 0
Production is not tied to Gemma or Ollama. Configure any compatible model endpoint explicitly. TableTalk does not silently switch models or providers.
Install
pip install tabletalk
pip install "tabletalk[duckdb]" # optional DuckDB driver
pip install "tabletalk[snowflake]" # optional Snowflake driver
SQLite is included with Python. The supported database surface is deliberately limited to SQLite, DuckDB, and Snowflake.
Project layout
.
├── tabletalk.yaml
├── agents/
│ └── starter.yaml
├── evals/
│ └── starter.yaml
└── .tabletalk/ # generated, content-addressed local state
├── artifacts/
├── evals/
├── history/
└── state.json
An Agent is a versioned resource:
kind: Agent
version: "1"
name: starter
description: Answers customer questions from the approved dataset.
connection: default
relations:
include:
- main.customers
semantics:
metrics:
customer_count:
expression: count(id)
relation: main.customers
policies:
read_only: true
require_evidence: true
max_rows: 500
timeout_seconds: 30
evals:
- starter_regression
An EvalSuite binds executable expectations to that Agent:
kind: EvalSuite
version: 1
name: starter_regression
agent: starter
environment:
connection: default
cases:
- name: customer_count
messages:
- role: user
content: How many customers are there?
expected:
result:
type: scalar
value: 3
Lifecycle
tabletalk connect
tabletalk discover
tabletalk compile
tabletalk plan
tabletalk eval
tabletalk apply
tabletalk ask AGENT "QUESTION"
tabletalk serve
connectcreates or tests a project connection without writing secrets into generated artifacts.discovershows visible database metadata and can write a scoped Agent.compileis deterministic and does not invoke a model.plancompares canonical candidate and applied artifacts.evalruns the exact candidate through the real structured runtime.applyrequires passing receipts for every required suite and updates all selected Agents atomically.askandserveuse applied artifacts only and expose evidence, SQL, verification, and technical receipts.
Supporting inspection commands are available under agents and connections.
Run tabletalk COMMAND --help for exact options. Exit codes distinguish usage
errors, configuration failures, eval failures, and runtime failures.
Database configuration
SQLite:
connections:
default:
type: sqlite
database_path: ./data.db
read_only: true
DuckDB:
connections:
default:
type: duckdb
database_path: ./analytics.duckdb
read_only: true
Snowflake secrets should come from environment variables, not source files:
connections:
default:
type: snowflake
account: ${SNOWFLAKE_ACCOUNT}
user: ${SNOWFLAKE_USER}
password: ${SNOWFLAKE_PASSWORD}
database: ANALYTICS
warehouse: COMPUTE_WH
schema: PUBLIC
role: TABLETALK_READER
Use a database identity that is independently restricted to read-only access. SQL AST validation is an additional boundary, not a replacement for database permissions.
dbt metadata
Point TableTalk at a dbt project or manifest:
dbt:
project_dir: ../analytics
target_dir: target
Compilation incorporates available descriptions, lineage, tests, materializations, tags, groups, and ownership into the canonical artifact. A changed dbt manifest changes the candidate digest and must pass evals again.
Examples and verification
examples/sqlite-starter— smallest local pathexamples/duckdb-analytics— analytics joins and a join-multiplication regressionexamples/snowflake-production— env-only Snowflake credentials with a local DuckDB eval fixture
Run the deterministic suite:
uv run pytest -q
uv run ruff check tabletalk
uv run mypy tabletalk
The live Gemma smoke test is opt-in because it needs an authenticated Ollama daemon:
TABLETALK_RUN_LIVE_OLLAMA=1 \
uv run pytest -q -m live_ollama tabletalk/tests/test_live_ollama.py
Security and data handling
- Query execution is read-only and limited to one parsed query.
- Agent relation, column, join, row, and timeout policies are enforced before execution.
- Applied state references immutable artifact and eval-receipt digests.
- Local invocation history stores metadata and receipts, not raw result rows.
- Credential-shaped values are redacted from history and HTTP responses.
- A model or database outage produces a typed failure; no cached prose, alternate provider, or heuristic response is substituted.
License
The current package metadata retains CC BY-NC 4.0 while the repository's
ownership and third-party asset audit remains unresolved. See
docs/refactor/licensing-audit.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tabletalk-0.4.0.tar.gz.
File metadata
- Download URL: tabletalk-0.4.0.tar.gz
- Upload date:
- Size: 280.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b3dbedb4fc36297d8f2b19288c722951951b6dae75b1a7bfa7df652ae063b42
|
|
| MD5 |
cd867148ed410e75d44b7c1c41822859
|
|
| BLAKE2b-256 |
76065ddd1ebf21c2695e07def5cfb01642510221650f85b08fad9b7be2f8f0dc
|
Provenance
The following attestation bundles were made for tabletalk-0.4.0.tar.gz:
Publisher:
publish.yml on wtbates99/tabletalk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tabletalk-0.4.0.tar.gz -
Subject digest:
3b3dbedb4fc36297d8f2b19288c722951951b6dae75b1a7bfa7df652ae063b42 - Sigstore transparency entry: 2264883811
- Sigstore integration time:
-
Permalink:
wtbates99/tabletalk@b3479a92c9c12ca663081e8501f4d3404d4d456d -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/wtbates99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b3479a92c9c12ca663081e8501f4d3404d4d456d -
Trigger Event:
release
-
Statement type:
File details
Details for the file tabletalk-0.4.0-py3-none-any.whl.
File metadata
- Download URL: tabletalk-0.4.0-py3-none-any.whl
- Upload date:
- Size: 124.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df2f750a6db6466d49b5eb52950b786e9122d13f9fb83b0160e65e0daf7c9d41
|
|
| MD5 |
e00f2ab4d6f134c38877f145811ae3e2
|
|
| BLAKE2b-256 |
e611b2c15a1cfea975e7df9e7a49d45d5f126ad4e51d850ee788e1fef3b1f3ff
|
Provenance
The following attestation bundles were made for tabletalk-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on wtbates99/tabletalk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tabletalk-0.4.0-py3-none-any.whl -
Subject digest:
df2f750a6db6466d49b5eb52950b786e9122d13f9fb83b0160e65e0daf7c9d41 - Sigstore transparency entry: 2264883913
- Sigstore integration time:
-
Permalink:
wtbates99/tabletalk@b3479a92c9c12ca663081e8501f4d3404d4d456d -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/wtbates99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b3479a92c9c12ca663081e8501f4d3404d4d456d -
Trigger Event:
release
-
Statement type: