# Datalore agent skill

The [Datalore agent skill](https://github.com/JetBrains/datalore-skills) lets your AI agent to work in with existing Datalore notebooks. Use it to analyze the data already attached to a notebook, edit notebook content, and run notebook code.

> **Note:**
> The skill works with one existing notebook at a time.
>
>
>
> For security reasons, the agent cannot directly access databases or other data sources connected to the notebook. However, it can write notebook code that accesses those sources and work with the resulting cell output.

Before you begin
: 1. Make sure you have [uv](https://docs.astral.sh/uv/) installed on your machine.
:
: 2. In Datalore, create or open the notebook that the agent will work with and attach the required data.

Procedure: Install the skill

There are several ways to install the skill:

* Install via [skills](https://github.com/vercel-labs/skills) for any supported agent: ```SHELL npx skills add JetBrains/datalore-skills --skill datalore-notebook --global ```

* Install as a Claude plugin: ```TEXT /plugin marketplace add JetBrains/datalore-skills /plugin install datalore-skills@jetbrains-datalore ```

* Download the skill from the repository and place it into your desired skill directory.

Procedure: Ask an agent to work in Datalore

1. Open the notebook you want the agent to use and copy its URL.

2. Ask the agent to perform a task and include the notebook URL in your request. For example:

```TEXT
In Datalore notebook https://datalore.jetbrains.com/notebook/qwerty/asdfgh,
analyze the attached CSV file.
```

3. Confirm the agent's request to access the notebook.

4. Review the changes and results in the notebook.

> **Tip:**
> To learn about notebook cells and execution, see [Notebook structure](datalore-notebook-structure.html) and [run code](run-code.html).

The access token is scoped to the notebook's public API and expires after seven days. The token is stored in the system keychain, and notebook session data is stored in `.datalore-session` in the current directory.

To remove the stored token, run `datalore logout` from the directory that contains the session file.

