Notebook agent that writes and runs analysis cells
An agent in a data notebook writes SQL and Python cells, runs them and builds charts, while the analyst checks each step.
The use case
Analysts spend a lot of an investigation writing boilerplate queries and charts. Hex's Notebook Agent works inside a project: given a question, it searches the data, writes SQL and Python cells, runs them, fixes errors, and builds charts. Hex also offers Threads for non-technical users to ask questions in chat. Because the work lands as visible cells, the analyst can read and edit every step. The analyst still checks the logic and assumptions, and shared apps or reports get reviewed before stakeholders see them.
Example workflow
- Open a project and describe the question
- Agent writes and runs cells
- Review queries and intermediate results
- Edit or redirect the agent where needed
- Publish the final app after review
Tools
- Hex
Risks and guardrails
- Charts can look right with wrong filters
- Agent may pick the wrong table among similar ones
- Review before sharing with leadership
Sources
Written by Agents Lookup. Credits and official pages for the tools this use case names:
- Hex docs: AI in Hex: learn.hex.tech/docs/getting-started/ai-overview
- Hex (official page): learn.hex.tech/docs/administration/mcp-server (checked 2026-11-19)