Skip to content

Feat: adding get_previous_context tool

What does this MR do and why?

This change adds a new GetWorkflowContext tool that allows agents to retrieve context from previously run workflows. The tool fetches checkpoint data from a workflow by its ID and extracts key information like the workflow's goal, plan, and summary. This enables continuity between workflows by allowing agents to understand what happened in previous runs. The tool has been added to the read-only GitLab tools list and made available to both context builder and planner agents. Comprehensive tests were added to verify the tool's functionality in various scenarios, including successful retrievals and error handling cases.

Related issues

#365 (closed) #366 (closed)

Screenshots or screen recordings

Screenshot_2025-04-23_at_12.05.49

How to set up and validate locally

  • turn on the feature Feature.enable(:duo_workflow_previous_workflow_tool)
  • check out this branch
  • use a prompt that refers to a previous workflow
  • check that it calls the get context tool Get context for workflow 365
Edited by Jeff Park

Merge request reports

Loading