GuLiN integrates with Dremio for big-data SQL analytics via the API Manager. Rather than using a proprietary driver, the agent follows Dremio’s REST API protocol dynamically: it discovers the connection details from the API Manager registry, authenticates, submits SQL jobs, polls for completion, and fetches results — all automatically, in a single conversational turn.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jorgeurtubiam-ship-it/Gulin_ia/llms.txt
Use this file to discover all available pages before exploring further.
Architecture
Dremio is registered as a named service inside the API Manager (conventionally nameddremio). This means no Dremio-specific code is compiled into GuLiN — the agent reads the base URL and auth instructions from the vault at runtime and adapts accordingly.
The agent follows a dynamic protocol each time you ask a Dremio question:
- Read the current registration from
apimanager_list. - Authenticate using the instructions stored in the vault.
- Submit the SQL query and track the asynchronous job.
- Retrieve and present the results.
Dremio Endpoints Used
| Step | Method | Endpoint | Purpose |
|---|---|---|---|
| Login | POST | /apiv2/login | Exchange credentials for a session token |
| Execute SQL | POST | /api/v3/sql | Submit a SQL query, returns a jobid |
| Poll status | GET | /api/v3/job/{jobid} | Check whether the job is COMPLETED, FAILED, etc. |
| Fetch results | GET | /api/v3/job/{jobid}/results | Download the result rows once the job completes |
Login
Submit SQL
Poll Status
Fetch Results
Agent Workflow
Discover the service
The agent calls
apimanager_list to retrieve the registered Dremio entry — including the base URL (e.g. http://127.0.0.1:9047) and the auth_instructions that describe how to log in. This step ensures the agent always uses the current configuration without any hard-coded values.Authenticate
Following the auth instructions, the agent performs a
POST /apiv2/login with the stored username and password. The response contains a session token that is used as the Authorization header for all subsequent calls.Submit the SQL query
The agent constructs the SQL based on your natural-language request and sends it to The agent extracts the
POST /api/v3/sql. Dremio responds with a jobid — a unique identifier for the asynchronous execution job.jobid from the response for use in the next steps.Poll until completed
The agent repeatedly calls
GET /api/v3/job/{jobid} until the jobState field equals COMPLETED. If the state is FAILED or CANCELED, the agent reports the error and stops. The polling interval is managed automatically to avoid hammering the Dremio server.Fetch and handle results
Once the job is
COMPLETED, the agent calls GET /api/v3/job/{jobid}/results to download the result rows.For large datasets (responses exceeding ~100 KB), the agent writes the raw JSON response to a local .json file rather than loading the entire payload into the chat context. This prevents context window saturation and keeps the terminal responsive.Render the dashboard
After filtering, the agent structures the summary data into dashboard metadata and renders an interactive chart directly in the terminal. See the Databases page for the full list of supported chart types and the
dashboard:type / dashboard:title / dashboard:data metadata format.Protection Systems
GuLiN implements three layers of protection specifically for Dremio integrations to ensure safe, reliable execution even when working with large enterprise datasets.Loop Detector
The execution engine monitors every tool call. If the agent attempts to invoke the same tool with the same parameters more than three times consecutively, the system halts automatically. This prevents infinite polling loops — for example, if a Dremio job stalls in a non-terminal state — and surfaces the issue as an explicit error rather than hanging indefinitely.Credential Shield
A filter in the agent’s tool layer intercepts any attempt to use generic or hallucinated usernames (such asadmin or user). When detected, the filter substitutes the actual stored credentials from the encrypted API Manager vault. This guarantees that even if the AI model tries to infer credentials from context, only the real registered values are ever sent to Dremio.
Large Data Handling
Dremio queries over enterprise lakehouses can return hundreds of kilobytes or more of JSON. The agent is instructed never to flood the chat context with raw result data. The protocol is:- Download the full result set to a local
.jsonfile. - Filter using
jqor Python to produce a concise summary. - Send only the summary (or the first N rows) to the dashboard renderer.
Registering Dremio in the API Manager
If Dremio is not yet registered, you can set it up with a single instruction to the agent:apimanager_register and stores everything in the encrypted vault. From that point on, any Dremio question automatically triggers the full authentication-and-query workflow described above.
You can register multiple Dremio instances (development, staging, production) using different service names. Ask the agent to use a specific instance by referring to its registered name in your query.