Interface for auditing and logging agent executions.

Provides a complete audit trail of all agent activities for compliance, debugging, and analytics purposes.

class DatabaseAuditLog implements ExecutionAuditLog {
async logExecution(execution: AgentExecution): Promise<void> {
await this.db.executions.insert({
...execution,
trace: JSON.stringify(execution.trace.toJSON())
});
}

async queryExecutions(filter: ExecutionFilter): Promise<AgentExecution[]> {
return await this.db.executions.find(filter);
}
}
interface ExecutionAuditLog {
    logExecution(execution: AgentExecution): Promise<void>;
    queryExecutions(filter: ExecutionFilter): Promise<AgentExecution[]>;
    getAgentHistory(
        agentId: AgentId,
        limit?: number,
    ): Promise<AgentExecution[]>;
    getExecutionTrace(executionId: string): Promise<null | ExecutionTrace>;
    getStatistics(filter: ExecutionFilter): Promise<ExecutionStatistics>;
}

Methods