In-memory implementation of ExecutionAuditLog.

Stores execution records in memory for auditing and analytics. For production use, consider a database-backed implementation.

const auditLog = new InMemoryExecutionAuditLog();

await auditLog.logExecution(execution);

const history = await auditLog.getAgentHistory(agentId, 10);
const stats = await auditLog.getStatistics({ agentId });

Implements

  • ExecutionAuditLog

Constructors

Methods

  • Logs an agent execution

    Parameters

    • execution: AgentExecution

      The execution record to log

    Returns Promise<void>

  • Queries executions with optional filters

    Parameters

    • filter: ExecutionFilter

      Filter criteria

    Returns Promise<AgentExecution[]>

    Array of matching executions

  • Gets the execution history for a specific agent

    Parameters

    • agentId: AgentId

      The agent ID

    • limit: number = 100

      Maximum number of records to return

    Returns Promise<AgentExecution[]>

    Array of executions for the agent

  • Gets the detailed execution trace for a specific execution

    Parameters

    • executionId: string

      The execution ID

    Returns Promise<null | ExecutionTrace>

    The execution trace, or null if not found

  • Gets execution statistics

    Parameters

    • filter: ExecutionFilter

      Filter criteria

    Returns Promise<ExecutionStatistics>

    Aggregated statistics