> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Ask questions of your database

> Ask your agent to inspect and query the right customer data.

[Agent guide: CLI and SDK instructions →](/docs/database-access)

## 1. Have your context ready

State which database you mean, the business question, and whether this is read-only work. Deepline-managed views and your own tables have different write rules.

## 2. Ask your agent

Paste this into your agent, then provide your task and example inputs when it asks:

```deepline-prompt theme={null}
/deepline-gtm Answer my question from the intended Deepline customer database. Inspect the available schema and permissions before writing a query. Start with a bounded read-only query and explain its columns, filters, and row grain. Do not modify managed enrichment views or assume a connected external Postgres database is the same database. Show any truncation or missing access explicitly.
```

Complete any requested sign-in yourself. Give the agent the missing information before approving execution. Provider-backed work can incur usage.

## 3. Review the result

The answer comes from the intended database and population. An empty successful query differs from a permission failure. Approve writes to your own permitted objects separately.

Ask your agent:

```deepline-prompt theme={null}
/deepline-gtm Compare the result with the acceptance rule we agreed. Show the evidence for accepted and rejected outcomes, unresolved questions, and recorded Deepline usage where work ran. If work is still running or a response is uncertain, inspect the original saved execution before proposing another request. Explain the next decision I need to make.
```

Approve a larger job, recurring work, or external changes only after reviewing that decision.

## Check your understanding

Does a successful empty query mean Database access failed?

> **Show the answer**
>
> No. The query completed without returned matches. A permission or execution
> error is a different outcome.

## Related guides

* [Database reference](/docs/features/postgresql-database)
* [Where data lives](/docs/data-lifecycle)
* [Runtime API Reference](/docs/sdk-v2/api-reference)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.