> For the complete documentation index, see [llms.txt](https://docs.amitysolutions.com/ekoai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amitysolutions.com/ekoai/getting-started/ekoai/ekoai-configuration/ekoai-agent/data-analyst-agent.md).

# Data Analyst Agent

Perform data search on SQL database

To enhance data analysis capabilities, developers must activate the Query\_SQL tool exclusively through API integration. This step is vital for maximizing the potential of the Data Analyst Agent and obtaining insightful results through SQL queries.

{% code overflow="wrap" lineNumbers="true" fullWidth="true" %}

```json
    "tools": {
        "query_sql": {
            "toolName": "query_sql",
            "config": {
                "usage_description": "Use this tool to query the data for every question from The Redshift Database, Except the report generation requested.",
                "db_type": "postgres",
                "db_config": {
                    "host": "{{host}}",
                    "port": {{port}},
                    "user": "{{string}}",
                    "password": "{{string}}",
                    "database": "{{string}}"
                },
                "sql_translator_endpoint": "{{sql_translator_endpoint}}"
            }
        }
    }
```

{% endcode %}

{% hint style="info" %}
Efficient data analysis requires the utilization of data marts to support complex SQL queries. By ensuring a proper data structure is in place, the Data Analyst Agent can effortlessly execute SQL queries and analyze retrieved data. These findings are then transformed into valuable reports and actionable suggestions.
{% endhint %}

<figure><img src="https://114949873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkGjT4d6YfxBhnPZQPQSC%2Fuploads%2FbLjYonPrkqwGf2dI7uHk%2FScreenshot%202568-02-05%20at%2000.01.58.png?alt=media&amp;token=afa333dc-82eb-4bf1-85e2-2c998f26305c" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.amitysolutions.com/ekoai/getting-started/ekoai/ekoai-configuration/ekoai-agent/data-analyst-agent.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
