Skip to content

Conversation

anubhav756
Copy link
Contributor

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 #291. This will simplify the workflow in the future by handling authentication directly within the tool.

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.
@anubhav756 anubhav756 requested a review from kurtisvg July 3, 2025 14:14
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.
@anubhav756 anubhav756 force-pushed the anubhav-consistent-ui branch from ac45c93 to d00a971 Compare July 22, 2025 15:26
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.
Base automatically changed from anubhav-consistent-ui to toolbox-main July 23, 2025 11:49
## 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.
@anubhav756 anubhav756 merged commit 5fe84d4 into toolbox-main Jul 23, 2025
5 checks passed
@anubhav756 anubhav756 deleted the anubhav-auth-tool branch July 23, 2025 14:01
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