Skip to content

Build Your Own Data Analytics Slack Agent With Shaper

At Taleshape, we are building Shaper - an open source SQL-based tool to visualize data and build dashboards.

And we think Shaper is a great fit for building custom data analytics AI agents.

Let’s look at an agent in action:

  • Talk to the agent directly in Slack, and it uses Shaper to answer your data questions.
  • The agent can create anything from charts and Excel files to complete PDF reports, and then shares these files in Slack.
  • Since any chart or report in Shaper is just a SQL query, we can easily verify and reproduce any answer the agent gives.
Play
  1. The agent itself is a simple Python application that listens to Slack messages.
  2. When it receives a message, it uses an LLM to answer the user request.
  3. We give the LLM tools to use Shaper’s API to generate png/pdf/xlsx files directly from SQL queries.
  4. We then upload the generated files to Slack. While the LLM generates the SQL, it doesn’t touch the results, avoiding the risk of hallucinated data or charts.

Architecture Diagram

Since we control the agent and Shaper runs in our own infrastructure, we are also in full control of what data the LLM sees and which LLM we use. This setup can be easily adapted to fit the privacy and security needs of any organization.

Shaper’s interactive dashboards are great for tracking known metrics or giving customers an overview of their data.

But what do we do if we have ad-hoc questions or want to explore our data beyond what any existing dashboard was built for?

That’s where AI agents can help:

  • Build an agent that answers your business team’s data questions without the help of a data analyst.
  • Build an agent to explore new use cases for your data.

Shaper’s SQL-based approach means that instead of answering one-off questions your data team can focus on:

  1. Reviewing and verifying answers the agent gives.
  2. Turn any ad-hoc request into customer-facing dashboards and reusable reports.

Building your own agent not only means that you stay in full control of your data, but also that you can build an agent that is truly useful in practice. You can narrow the problem scope and build an agent for exactly the workflows most useful to you, integrating it into your processes with the context it needs.

Shaper provides the foundation to access data, create charts and reports, while ensuring correctness and keeping everything reproducible.

At Taleshape, we help our customers build systems exactly like this agent.

If you’d like to learn more, don’t hesitate to reach out.