Skip to content

Add example: Handling large tool call results #244

@awsarron

Description

@awsarron

Summary

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

Related: strands-agents/docs#726

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions