Skip to content

Add application-level extension field and PrepareCall hook to AgentCall / AgentStreamCall #224

@fwang2002

Description

@fwang2002

Currently AgentCall and AgentStreamCall only carry a fixed set of fields (sampling params, messages, tools, callbacks, etc.). There is no first-class way for application-layer code to:

  1. Attach arbitrary, application-specific data to a call.
  2. Run a one-shot preparation hook before the first model invocation, analogous to the internal agent.prepareCall.

Typical use cases for the hook: translating an application-defined context object into SystemPrompt / ProviderOptions / Messages, injecting tenant-scoped headers, resolving feature flags, hydrating RAG context, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions