Skip to content

Implement Background Tool Tracking #112

Closed
@bhouston

Description

@bhouston

Implement Background Tool Tracking

Problem Statement

Currently, there's no easy way for an agent to see which background tools (shells, browsers, and soon agents) are running. This makes it difficult for agents to manage and coordinate background processes effectively.

Proposed Solution

Implement a system for tracking and reporting on background tools that are currently running. This could be implemented in one of two ways:

  1. New Tool Approach: Create a listBackgroundTools tool that returns information about all currently running background processes
  2. Automatic Context Approach: Automatically include information about running background tools with each user message

Benefits

  • Agents can be aware of all running background processes
  • Better coordination and management of parallel tasks
  • Reduced risk of starting duplicate processes
  • Improved ability to clean up resources

Requirements

Option 1: listBackgroundTools Tool

  • Return information about all running background processes
  • Include process IDs, start times, and current status
  • Group by type (shell, browser, agent)
  • Include relevant metadata for each process type

Option 2: Automatic Context

  • Append information about running background tools to each user message
  • Include similar information as the tool approach
  • Make this configurable (on/off)
  • Ensure the information is formatted in a way that's helpful but not overwhelming

Common Requirements

  • Track shells started with shellStart
  • Track browsers started with browseStart
  • Track agents started with agentStart (once implemented)
  • Include process status and runtime information
  • Provide a way to identify abandoned processes

Technical Considerations

  • Need a central registry for background processes
  • Should handle cleanup of completed or terminated processes
  • Must be thread-safe for parallel operation
  • Should provide enough context for agents to make decisions

Acceptance Criteria

  • Background tool tracking implemented (either as a tool or automatic context)
  • All relevant background tools are tracked (shells, browsers, agents)
  • Documentation updated to explain the feature
  • Tests added to verify functionality
  • Example usage provided in documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions