pub struct RunnerConfig {
pub app_name: String,
pub agent: Arc<dyn Agent>,
pub session_service: Arc<dyn SessionService>,
pub artifact_service: Option<Arc<dyn ArtifactService>>,
pub memory_service: Option<Arc<dyn Memory>>,
pub plugin_manager: Option<Arc<PluginManager>>,
pub run_config: Option<RunConfig>,
pub compaction_config: Option<EventsCompactionConfig>,
pub context_cache_config: Option<ContextCacheConfig>,
pub cache_capable: Option<Arc<dyn CacheCapable>>,
pub request_context: Option<RequestContext>,
pub cancellation_token: Option<CancellationToken>,
}Fields§
§app_name: String§agent: Arc<dyn Agent>§session_service: Arc<dyn SessionService>§artifact_service: Option<Arc<dyn ArtifactService>>§memory_service: Option<Arc<dyn Memory>>§plugin_manager: Option<Arc<PluginManager>>§run_config: Option<RunConfig>Optional run configuration (streaming mode, etc.) If not provided, uses default (SSE streaming)
compaction_config: Option<EventsCompactionConfig>Optional context compaction configuration. When set, the runner will periodically summarize older events to reduce context size sent to the LLM.
context_cache_config: Option<ContextCacheConfig>Optional context cache configuration for automatic prompt caching lifecycle.
When set alongside cache_capable, the runner will automatically create and
manage cached content resources for supported providers.
cache_capable: Option<Arc<dyn CacheCapable>>Optional cache-capable model reference for automatic cache management. Set this to the same model used by the agent if it supports caching.
request_context: Option<RequestContext>Optional request context from the server’s auth middleware bridge.
When set, the runner passes it to InvocationContext so that
user_scopes() and user_id() reflect the authenticated identity.
cancellation_token: Option<CancellationToken>Optional cooperative cancellation token for externally managed runs.