-
Notifications
You must be signed in to change notification settings - Fork 109
feat: Use custom tool nodes for auth handling #551
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR removes LangChain tools and Vertex AI Function Calling orchestration and consolidates on LangGraph. It also flattens the directory structure and refactors to simplify some parts of code for easier understanding.
This reverts commit aa56d83.
This reverts commit 66966a5.
…/genai-databases-retrieval-app into anubhav-toolbox-deploy
3884ca9
to
c2a32db
Compare
Yuan325
approved these changes
Jul 15, 2025
The current evaluation framework is incompatible with our recent migration to LangGraph for orchestration. Since LangGraph is now our standard, this legacy eval code is obsolete and has been removed to avoid confusion. A new evaluation suite, specifically designed for LangGraph, will be developed separately.
This PR fixes issue causing different messages to show up on decline ticket before and after page refresh. We now return the actual response from the LLM instead of a hardcoded response in case of LangGraph.
The `response["output"]` value will be set with the success or failure messages and will be truthy so the hardcoded message in the `else` case would remain unused.
This PR addresses an issue where the agent could attempt to rebook a flight immediately after a successful booking. ## Problem Previously, after the `insert_ticket` tool successfully executed, a confirmation message was not added to the agent's conversation history from our custom node. This lack of explicit confirmation left the agent without the necessary context to know the booking was complete. As a result, the agent could incorrectly infer that the booking task had failed and attempt to perform the booking again. ## Solution This PR modifies the custom node to add a success message to the agent's conversation history immediately after the `insert_ticket` tool completes successfully. This message explicitly confirms that the flight has been booked, providing the agent with the proper context to conclude the booking process and not attempt a rebooking.
…ggraph and UI chat history
… invoking the graph
…at history as well
…across chat and langgraph
…ent accept/decline handling
ac45c93
to
d00a971
Compare
This PR updates the existing workflow to replace the prebuilt tool node with a new custom tool node. This new node is designed to intelligently handle tool auth by reading auth headers from the provided `RunnableConfig` by LangGraph. The custom node inspects the auth requirements of the underlying core tool within the `ToolboxTool`. If the tool requires authentication, the node dynamically creates an authenticated copy of the tool by attaching the necessary auth token getters using the `add_auth_token_getter` API. This authenticated tool instance is then used for the call and subsequently discarded. This same auth handling logic has also been applied to the node responsible for ticket insertion. > [!NOTE] > The functionality introduced in these custom nodes will be abstracted into the `ToolboxTool` itself in an upcoming release of the `toolbox-langchain`. This will simplify the workflow in the future by handling authentication directly within the tool.
c2a32db
to
6ac7483
Compare
## Summary This PR updates semantic search capabilities within the Cymbal Air app by upgrading its text embedding model to `gemini-embedding-001`. To support this, like before, we've introduced new scripts and updated our mock data accordingly. ## Changes * The core of this PR is the integration of a new text embedding model to improve the accuracy and relevance of our semantic search tools. * `run_generate_embeddings` script is responsible for generating embeddings from our mock CSV data. * `run_generate_policy_dataset` script creates a policy dataset with the newly generated embeddings. * The mock CSV and corresponding JSON files have been updated to include the new vector embeddings generated by the updated model. * We've also introduced Pydantic models to ensure the structure of our data. > [!NOTE] > This PR does not include scripts for initializing or exporting database values. These functionalities will be introduced in a future PR (#553) through dedicated Toolbox tools.
…prebuilt tools (#553) ## Summary This PR refactors how we handle database initialization and export operations, moving this functionality from the now-removed Retrieval Service into scripts using Toolbox. ## Description Previously, the responsibility of initializing and exporting the database resided within the Retrieval Service. As part of our ongoing effort to streamline our architecture and improve separation of concerns, the Retrieval Service has been removed. This PR introduces new scripts in the `data/` directory to handle these database operations using Toolbox prebuilt tools.
## Description This PR introduces a comprehensive update to all major documentation for Cymbal Air. Following the significant architectural changes made during its streamlining, the existing documentation had become outdated and inaccurate. This overhaul aims to align our documentation with the current state of the codebase, improve clarity, and modernize the terminology we use to describe our systems. ## Changes * The setup instructions have been completely rewritten. Notably, all references and setup steps for the now-removed Retrieval Service have been deleted and replaced with the new, correct setup procedures for Toolbox. * Both the main project `README.md` and `DEVELOPER.md` have been updated to reflect the new, streamlined architecture. This includes updated diagrams, component descriptions, and local development workflows. * The language across all documentation has been refreshed to match our latest architectural concepts and internal lexicon. For instance, we now consistently use the term "Agents" to describe our autonomous components, replacing older, less precise terms like "ReAct and orchestration." This ensures all developers are using a shared, current vocabulary.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the existing workflow to replace the prebuilt tool node with a new custom tool node. This new node is designed to intelligently handle tool auth by reading auth headers from the provided
RunnableConfig
by LangGraph.The custom node inspects the auth requirements of the underlying core tool within the
ToolboxTool
. If the tool requires authentication, the node dynamically creates an authenticated copy of the tool by attaching the necessary auth token getters using theadd_auth_token_getter
API. This authenticated tool instance is then used for the call and subsequently discarded. This same auth handling logic has also been applied to the node responsible for ticket insertion.Note
The functionality introduced in these custom nodes will be abstracted into the
ToolboxTool
itself in an upcoming release of thetoolbox-langchain
#291. This will simplify the workflow in the future by handling authentication directly within the tool.