Class AgentFailedException

All Implemented Interfaces:
Serializable

public class AgentFailedException extends RuntimeException
Exception thrown when an agent execution fails. This exception is thrown when an agent encounters an error during execution and cannot complete its task. It wraps the underlying cause of the failure. Example:

 try {
   String result = client.invoke("Hello world");
 } catch (AgentFailedException e) {
   System.err.println("Agent failed: " + e.getMessage());
   e.getCause().printStackTrace();
 }
 
See Also:
  • Constructor Details

    • AgentFailedException

      public AgentFailedException(String message)
      Creates a new AgentFailedException with the specified message.
      Parameters:
      message - the detail message
    • AgentFailedException

      public AgentFailedException(String message, Throwable cause)
      Creates a new AgentFailedException with the specified message and cause.
      Parameters:
      message - the detail message
      cause - the cause of the failure