Skip to content

Add support for adding function call items to conversation history via updateHistory #645

Description

@aiddun

Please read this first

  • Have you read the docs? Yes - Agents SDK docs
  • Have you searched for related issues? Yes

Describe the feature

Feature: Add support for manually creating and adding function call items to conversation history via updateHistory.

Current Limitation:

Currently, when using updateHistory() to modify the Realtime API conversation history, function call items are ignored with a warning (see code here):

} else if (addition.type === 'function_call') {
  logger.warn(
    'Function calls cannot be manually added or updated at the moment. Ignoring.',
  );
}

This means that while history_updated events include tool calls in the returned history array (RealtimeItem[] which includes RealtimeToolCallItem), there's no way to manually add or restore tool calls when managing conversation history.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions