AutoBE
    Preparing search index...

    Interface AutoBeJsonParseErrorEvent

    Event fired when an AI agent's function call output fails JSON parsing.

    This event occurs when an AI agent returns structured data through function calling that cannot be successfully parsed as valid JSON. This typically indicates malformed JSON syntax such as missing quotes, trailing commas, unclosed brackets, or other syntax violations that prevent the parser from interpreting the response.

    JSON parse errors are distinguished from validation errors - this event represents syntactic failures (invalid JSON structure) rather than semantic failures (valid JSON with incorrect schema). When this error occurs, the agent's response cannot be processed at all, requiring regeneration of the entire response with proper JSON formatting.

    The event captures comprehensive diagnostic information including the source agent, function name, raw arguments that failed to parse, and the specific error message from the JSON parser, enabling effective debugging and self-healing through the correction loop mechanism.

    Samchon

    interface AutoBeJsonParseErrorEvent {
        arguments: string;
        created_at: string & Format<"date-time">;
        errorMessage: string;
        function: string;
        id: string;
        life: number;
        source: AutoBeEventSource;
        type: "jsonParseError";
    }

    Hierarchy

    • AutoBeEventBase<"jsonParseError">
      • AutoBeJsonParseErrorEvent
    Index

    Properties

    arguments: string

    Raw string arguments that failed to parse as JSON.

    Contains the exact string output from the AI agent that could not be successfully parsed as JSON. This raw data is essential for understanding what went wrong and for providing context to the correction agent that will regenerate a properly formatted response.

    created_at: string & Format<"date-time">

    Timestamp when the event was created.

    ISO 8601 formatted date-time string indicating when this event was emitted by the system. This timestamp is crucial for event ordering, performance analysis, and debugging the agent workflow execution timeline.

    Format: "YYYY-MM-DDTHH:mm:ss.sssZ" (e.g., "2024-01-15T14:30:45.123Z")

    errorMessage: string

    Error message from the JSON parser describing why parsing failed.

    Contains the specific error message generated by the JSON parser, typically indicating the location and nature of the syntax error (e.g., "Unexpected token at position 42", "Expected ',' or '}' after property"). This diagnostic information helps identify the exact parsing issue and guides the correction process.

    function: string

    Name of the function call that produced unparsable JSON output.

    Specifies which function the AI agent was attempting to call when it generated the malformed JSON response. This information is crucial for diagnosing systematic issues with specific function calls and refining the corresponding tool definitions or system prompts.

    id: string

    A unique identifier for the event.

    life: number

    Retry attempt number for this function call.

    Tracks how many times this specific function call has been attempted and failed JSON parsing. This counter enables intelligent retry logic, escalation strategies, and prevents infinite retry loops by allowing the system to give up after a reasonable number of attempts.

    Source agent or operation where the JSON parse error occurred.

    Identifies which AutoBE agent or operation produced the malformed JSON response. This helps track which part of the pipeline is experiencing issues and enables targeted improvements to specific agent prompts or function definitions.

    type: "jsonParseError"

    Unique identifier for the event type.

    A literal string that discriminates between different event types in the AutoBE system. This field enables TypeScript's discriminated union feature, allowing type-safe event handling through switch statements or conditional checks.

    Examples: "analyzeWrite", "databaseSchema", "interfaceOperation", "testScenario"