Skip to content

WIP: Use langgraph to call tools #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brichet
Copy link
Collaborator

@brichet brichet commented Jun 26, 2025

This PR adds langgraph, which allows to call tools that can interact with Jupyterlab API.

As an example, the PR includes a default tools, that only shows a Jupyterlab modal with the response from the model.

record-2025-06-26_17.23.44.webm

Current state

  • add a setting to enable the use of tool (only a test tool available as of now)
  • create an agent (LLM + tool) using langgraph, and call it instead of only the LLM
  • the LLM decides by itself if it should call a tool or not. The PR updates the system prompt to require calling it, for now.
  • add a message for each message received from the LLM (user is Jupyternaut) and from the tool (user is the tool name)

To do, To discuss

  • add a registry (with a token) to enable additional tools from extensions
  • @jtpio suggested to switch from LLM to agent from the chat panel itself (instead of the settings). If we do that, we should probably be able to select the tool(s) to use from the chat panel too.
  • currently there is an additional instruction in the system prompt to request the use of the tool. We should explore if there is an option when binding the tool to the model, if we want to force the use of it.
  • we should probably pass only a subset of the agent for security reason (as we did for chat model and completer model in Do not expose providers api #84)

@brichet brichet added the enhancement New feature or request label Jun 26, 2025
@jtpio jtpio mentioned this pull request Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant