App

data class App(val appName: String, val rootAgent: BaseAgent, val plugins: List<Plugin> = emptyList(), val resumabilityConfig: ResumabilityConfig? = null, val eventsCompactionConfig: EventsCompactionConfig? = null, val contextCacheConfig: ContextCacheConfig? = null, val rootNode: Node? = null)

Represents an LLM-backed agentic application.

An App is the top-level container for an agentic system powered by LLMs. It bundles an application name together with the rootAgent that serves as the root of the agent tree, enabling coordination and communication across all agents in the hierarchy. It also carries application-wide configuration, such as plugins and resumabilityConfig, that the runner applies to every session it runs.

appName must start with a letter and may contain only letters, digits, underscores, and hyphens, and must not be the reserved value "user", which is reserved for end-user input. Construction throws IllegalArgumentException if appName does not meet these requirements.

Constructors

Link copied to clipboard
constructor(appName: String, rootAgent: BaseAgent, plugins: List<Plugin> = emptyList(), resumabilityConfig: ResumabilityConfig? = null, eventsCompactionConfig: EventsCompactionConfig? = null, contextCacheConfig: ContextCacheConfig? = null, rootNode: Node? = null)
constructor(appName: String, rootAgent: BaseAgent, plugins: List<Plugin> = emptyList(), resumabilityConfig: ResumabilityConfig? = null, eventsCompactionConfig: EventsCompactionConfig? = null, contextCacheConfig: ContextCacheConfig? = null)

The 1.1.0 constructor, which had no rootNode. Stays visible because javac skips hidden constructors, so Java code written against 1.1.0 would otherwise bind to the node-rooted one.

constructor(appName: String, rootNode: Node, plugins: List<Plugin> = emptyList(), resumabilityConfig: ResumabilityConfig? = null, eventsCompactionConfig: EventsCompactionConfig? = null, contextCacheConfig: ContextCacheConfig? = null)

Creates an app rooted on a node graph rather than an agent tree. Wraps rootNode in a NodeViewAgent so the future-deprecated rootAgent stays non-null during the deprecation window.

Types

Link copied to clipboard
class Builder

Fluent builder for App, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The application name.

Link copied to clipboard

Optional context cache configuration that applies to all LLM agents in the app. When null, context caching is disabled.

Link copied to clipboard

Optional configuration controlling context-compaction strategies for sessions of this application. When null, no compaction runs.

Link copied to clipboard

Application-wide Plugins providing shared callbacks and services to the entire system. Defaults to an empty list.

Link copied to clipboard

Optional resumability configuration applied to the application's sessions. When null, resumability is disabled.

Link copied to clipboard

The root agent of the application's agent tree.

Link copied to clipboard

The application's entry point, set for a graph app. The go-forward field; once rootAgent is removed it holds the running unit for every app.

Functions

Link copied to clipboard

Returns a Builder initialized with this instance's properties, primarily for Java callers. Prefer it over copy from Java: copy takes every property positionally, so its signature changes whenever a property is added.