Ensure your Metabase instance is running a version that includes the Agent API and that you have API key or session token authentication configured
Model your canonical data definitions in Metabase Data Studio as Models (curated saved questions intended as semantic building blocks) with verified column types, descriptions, and relationships
Send POST requests to /api/agent with a natural language query or structured request body; the Agent API resolves the request against the authenticated user's permitted models and semantic definitions
Parse the response to extract the resulting data, the SQL that was generated, and any metadata about which models were used, enabling you to build traceability in your application
Scope the Agent API session to a specific user's permissions by authenticating with that user's session token, so that the semantic layer access control in Metabase governs what data is accessible
Known gotchas
The Agent API is scoped to the authenticated user's permissions; if you use a single shared admin token for all agent requests, you bypass per-user data access controls and expose all data to every API caller
Models in Metabase are a specific object type distinct from saved questions and dashboards; only promoted Models (not ad-hoc saved questions) are indexed by the semantic layer and reliably available through the Agent API
The Agent API may return different SQL for identical natural language queries across calls if the underlying LLM component produces non-deterministic outputs; build idempotency and output validation into downstream consumers
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp