Skip to content

Commit dd3ae34

Browse files
julian-rischclaude
andauthored
docs: remove documentation for APIs removed in 3.0 (ToolInvoker page, Agent breakpoints, auto tracing) (#11955)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 9c287c0 commit dd3ae34

11 files changed

Lines changed: 19 additions & 303 deletions

File tree

docs-website/docs/concepts/pipelines/pipeline-breakpoints.mdx

Lines changed: 4 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,19 @@
22
title: "Pipeline Breakpoints"
33
id: pipeline-breakpoints
44
slug: "/pipeline-breakpoints"
5-
description: "Learn how to pause and resume Haystack pipeline or Agent execution using breakpoints to debug, inspect, and continue workflows from saved snapshots."
5+
description: "Learn how to pause and resume Haystack pipeline execution using breakpoints to debug, inspect, and continue workflows from saved snapshots."
66
---
77

88
# Pipeline Breakpoints
99

10-
Learn how to pause and resume Haystack pipeline or Agent execution using breakpoints to debug, inspect, and continue workflows from saved snapshots.
10+
Learn how to pause and resume Haystack pipeline execution using breakpoints to debug, inspect, and continue workflows from saved snapshots.
1111

1212
## Introduction
1313

1414
Haystack pipelines support breakpoints for debugging complex execution flows. A `Breakpoint` allows you to pause the execution at specific components, inspect the pipeline state, and resume execution from saved snapshots. This feature works for any regular component as well as an `Agent` component.
1515

1616
You can set a `Breakpoint` on any component in a pipeline with a specific visit count. When triggered, the system stops the execution of the `Pipeline` and captures a snapshot of the current pipeline state. The state can be saved to a JSON file when snapshot file saving is enabled, see [Snapshot file saving](#snapshot-file-saving) below. You can inspect and modify the snapshot and use it to resume execution from the exact point where it stopped.
1717

18-
You can also set breakpoints on an Agent, specifically on the `ChatGenerator` component or on any of the `Tool` specified in the `ToolInvoker` component .
19-
2018
## Setting a `Breakpoint` on a Regular Component
2119

2220
Create a `Breakpoint` by specifying the component name and the visit count at which to trigger it. This is useful for pipelines with loops. The default `visit_count` value is 0.
@@ -49,7 +47,7 @@ To access the pipeline state during the breakpoint we can both catch the excepti
4947

5048
## Using a custom snapshot callback
5149

52-
You can pass a `snapshot_callback` to `Pipeline.run()` or `Agent.run()` to handle snapshots yourself instead of saving to a file. When a breakpoint is triggered or a snapshot is created on error, the callback is invoked with the `PipelineSnapshot` object. This is useful for saving snapshots to a database, sending them to a remote service, or custom logging.
50+
You can pass a `snapshot_callback` to `Pipeline.run()` to handle snapshots yourself instead of saving to a file. When a breakpoint is triggered or a snapshot is created on error, the callback is invoked with the `PipelineSnapshot` object. This is useful for saving snapshots to a database, sending them to a remote service, or custom logging.
5351

5452
```python
5553
from haystack.core.errors import BreakpointException
@@ -72,7 +70,7 @@ except BreakpointException as e:
7270
print(f"Breakpoint triggered: {e.component}")
7371
```
7472

75-
When `snapshot_callback` is provided, file-saving is skipped and the callback is responsible for handling the snapshot. The same parameter is available on `Agent.run()` for agent breakpoints.
73+
When `snapshot_callback` is provided, file-saving is skipped and the callback is responsible for handling the snapshot.
7674

7775
## Snapshot file saving
7876

@@ -111,58 +109,6 @@ result = pipeline.run(data={}, pipeline_snapshot=snapshot)
111109
print(result["llm"]["replies"])
112110
```
113111

114-
## Setting a Breakpoint on an Agent
115-
116-
You can also set breakpoints in an Agent component. An Agent supports two types of breakpoints:
117-
118-
1. **Chat Generator Breakpoint**: Pauses before LLM calls.
119-
2. **Tool Invoker Breakpoint**: Pauses before any tool execution.
120-
121-
A `ChatGenerator` breakpoint is defined as shown below. You need to define a `Breakpoint` as for a pipeline breakpoint and then an `AgentBreakpoint` where you pass the breakpoint defined before and the name of Agent component.
122-
123-
```python
124-
from haystack.dataclasses.breakpoints import AgentBreakpoint, Breakpoint, ToolBreakpoint
125-
126-
# Break at chat generator (LLM calls)
127-
chat_bp = Breakpoint(component_name="chat_generator", visit_count=0)
128-
agent_breakpoint = AgentBreakpoint(break_point=chat_bp, agent_name="my_agent")
129-
```
130-
131-
To set a breakpoint on a Tool in an Agent, do the following:
132-
133-
First, define a `ToolBreakpoint` specifying the `ToolInvoker` component whose name is `tool_invoker` and then the tool associated with the breakpoint, in this case – a `weather_tool` .
134-
135-
Then, define an `AgentBreakpoint` passing the `ToolBreakpoint` defined before as the breakpoint.
136-
137-
```python
138-
from haystack.dataclasses.breakpoints import AgentBreakpoint, Breakpoint, ToolBreakpoint
139-
140-
# Break at tool invoker (tool calls)
141-
tool_bp = ToolBreakpoint(
142-
component_name="tool_invoker",
143-
visit_count=0,
144-
tool_name="weather_tool", # Specific tool, or None for any tool
145-
)
146-
agent_breakpoint = AgentBreakpoint(break_point=tool_bp, agent_name="my_agent")
147-
```
148-
149-
### Resuming Agent Execution
150-
151-
When an Agent breakpoint is triggered, you can resume execution using the saved snapshot. Similar to the regular component in a pipeline, pass the JSON file with the snapshot to the `run()` method of the pipeline.
152-
153-
```python
154-
from haystack.core.pipeline.breakpoint import load_pipeline_snapshot
155-
156-
# Load the snapshot
157-
snapshot_file = "./agent_debug/agent_chat_generator_2025_07_11_23_23.json"
158-
snapshot = load_pipeline_snapshot(snapshot_file)
159-
160-
# Resume pipeline execution
161-
result = pipeline.run(data={}, pipeline_snapshot=snapshot)
162-
print("Pipeline resumed successfully")
163-
print(f"Final result: {result}")
164-
```
165-
166112
## Error Recovery with Snapshots
167113

168114
Pipelines automatically create a snapshot of the last valid state if a run fails. The snapshot contains inputs, visit counts, and intermediate outputs up to the failure. You can inspect it, fix the issue, and resume execution from that checkpoint instead of restarting the whole run.

docs-website/docs/development/tracing.mdx

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,17 @@ Instrumented applications typically send traces to a trace collector or a tracin
2323
| [LoggingTracer](tracing/logging-tracer.mdx) | Inspect the data flowing through your pipeline in real time through logs, with no backend setup. |
2424
| [Custom Tracer](tracing/custom-tracer.mdx) | Connect any tracing backend by implementing the `Tracer` interface. |
2525

26-
## Disabling Auto Tracing
26+
## Enabling and Disabling Tracing
2727

28-
Haystack automatically detects and enables tracing under the following circumstances:
28+
Haystack never enables tracing automatically. To enable it, either call `haystack.tracing.enable_tracing(...)` with the tracer of your choice, or add a tracing connector component such as the [`OpenTelemetryConnector`](tracing/opentelemetry.mdx) or the [`DatadogConnector`](tracing/datadog.mdx) to your pipeline.
2929

30-
- If `opentelemetry-sdk` is installed and configured for OpenTelemetry. Note that this auto-enabling is deprecated and will be removed in Haystack 3.0 – use the [`OpenTelemetryConnector`](tracing/opentelemetry.mdx) to enable OpenTelemetry tracing instead.
31-
- If `ddtrace` is installed for Datadog. Note that this auto-enabling is deprecated and will be removed in Haystack 3.0 – use the [`DatadogConnector`](tracing/datadog.mdx) to enable Datadog tracing instead.
30+
To disable an enabled tracer:
3231

33-
To disable this behavior, there are two options:
32+
```python
33+
from haystack.tracing import disable_tracing
3434

35-
- Set the environment variable `HAYSTACK_AUTO_TRACE_ENABLED` to `false` when running your Haystack application
36-
37-
— or —
38-
39-
- Disable tracing in Python:
40-
41-
```python
42-
from haystack.tracing import disable_tracing
43-
44-
disable_tracing()
45-
```
35+
disable_tracing()
36+
```
4637

4738
## Content Tracing
4839

docs-website/docs/overview/migrating-from-langgraphlangchain-to-haystack.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Here's a table of key concepts and their approximate equivalents between the two
4343
| Multi-Agent Collaboration (LangChain) | Multi-Agent System | Using [`ComponentTool`](../tools/componenttool.mdx), agents can use other agents as tools, enabling [multi-agent architectures](https://haystack.deepset.ai/tutorials/45_creating_a_multi_agent_system) within one framework. |
4444
| Model Context Protocol `load_mcp_tools` `MultiServerMCPClient` | Model Context Protocol - `MCPTool`, `MCPToolset`, `StdioServerInfo`, `StreamableHttpServerInfo` | Haystack provides [various MCP primitives](https://haystack.deepset.ai/integrations/mcp) for connecting multiple MCP servers and organizing MCP toolsets. |
4545
| Memory (State, short-term, long-term) | Memory (Agent State, short-term, long-term) | Agent [State](../pipeline-components/agents-1/state.mdx) provides a structured way to share data between tools and store intermediate results during agent execution. For short-term memory, Haystack offers a [ChatMessage Store](/reference/experimental-chatmessage-store-api) to persist chat history. More memory options are coming soon. |
46-
| Time travel (Checkpoints) | Breakpoints (Breakpoint, AgentBreakpoint, ToolBreakpoint, Snapshot) | [Breakpoints](../concepts/pipelines/pipeline-breakpoints.mdx) let you pause, inspect, modify, and resume a pipeline, agent, or tool for debugging or iterative development. |
46+
| Time travel (Checkpoints) | Breakpoints (Breakpoint, PipelineSnapshot) | [Breakpoints](../concepts/pipelines/pipeline-breakpoints.mdx) let you pause, inspect, modify, and resume a pipeline for debugging or iterative development. |
4747
| Human-in-the-Loop (Interrupts / Commands) | Human-in-the-loop (`ConfirmationHook` with confirmation strategies) | Haystack applies [confirmation strategies](https://haystack.deepset.ai/tutorials/47_human_in_the_loop_agent) through a `ConfirmationHook` registered under the Agent's `before_tool` [hook point](../pipeline-components/agents-1/hooks.mdx) to pause or block the execution to gather user feedback |
4848

4949
## Ecosystem and Tooling Mapping: LangChain → Haystack

docs-website/docs/pipeline-components/generators/googleaigeminichatgenerator.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def get_current_weather(
9898
tool = create_tool_from_function(get_current_weather)
9999
```
100100

101-
Create a new instance of `GoogleAIGeminiChatGenerator` to set the tools and a [ToolInvoker](../tools/toolinvoker.mdx) to invoke the tools.
101+
Create a new instance of `GoogleAIGeminiChatGenerator` to set the tools and a `ToolInvoker` to invoke the tools.
102102

103103
```python
104104
import os

docs-website/docs/pipeline-components/generators/guides-to-generators/function-calling.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ At this point the model has only *requested* a call. Nothing has been executed y
7474

7575
### 3. Actually Invoke the Tool
7676

77-
To execute the requested tool calls, use the [`ToolInvoker`](../../tools/toolinvoker.mdx) component. It takes a list of [`ChatMessage`](../../../concepts/data-classes/chatmessage.mdx) objects containing tool calls, runs the corresponding tools, and returns new `ChatMessage` objects (with role `tool`) carrying the results as `ToolCallResult`s. To get a final natural-language answer, feed those results back to the ChatGenerator.
77+
To execute the requested tool calls, use the `ToolInvoker` component. It takes a list of [`ChatMessage`](../../../concepts/data-classes/chatmessage.mdx) objects containing tool calls, runs the corresponding tools, and returns new `ChatMessage` objects (with role `tool`) carrying the results as `ToolCallResult`s. To get a final natural-language answer, feed those results back to the ChatGenerator.
7878

7979
```python
8080
from haystack.components.tools import ToolInvoker

docs-website/docs/pipeline-components/generators/vertexaigeminichatgenerator.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def get_current_weather(
101101
tool = create_tool_from_function(get_current_weather)
102102
```
103103

104-
Create a new instance of `VertexAIGeminiChatGenerator` to set the tools and a [ToolInvoker](../tools/toolinvoker.mdx) to invoke the tools.:
104+
Create a new instance of `VertexAIGeminiChatGenerator` to set the tools and a `ToolInvoker` to invoke the tools.:
105105

106106
```python
107107
from haystack_integrations.components.generators.google_vertex import (

docs-website/docs/pipeline-components/tools/toolinvoker.mdx

Lines changed: 0 additions & 214 deletions
This file was deleted.

0 commit comments

Comments
 (0)