Skip to main content

Notebook agent

Bring AI-powered assistance directly into your Hex projects.

info
  • All paid plans include monthly agent usage limits.
  • Users need the Admin, Manager, or Editor workspace role and Can Edit or higher project permissions to use the Notebook agent.
  • The Notebook agent is not compatible with the App builder view or Published apps.
  • To share suggestions for new features or improvements, reach out to [email protected].

The Notebook agent offers a natural language experience to assist with code generation and exploratory analysis within Hex projects. The agent has full access to your project context and warehouse schema information, so you can ask questions about - and receive answers for - your data. The agent can also help with syntax, act as a sounding board for brainstorming solutions, or create entirely new lines of analysis.

Sources for agentic analysis

The Notebook agent can leverage any Data connections or Semantic models that a user has access to in order to properly power analysis. Point the Notebook agent at any Data connection or Semantic model by mentioning them in your project.

The agent will also reference any Workspace rules that have been defined in the Workspace rules file.

tip

Check out our Modeling workbench to get started on building a Semantic model in Hex, or sync your existing Semantic model into Hex using Semantic sync!

Using the Notebook agent

Access the Notebook agent in a Hex project from the Ask a question modal in the bottom-right corner of the Notebook.

Start a new thread

Start a new thread from the + icon in the top right corner of the agent sidebar. Starting a new thread will allow you to clear the context of the chat to ask a new question.

Start a new thread

Staring a new thread will save a version of your project, so you're able to access and restore previous project versions.

Access chat history

Access your previous chat history from History at the top of the active chat window. Your chat history reflects your personal chat requests, and chat requests persist for 30 days.

Mention cells and tables

Tag specific cells in the Notebook agent prompt to focus the agent's analysis on specific cells or tables for its primary context. Useful for very large notebooks or cases where you know exactly what you want the agent to do. Mentioning a specific cell in the project will allow you to focus the agent's analysis on that specific cell, and you can mention any Cell, Table, or Dataframe in project memory.

Directly mention in-memory project assets

Confirm or Undo pending changes

All changes that the agent suggests must be accepted into the Notebook (Confirm) or rejected (Undo). Pending changes are managed on the individual cell level, and every cell that the agent touches will prompt a new change to confirm or undo.

The Pending changes modal will sequentially guide you through the changes that the agent has made, and allow you to handle each one separately. Selecting an individual cell in the Pending changes modal will take you to the affected cell, where you can view the cell's logic in the context of your project.

Set user rules

User rules let you set personal preferences for the Notebook Agent to follow automatically. Specify formatting, response style, or other guidance once, and the agent will use it across your Notebooks. These instructions only apply to you and aren’t visible to other users in your workspace.

Notebook agent capabilities

Generate new cells

The Notebook agent has the ability to create new cells in a project. The agent is capable of creating Python cells, SQL cells, Markdown cells, Pivot cells, Input parameters, Single value cells, and Chart cells. The agent will create the necessary cells to properly accommodate your request.

Edit existing cells

The Notebook agent can also modify existing cells in your project. To modify a cell, point the Agent at a specific cell in your project via @ Mention and state your request.

Move cells

The Notebook agent can help with notebook organization by moving cells to different locations in your Notebook. You can ask the agent to move cells before/after other cells, as part of sections, or to the top/bottom of the project. The Agent understands the chain of dependencies present in your project, so it knows where to insert/move cells in cooperation with the project's Execution model.

Delete cells

The Notebook agent can delete cells from your notebook with full awareness of downstream impacts. Before deletion, the agent inspects cell lineage to understand which other cells depend on the cell being removed, including variable references, dataframe dependencies, and input parameter usage. The agent can delete individual cells or multiple cells at once.

Before the agent deletes cells in your project, you must select either Accept or Deny for the changes to take effect. Select Don't ask again in this thread for the agent to skip this step.

Confirm that cells can be deleted safely

Fix your code

The agent can fix your code with either Fix with agent or Quick fix.

Handle pending changes

Fix with agent is best suited for:

  • Complex, multi-step fixes that span multiple cells
  • Contextual debugging that factors in your data and analysis objectives
  • Exploratory fixes, where the agent needs to test queries or validate its logic before delivering an answer
  • Consultative troubleshooting that delivers in-depth explanations alongside its fixes

Quick fix is best suited for:

  • Simple corrections: fixing things like syntax errors, typos, missing imports, incorrect function names, etc.
  • Analysis that does not require context on your data or business logic
  • Straightforward problems that are contained within a single cell and have a clear solution

Chat the docs

The Notebook agent is connected to our documentation (i.e., the page you're reading right now), so you can ask the Notebook agent direct questions about Hex functionality and it can help you find relevant documentation or tutorials.

Ask the agent questions about Hex functionality

Summarize cell contents

The agent can summarize a cell or project's contents, and can answer natural language questions about the project's logic. You can ask it any question about the project or underlying dataset.

tip

Select Tab on a currently-selected cell to add that cell to your prompt.

Summarize cell or project contents

Providing feedback

Use the in product feebdack buttons to report bugs or issues. Our team reviews these reports daily. If you want to share suggestions for new features or improvements, reach out to us directly at [email protected].