Integration · Databases
AI agents for Hasura
Query and change data through a Hasura GraphQL Engine (v2, on Hasura Cloud or your own server) with its admin secret: read-only GraphQL queries, GraphQL mutations, and SQL on its Postgres databases, read-only or not.
- Actions
- 5
- Read
- 3
- Write
- 2
Actions
What your agents can do in Hasura
Query and change data through a Hasura GraphQL Engine (v2, on Hasura Cloud or your own server) with its admin secret: read-only GraphQL queries, GraphQL mutations, and SQL on its Postgres databases, read-only or not. The admin role bypasses Hasura's permission rules. Hasura DDN (v3) projects are not supported.
Read 3
Look things up. Nothing changes.
Run a GraphQL query
Runs a read-only GraphQL query.
List database tables
Lists the tables and views of a Postgres database connected to the engine, from information_schema (Hasura's own hdb_catalog and the system schemas left out).
Run read-only SQL
Runs Postgres SQL in a READ ONLY transaction (run_sql with read_only), so it cannot change data: SELECT, WITH, EXPLAIN, SHOW.
Write 2
Create, change or send.
Run a GraphQL mutationDeletes data
Runs any GraphQL operation as the admin role, usually a mutation.
Run SQLDeletes data
Runs any Postgres SQL as the engine's database user (run_sql): inserts, updates, deletes and schema changes too.
A person can approve first
Any write action can be set to wait for a person's approval before it runs, so an agent asks before it changes anything. Actions that delete data ask first by default.
Connection
How it connects
Connect it once in the console, then give it to the agents and workflows that need it.
Paste an API key from your Hasura account.
What you enter
- Admin secret
Settings
- GraphQL Engine address
Kept safe
- Credentials are stored encrypted with your organization's own keys.
- They are opened only by the process that makes the call, at the moment it runs, and never go into a prompt or the browser.
- Calls go only to the tool's own servers.
Ideas
Ideas to start with
Starting points made only from the actions above. Mix them with any other tool your agents can use.
- 01
Ask about your Hasura data
Ask a question in plain words. The agent can run a GraphQL query, list database tables or run read-only SQL in Hasura, then answers with what it found.
- 02
Let an agent update Hasura
Have the agent run a GraphQL mutation or run SQL in Hasura as part of a larger task. Turn on approval and a person signs off on each change first.
- 03
Share what it finds in Slack
Give one agent Hasura and Slack: it can run a GraphQL query in Hasura and post a summary to a Slack channel in the same run.
FAQ
Hasura and MyDeepAgents
Can MyDeepAgents connect to Hasura?
Yes. The Hasura connector has 5 actions: 3 read and 2 make changes. Your agents can call them as tools, and your workflows can run them as steps.
How do I connect Hasura?
Paste an API key from your Hasura account. You'll need: Admin secret. The connection also asks for: GraphQL Engine address. Credentials are stored encrypted with your organization's own keys and are opened only at the moment of a call.
Can an agent change data in Hasura without asking?
Only if you let it. Each of the 2 actions that change data can be set to wait for a person's approval before it runs, and since they can delete data they ask first by default.
Can I use Hasura in workflows as well as agents?
Yes. Every Hasura action also works as a step in a workflow, and the same connection serves your agents and your workflows.
Early access
Put Hasura to work
Connect it in a few minutes, give an agent the actions it needs, and decide which changes wait for a person.