Skip to content

LiveSweLoop

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/libs/agent-core/src/runtime/live-swe-loop.ts

Implements: IAgentLoop

Methods

MethodSignatureReturns
run`run(config: AgentConfig, input: stringAgentInputItem[], options: RunOptions)`
runStreamed`runStreamed(config: AgentConfig, input: stringAgentInputItem[], options: RunOptions)`

Where it refuses work

  • LiveSweLoop stops the work with FormatError when !tool.
  • LiveSweLoop stops the work with an early return when eventQueue.length > 0.
  • LiveSweLoop stops the work with an early return when runComplete.
  • LiveSweLoop stops the work with an early return when toolCallItems.length === 0.
  • LiveSweLoop stops the work with an early return when m.role === 'tool'.
  • LiveSweLoop stops the work with an early return when m.role === 'assistant'.

When something fails

  • LiveSweLoop handles failure in 4 places: it lets it reach the caller in 3, and logs it and continues in 1.

Was this page helpful?

Download as PDF