org.llm4s.agent.orchestration
Members list
Type members
Classlikes
Exception thrown when an operation is cancelled
Exception thrown when an operation is cancelled
Attributes
- Supertypes
-
class RuntimeExceptionclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Token for cancelling long-running orchestration operations. Thread-safe and can be checked from any thread.
Token for cancelling long-running orchestration operations. Thread-safe and can be checked from any thread.
Attributes
- Note
-
For operations with many nodes, use
cachedCancellationFutureinstead ofcancellationFutureto avoid callback accumulation. - Example
-
val token = CancellationToken() val runner = PlanRunner() val result = runner.execute(plan, inputs, token) // Cancel from another thread token.cancel() - Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CancellationToken.type
A typed edge connecting two nodes in the DAG Ensures compile-time type safety: output type of source must match input type of target
A typed edge connecting two nodes in the DAG Ensures compile-time type safety: output type of source must match input type of target
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Thread-safe MDC context management for async operations. Preserves MDC context across thread boundaries. This file needs try-finally to ensure MDC context is restored.
Thread-safe MDC context management for async operations. Preserves MDC context across thread boundaries. This file needs try-finally to ensure MDC context is restored.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
MDCContext.type
A node in the execution graph representing an agent with typed input/output
A node in the execution graph representing an agent with typed input/output
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Orchestration-specific error types following LLM4S error patterns
Orchestration-specific error types following LLM4S error patterns
Attributes
- Companion
- object
- Supertypes
-
trait LLMErrortrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class AgentTimeoutErrorclass NodeExecutionErrorclass PlanExecutionErrorclass PlanValidationErrorclass TypeMismatchError
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
OrchestrationError.type
A complete execution plan represented as a DAG
A complete execution plan represented as a DAG
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Executes DAG plans with topological ordering and parallel execution.
Executes DAG plans with topological ordering and parallel execution.
Value parameters
- maxConcurrentNodes
-
Maximum number of nodes that can execute in parallel (default: 10). Used to prevent resource exhaustion in large DAGs. Follows LLM4S patterns:
- Uses AsyncResult[_] (Future[Result[_]]) for async operations
- Structured logging with MDC context
- Proper error types from OrchestrationError
- Result.safely for exception handling
- Standard Future combinators
Attributes
- Note
-
MDC context is preserved across async boundaries using MDCContext utility.
Supports cancellation via CancellationToken for long-running operations.
- Example
-
val runner = PlanRunner(maxConcurrentNodes = 5) val token = CancellationToken() val result = runner.execute(plan, Map("input" -> data), token) - Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
PlanRunner.type
Execution policies for agents (retry, timeout, fallback) following LLM4S patterns.
Execution policies for agents (retry, timeout, fallback) following LLM4S patterns.
Uses:
- AsyncResult[_] (Future[Result[_]]) for async operations
- Structured logging with MDC context
- ErrorRecovery patterns for intelligent retry
- Proper OrchestrationError types
- Result.safely for exception handling
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Policies.type
Typed agent abstraction for multi-agent orchestration.
Typed agent abstraction for multi-agent orchestration.
A TypedAgent represents a computation that takes input of type I and produces output of type O. Agents are composable and can be wired together in DAGs with compile-time type safety.
Follows LLM4S patterns:
- Uses AsyncResult[_] (Future[Result[_]]) for async operations
- Uses Result[_] for error handling
- Structured logging with context
- Proper error types from OrchestrationError
- Safe execution with Result.safely
Type parameters
- I
-
Input type
- O
-
Output type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TypedAgent.type