Skip to content

feat(ai): experimental callbacks in ToolLoopAgent#12717

Merged
aayush-kapoor merged 14 commits intomainfrom
aayush/callbacks-agent
Feb 20, 2026
Merged

feat(ai): experimental callbacks in ToolLoopAgent#12717
aayush-kapoor merged 14 commits intomainfrom
aayush/callbacks-agent

Conversation

@aayush-kapoor
Copy link
Copy Markdown
Collaborator

@aayush-kapoor aayush-kapoor commented Feb 20, 2026

Background

as a follow up to #12654, we will introduce the same callbacks for the ToolLoopAgent

Summary

  • added callback experimental_onStart that exposes the data/events that happen at the very beginning
  • added callback experimental_onStepStart
  • added callback experimental_onToolCallStart
  • added callback experimental_onToolCallFinish

Manual Verification

Future Work

Checklist

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

@tigent tigent bot added ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. feature New feature or request labels Feb 20, 2026
Copy link
Copy Markdown
Collaborator

@lgrammel lgrammel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the tests use a lot of the expect behavior that is standard use by agents. ideally we would use inline snapshots or real snapshot. it would be great if we could update agents.md or skills accordingly to enforce this. cc @dancer

@aayush-kapoor aayush-kapoor merged commit ebfdad1 into main Feb 20, 2026
18 checks passed
@aayush-kapoor aayush-kapoor deleted the aayush/callbacks-agent branch February 20, 2026 21:44
aayush-kapoor added a commit that referenced this pull request Mar 23, 2026
## Background

the changes from #12717 were applied
directly in v6 when main was pointing towards v6

## Summary

cherry pick and revert all the changes

## Manual Verification

na

## Checklist

- [x] Tests have been added / updated (for bug fixes / features)
- [x] Documentation has been added / updated (for bug fixes / features)
- [x] A _patch_ changeset for relevant packages has been added (for bug
fixes / features - run `pnpm changeset` in the project root)
- [x] I have reviewed this pull request (self-review)
@aayush-kapoor aayush-kapoor linked an issue Apr 9, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add experimental callbacks to all core functions

2 participants