PtcRunner.SubAgentError exception (PtcRunner v0.9.0)

Copy Markdown View Source

Exception raised by SubAgent.run!/2 and SubAgent.then!/2 when execution fails.

Contains the failed Step for inspection and debugging.

Fields

  • message: Human-readable error description
  • step: The Step struct containing failure details

Example

try do
  SubAgent.run!(agent, llm: llm)
rescue
  e in SubAgentError ->
    IO.inspect(e.step.fail.reason)
    IO.inspect(e.step.fail.message)
end