Expand description
Context / memory providers.
Rust equivalent of agent_framework._memory. A ContextProvider injects
extra instructions, messages, and tools into an agent invocation without
persisting them to the conversation history.
Upstream renamed ContextProvider.invoking/invoked to before_run/
after_run and removed the thread_created hook entirely; before_run
mutates a SessionContext in place instead of returning a value. There
is no aggregate wrapper any more — consumers hold a
Vec<Arc<dyn ContextProvider>> and iterate it directly.
Structs§
- Agent
Info - The identity of the agent a
SessionContextbelongs to. - Session
Context - Per-invocation context a provider contributes to a run. Providers mutate this in place in before_run. Rust equivalent of upstream SessionContext.
Constants§
- ATTRIBUTION_
KEY - The
Message::additional_propertieskey carrying a context message’s source attribution:{"source_id", "source_type"?, "origin_session_ids"?}(upstream_attribution). The run’s own input carries none.
Traits§
- Context
Provider - A source of per-invocation context (memory, RAG, etc.). Upstream renamed invoking/invoked -> before_run/after_run and REMOVED thread_created. before_run mutates the SessionContext in place instead of returning a Context.
Functions§
- attribute_
message - Tag
messageas contributed bysource_id, merging with any attribution it already carries (an existingsource_id/source_typeis kept; origin session ids accumulate without duplicates). - message_
source_ id - The source a context message was attributed to, if any.
- message_
source_ type - The type of the source a message was attributed to, if any (upstream
GetAgentRequestMessageSourceType). - with_
message_ source - Tag
messagewith a source (upstreamWithAgentRequestMessageSource), returning it.