Skip to content

Conversation

@3coins
Copy link
Contributor

@3coins 3coins commented Jun 19, 2025

This PR adds three new toolkits to the jupyter-ai-tools repository, enabling AI agents to interact with file systems,
manipulate notebooks, and execute code:

  1. File System Toolkit: Enables agents to interact with the file system
from jupyter_ai_tools.toolkits.file_system import toolkit as fs_toolkit

# In agent creation:
tools = [tool.callable for tool in fs_toolkit.get_tools()]

# Agent can now use these capabilities:
agent.invoke("Find all Python files in the project")
# Agent will use tools like glob("**/*.py"), read(), grep() etc.
  1. Notebook Toolkit: Allows agents to manipulate Jupyter notebooks (currently untested)
from jupyter_ai_tools.toolkits.notebook import toolkit as nb_toolkit

# In agent creation:
tools = [tool.callable for tool in nb_toolkit.get_tools()]

# Agent can now analyze and modify notebooks
agent.invoke("Summarize the notebook and add a markdown cell with explanations")

Note: Notebook toolkit functionality is currently untested and will be refined after this PR is merged.

  1. Code Execution Toolkit: Enables agents to execute bash commands
from jupyter_ai_tools.toolkits.code_execution import toolkit as exec_toolkit

# In agent creation:
tools = [tool.callable for tool in exec_toolkit.get_tools()]

# Agent can now run bash commands as part of its reasoning
agent.invoke("Install missing dependencies for this project")
# Agent will use bash() to check and install packages

@3coins 3coins marked this pull request as ready for review June 20, 2025 03:44
@3coins 3coins changed the title WIP: Updates to match toolkit changes Updates to match toolkit changes Jun 20, 2025
@Zsailer
Copy link
Contributor

Zsailer commented Jun 23, 2025

Looks good to me, @3coins!

@Zsailer
Copy link
Contributor

Zsailer commented Jun 23, 2025

@3coins I cut a release of jupyter_server_ai_tools and pushed a commit to your branch using this latest release to fix the failing CI.

@3coins 3coins force-pushed the toolkit-updates branch from 8fd2746 to a0208c3 Compare June 25, 2025 22:36
@3coins 3coins marked this pull request as draft June 25, 2025 22:38
@3coins 3coins changed the title Updates to match toolkit changes Toolkits for filesystem, bash, and notebook Jun 26, 2025
@3coins 3coins marked this pull request as ready for review June 26, 2025 20:04
@Zsailer
Copy link
Contributor

Zsailer commented Jun 26, 2025

Nice work @3coins! Merging and working on a release next!

@Zsailer Zsailer merged commit 0deb113 into jupyter-ai-contrib:main Jun 26, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants