Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Agent] Add effect classification to tools (read/write/external) #2521

Description

@wachterjohannes

Tools carry no signal about what kind of side effect they have. AsTool already exposes an arbitrary $metadata array, but nothing standardizes an "effect" key or reads it anywhere in the framework, so every consumer who wants to gate tool calls (human approval, audit logging, execution safety) reinvents this classification from scratch.

Proposal: a standard effect key (read, write, external) on AsTool/Tool, defaulting to external when unset (fail cautious for unclassified tools). No enforcement built in, just a documented, first-class place to declare it, so a ToolCallRequested listener or a custom ToolExecutorInterface can consult Tool::getMetadata()['effect'] instead of maintaining a side table.

Context: came up building a durable/interruptible agent on top of Temporal (see https://github.com/gplanchat/durable-dev/blob/spike/agent-durable-symfony-ai/documentation/user/use-cases/durable-agent.md), where this classification decides which tool calls suspend the workflow for human approval and which pass through.

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

    AgentIssues & PRs about the AI Agent componentRFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions