Kind: Class
Source: atloria-monorepo/libs/agent-core/src/runtime/agent-runtime.ts
AgentRuntime — the SDK-based agent loop implementation. Wraps
Implements: IAgentLoop
Methods
| Method | Signature | Returns |
|---|---|---|
run | run(config: AgentConfig<TContext>, input: string, options: RunOptions<TContext>) | Promise<RunResult> |
runStreamed | `runStreamed(config: AgentConfig | AgentInputItem[], options: RunOptions |
Where it refuses work
AgentRuntimestops the work with an early return whenmaxOutputRecoveries > 0 && this.wasOutputTruncated(sdkResult).AgentRuntimestops the work with an early return whenfo === undefined || fo === null.AgentRuntimestops the work with an early return when!sdkResult.rawResponses.AgentRuntimestops the work with an early return when!lastResponse.AgentRuntimestops the work with an early return whenfinishReason === 'length'.AgentRuntimestops the work with an early return whenitem?.status === 'incomplete'.
When something fails
AgentRuntimehandles failure in 5 places: it logs it and continues in 2, discards it silently in 2, and lets it reach the caller in 1. A failure discarded silently leaves no trace for whoever debugs this later.
Was this page helpful?