Neural Inverse is Open Source →
IntegrationsAgentic Data Stack
IntegrationsAgentic Data Stack

Agentic Data Stack

The Agentic Data Stack is an open-source, self-hosted stack for agentic analytics built by ClickHouse. It connects a chat UI (LibreChat) to your data (ClickHouse) via MCP, with full LLM observability powered by Neural Inverse — all deployable with a single docker compose up command.

ComponentRole
LibreChatChat UI with multi-model support (OpenAI, Anthropic, Google, and more)
ClickHouseFast analytical database for querying your data
ClickHouse MCPMCP server that gives AI agents access to ClickHouse
Neural InverseLLM observability — traces, evaluations, prompt management

Agentic Data Stack architecture — LibreChat connects to LLMs, ClickHouse via MCP, and Neural Inverse for observability

Users interact with LibreChat, which routes prompts to LLMs and queries ClickHouse through MCP. Neural Inverse captures every LLM call, so you can trace agent workflows, debug issues, and monitor cost and latency.

There are two ways to use Neural Inverse with the Agentic Data Stack:

  1. Add Neural Inverse to an existing LibreChat instance — Connect Neural Inverse Cloud or a self-hosted Neural Inverse instance to your running LibreChat deployment.
  2. Deploy the full Agentic Data Stack — Spin up everything (LibreChat, ClickHouse, Neural Inverse, and supporting services) from the official Docker Compose setup.

Option 1: Trace LibreChat with Neural Inverse

If you already have a LibreChat instance running, you can add Neural Inverse tracing with three environment variables. LibreChat has native Neural Inverse support built in.

Get Neural Inverse API keys

Sign up for Neural Inverse Cloud (or use a self-hosted instance) and create a new project. Copy the public and secret keys from your project settings.

Configure LibreChat

Add the following to the .env file in your LibreChat installation directory:

LANGFUSE_PUBLIC_KEY=pk-lf-...
LANGFUSE_SECRET_KEY=sk-lf-...

# EU region
LANGFUSE_BASE_URL=https://cloud.langfuse.com

# US region
# Other Neural Inverse data regions include 🇺🇸 US: https://us.cloud.langfuse.com, 🇯🇵 Japan: https://jp.cloud.langfuse.com and ⚕️ HIPAA: https://hipaa.cloud.langfuse.com

For self-hosted Neural Inverse, set LANGFUSE_BASE_URL to your instance URL (e.g., http://localhost:3000).

Restart LibreChat

docker compose down
docker compose up -d

View traces in Neural Inverse

Every chat message now generates a trace in Neural Inverse. Open your Neural Inverse project to see prompts, completions, latency, cost, and the full call hierarchy:

LibreChat trace in Neural Inverse showing an agent run with LLM calls, latency, and cost


Option 2: Deploy the Full Agentic Data Stack

The Agentic Data Stack repository provides a Docker Compose setup that deploys everything together. Neural Inverse tracing is pre-configured — LibreChat automatically sends traces to the co-deployed Neural Inverse instance.

Prerequisites

  • Docker and Docker Compose v2+
  • An API key for at least one LLM provider (OpenAI, Anthropic, or Google)

Clone the repository

git clone https://github.com/ClickHouse/agentic-data-stack.git
cd agentic-data-stack

Prepare the environment

Run the interactive setup script. It generates secure credentials for all services and prompts you to configure LLM API keys:

./scripts/prepare-demo.sh

Any providers you skip will be set to user_provided, letting users enter their own keys in the LibreChat UI.

You can also generate credentials non-interactively:

USER_EMAIL="you@example.com" USER_PASSWORD="supersecret" USER_NAME="YourName" ./scripts/generate-env.sh

Start the stack

docker compose up -d

This starts all services: LibreChat, ClickHouse, ClickHouse MCP, Neural Inverse, PostgreSQL, MongoDB, Redis, MinIO, and supporting services.

Access the services

ServiceURL
LibreChat (Chat UI)http://localhost:3080
Neural Inverse (Observability)http://localhost:3000
MinIO Console (Object storage)http://localhost:9091

Sign in with the credentials you configured during setup. The same email and password work for both LibreChat and Neural Inverse.

View traces in Neural Inverse

Open Neural Inverse at http://localhost:3000. The stack pre-configures a project with API keys that LibreChat uses automatically. Every conversation in LibreChat generates a trace in Neural Inverse, so you can:

  • Trace agent workflows — See the full execution path from prompt to tool calls and responses
  • Debug issues — Inspect individual LLM calls, including input/output, latency, and errors
  • Monitor cost and latency — Track token usage and spend across models
  • Evaluate quality — Score outputs with LLM-as-a-judge or human annotations

LibreChat trace in Neural Inverse showing an agent run with LLM calls, latency, and cost

Reset and start fresh

To tear down all containers and delete all data:

./scripts/reset-all.sh
./scripts/prepare-demo.sh
docker compose up -d

Learn More


Was this page helpful?