Skip to content

Add example: Handling large tool call results #244

Description

@arronbailiss

Summary

Add a working sample demonstrating how to handle large (multi-megabyte) tool outputs without polluting agent context.

Related: strands-agents/harness-sdk#2597

Suggested location

02-samples/large-tool-output-handling/

What to include

  • File reference pattern: tool writes to /tmp, returns path string
  • AfterToolCallEvent hook to truncate large results
  • Wrapper tool example (pipeline chaining)
  • README with pattern tradeoffs and when to use each

Motivation

A common real-world challenge for agents dealing with APIs or databases returning large payloads.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Language

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions