Skip to content

Shaper for AI Agents

Shaper is a great way for agents to query and visualize data. Since everything is represented as SQL, it’s easy to verify the correctness of the queries that power visualizations.

Use Shaper’s API to create temporary dashboards, query data and generate images or PDFs directly from SQL. Learn how to use the API by visiting the API docs: https://taleshape.com/shaper/docs/api-endpoints.md

To understand how to build dashboards using SQL, see the SQL reference: https://taleshape.com/shaper/docs/dashboard-sql-reference.md

To understand the available data start by running this query to list all tables:

SELECT
concat(database_name, '.', schema_name, '.', table_name) AS name,
estimated_size,
column_count,
comment
FROM duckdb_tables()
WHERE NOT internal AND NOT temporary;

Then you can run follow-up queries to get more details about the columns in relevant tables:

SELECT
column_name,
data_type,
is_nullable,
column_default,
comment
FROM duckdb_columns()
WHERE NOT internal
AND concat(database_name, '.', schema_name, '.', table_name) = 'your_table_name';