Package-level declarations
Types
The base class for units of work in a workflow graph. A Workflow is itself a node, so graphs nest, and every agent is one too.
Thrown by com.google.adk.kt.agents.Context.runNode when the dispatched child fails: error is the child's failure and errorNodePath the path of the node that failed.
A chain of edges for Java callers, positioned at a node. EdgesBuilder.from starts a chain, and each call adds the same edges as the edges DSL function of the same name and continues from its target.
A block that declares edges or routes on a T builder. In Kotlin, pass a lambda with the builder as its receiver. In Java, pass a lambda that takes the builder as an argument, with no Unit to return.
A workflow Node backed by a suspending function that returns an O and may emit Events. An input that does not decode as I throws NodeInputValidationException; an output that is not an O or a Content, has no JSON form, or fails an explicit schema throws IllegalArgumentException.
A workflow graph failed validation. Raised when the graph is built, not when it runs.
The body of a FunctionNode set through FunctionNode.Builder.body; it runs on the workflow's coroutine, so it must not block, and asynchronous work belongs in a BasePublisherNode. input arrives as the node's input type, in JSON form on an untyped port (a whole number as a Long, a fraction as a Double, an object as a Map), or as a Content message, and may be a predecessor's own collection, so the body must not mutate it. Return null for no output, a value of the output type, or an Event to emit as it is (an Event with content sends a message, and an output goes in the return value, not in the Event), and ask the user with requestInput.
A node failure that reports under a typeName other than this class's own, so a failure raised in one ADK implementation is matched by the same name in another.
Nodes grouped by nodes(...) or a fan-out then, which EdgesBuilder.joinTo connects to a JoinNode.
A chain of edges for Java callers, positioned at a NodeGroup from a fan-out or EdgesBuilder.from.
Raised when a node's runtime input fails validation. Reports typeName = "NodeInputValidationError".
A node exceeded its configured timeout. An ordinary exception, so a timed-out node is still eligible for retry.
An edge started by EdgesBuilder.on, which has a source and its routes but no target yet. EdgesBuilder.then completes it.
A chain of edges for Java callers, positioned at a routed edge started by EdgeChain.on; then completes it.
A node's request for user input, which pauses the workflow until a matching response arrives.
How a node is retried when it raises.
A value on a workflow edge, and the value a node emits to select which of its outgoing edges are followed. An edge fires when the value it carries matches one the node emitted.
The receiver of an EdgesBuilder.route block, which maps each route the source node may emit to a target node, written on("billing") then billing or "billing" then billing. Mapping one route to several nodes fans out on that route.
A routing-map entry started by RouteMapBuilder.on whose routes have no target yet. then completes it.
Routes that select a single edge, which fires once when its source emits any of them. Separate edges to the same target would fire once each. Build one with anyOf(...) in the workflow DSL.
Marks where a graph starts. Never runs: the scheduler seeds its successors directly.
A graph of nodes, and a Node itself, so graphs nest: a workflow drops into another workflow wherever an ordinary node goes.
Thrown when a workflow or node configuration is invalid.
Functions
Returns a workflow node that runs this tool as a fixed step: the predecessor's output becomes the tool's arguments, and the tool's result becomes the node's output.
Returns the edges declared by graphDefinition for a Workflow; workflow builds both in one step.
Creates a FunctionNode that runs block, which uses context.state, context.updateState and requestInput. An edge into it builds only if the predecessor's output schema fits its input schema; inferred output schemas require every field, inferred input schemas only fields without defaults.
Creates a FunctionNode as the other node overload does, asking the user to approve a run only when requireConfirmation returns true for its decoded input.
Wraps node so it runs concurrently on each item of a list input and returns the results in input order. node's configuration and schemas apply to each item's run; the fan-out node declares no input or output schema.
Returns a node that runs node once per item of a list input concurrently and outputs the items' outputs as a list in input order. A text-only Content input, unless node is a function node taking Content, is read as JSON so a JSON list fans out; text that is not JSON arrives as a string. Any other non-list input runs as a single item.
Creates a FunctionNode that runs block concurrently on each item of a list input and returns the results as a List of O in input order. A text-only Content input, unless I is Content, is read as JSON so a JSON list fans out. Any other non-list input runs as one item.
Creates a fan-out FunctionNode as the other block-form parallelNode does, asking to approve an item's run only when requireConfirmation returns true for it. The predicate runs on each item's run with no answer yet; once the item has asked, the answer decides. A rejected item outputs as in node.
From a node's body, asks the user for input once per run and ends it. With rerunOnResume = true the body reruns and reads the answer from ctx.resumeInputs[interruptId]; ctx.resumeInputs[id] ?: requestInput(id) asks again on a null answer responseSchema allows. Otherwise the answer, checked against any responseSchema, is the node's output.
Builds a Workflow from the edges graphDefinition declares.