AutoBE
    Preparing search index...

    Interface AutoBeDatabaseComponentEvent

    Event fired when the Database agent completes table design for a single database component during the database design process.

    This event occurs when the Database agent has taken a component skeleton (namespace and filename already determined by the DATABASE_GROUP phase) and filled in all the table designs for that specific component. Each event represents the completion of ONE component's table design.

    Multiple events of this type are emitted in sequence as the Database agent processes each component skeleton from the group, enabling real-time progress tracking for component-by-component table generation.

    Samchon

    interface AutoBeDatabaseComponentEvent {
        analysis: string;
        completed: number;
        component: AutoBeDatabaseComponent;
        created_at: string & Format<"date-time">;
        id: string;
        metric: AutoBeFunctionCallingMetric;
        rationale: string;
        step: number;
        tokenUsage: IComponent;
        total: number;
        type: "databaseComponent";
    }

    Hierarchy (View Summary)

    Index

    Properties

    analysis: string

    Analysis of the component's scope and table requirements.

    Documents the agent's understanding of this component's domain, including what the component's business purpose is, what entities from the requirements belong to this component, what relationships exist between these entities, and what normalization patterns were identified.

    completed: number

    Number of items completed.

    Tracks how many items have been successfully processed so far in the current operation. This value increments as each item is completed, providing real-time progress indication.

    The ratio of completed to total gives the completion percentage: progress = (completed / total) * 100

    The completed database component with its table designs.

    Contains the single database component that was completed in this event. The component skeleton (namespace, filename, thinking, review, rationale) was provided by the DATABASE_GROUP phase, and this event represents the completion of filling in the tables array for that component.

    The component includes:

    • namespace: Business domain namespace (from skeleton)
    • filename: Prisma schema filename (from skeleton)
    • thinking: Initial reasoning about component purpose (from skeleton)
    • review: Review of component scope (from skeleton)
    • rationale: Final justification for component (from skeleton)
    • tables: Array of complete table designs (FILLED IN by this agent)

    Each table in the tables array includes:

    • name: snake_case plural table name
    • description: Purpose and contents of the table
    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")

    id: string

    A unique identifier for the event.

    Function calling trial statistics for the operation.

    Records the complete trial history of function calling attempts, tracking total executions, successful completions, consent requests, validation failures, and invalid JSON responses. These metrics reveal the reliability and quality of AI agent autonomous operation with tool usage.

    Trial statistics are critical for identifying operations where agents struggle with tool interfaces, generate invalid outputs, or require multiple correction attempts through self-healing spiral loops. High failure rates indicate opportunities for system prompt optimization or tool interface improvements.

    rationale: string

    Rationale for the table design decisions.

    Explains why tables were designed this way, including why each table was created, why certain entities were kept separate vs combined, what normalization principles were applied, and how the tables fulfill the component's rationale.

    step: number

    Iteration number of the requirements analysis this component organization was performed for.

    Indicates which version of the requirements analysis this table organization reflects. This step number ensures that the database component structure is aligned with the current requirements and helps track the evolution of database architecture as business requirements change.

    The step value enables proper synchronization between database organization and the underlying requirements, ensuring that the schema structure remains relevant to the current project scope and business objectives.

    tokenUsage: IComponent

    Detailed token usage metrics for the operation.

    Contains comprehensive token consumption data including total usage, input token breakdown with cache hit rates, and output token categorization by generation type (reasoning, predictions). This component-level tracking enables precise cost analysis and identification of operations that benefit most from prompt caching or require optimization.

    Token usage directly translates to operational costs, making this metric essential for understanding the financial implications of different operation types and guiding resource allocation decisions.

    total: number

    Total number of items to process.

    Represents the complete count of operations, files, endpoints, or other entities that need to be processed in the current workflow step. This value is typically determined at the beginning of an operation and remains constant throughout the process.

    Used together with the completed field to calculate progress percentage and estimate time to completion.

    type: "databaseComponent"

    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"