Implementation Guide | Financial Services

    Implementing CrewAI Audit Logging for FINRA Recordkeeping

    Capture agent, task and tool-call events as structured, time-stamped records attributed to a non-human agent identity. Write them to a store separate from the agent runtime, and map each record type to the 17a-4(f) audit trail and immediate-production expectations with counsel. Application logs show what an agent did. Enforcing policy in the execution path adds evidence of what the agent was permitted to do.

    1. {"title":"1. Run start","description":"Record the run ID, initiating identity, inputs, crew definition and configuration version."}
    2. {"title":"2. Agent step","description":"Record the agent identity, model, prompt or a reference to it, and the step that led to the next action."}
    3. {"title":"3. Task start and end","description":"Record the task ID, assigned agent, inputs received, output produced and any handoff to another agent."}
    4. {"title":"4. Tool-call request","description":"Write the tool name and arguments before execution, with the calling agent and task."}
    5. {"title":"5. Tool-call result","description":"Record the response, errors, duration and data touched, linked to the request by event ID."}
    6. {"title":"6. Human approval","description":"Record the approval as its own event, linked to the exact action it authorizes, with approver identity and time."}
    7. Append-only, independent of the agent runtime
    8. Hash chaining with external checkpoints
    9. Retention by record type, set with counsel
    10. Role-separated access with access logging
    11. Indexed retrieval and hash-preserving export

    Examiner-readiness checklist

    • Event types and logging level are documented, with a written rationale for why they support after-the-fact investigation.
    • Every record carries a non-human agent identity, run ID, task ID, tool name and time stamp.
    • Human approvals are separate events linked to the specific action they authorize.
    • The audit store is independent of the agent runtime, append-only and protected by hashing and role-separated access.
    • Retention periods and storage format have been confirmed with counsel against Rules 4511 and 17a-4.
    • A simulated examiner request for a sample multi-agent run returns a complete record promptly, and the result is documented.

    What the recordkeeping rules ask of a multi-agent system

    FINRA Rule 4511 requires member firms to make and preserve the books and records required under FINRA rules, the Exchange Act and the Exchange Act rules. It also requires FINRA-required records to be preserved in a format and media that complies with SEC Rule 17a-4. As of November 2026, 17a-4(f) allows records to be kept in an electronic recordkeeping system that preserves each record for its retention period with a complete time-stamped audit trail. The firm must also have facilities to produce those records, and copies, immediately for examination by the SEC, self-regulatory organizations and state securities regulators. The SEC amended these electronic recordkeeping provisions in October 2022, effective January 2023, with a compliance date of May 2023.

    FINRA states that its rules are technology neutral and apply to GenAI, including third-party technology and embedded features in existing products. It names supervision, communications, recordkeeping and fair dealing as areas GenAI can implicate. Its 2026 oversight material identifies multi-step agent reasoning as a traceability and auditability challenge, which is exactly the property a multi-agent workflow has.

    Which agent-generated artifacts count as required records is a legal interpretation to validate with counsel. The engineering target is narrower and safer: records that are complete, time-stamped, attributable, hard to alter and quick to retrieve. A practical mapping, also to be validated with counsel, looks like this. Rule 4511's format and media expectation maps to the storage design. The 17a-4(f) audit trail maps to time-stamped, per-event records with a change history. Immediate production maps to indexed retrieval by run identifier. Rule 3110 supervision maps to review workflows that read from the same records.

    Define the audit record schema first

    Start with the schema, not the hooks. NIST SP 800-53 (AU-2 and AU-12) has organizations define the event types they log and document why those types are adequate to support after-the-fact investigation. It also notes that audit records can be generated at different levels of abstraction. Choosing the level is a design decision, so write the rationale down and review it as the crew design changes.

    A workable record for CrewAI activity carries the fields below. Keep one envelope for every event type so that a single query can reconstruct a run.

    • Identity: A non-human agent identity, plus agent role, crew name and the service account running the process. NIST guidance supports linking actions to the identity of the non-human entity.
    • Execution context: Run ID, task ID, parent event ID, crew and configuration version, model identifier and the user or process that started the run.
    • Action: Event type, tool name, tool version and the arguments as submitted, or a reference to them in protected storage.
    • Data touched: Input and output payloads or content hashes, data classification and the systems or datasets accessed.
    • Decision and approval: Whether the action was allowed, modified or refused, the approver identity, the approval time and the specific action approved.
    • Integrity and time: Event time stamp, ingestion time stamp, sequence number, previous-record hash and the record's own hash.

    The limit of application-level logs and what runtime enforcement adds

    Application-level logs record what the code reported after the fact. They can show that an agent called a tool with certain arguments. They cannot show that a rule existed at that moment, that it was applied, or what would have happened had the call fallen outside it. Under model risk management review, that is a gap: FINRA expects a supervision, governance or model risk management framework with policies and procedures to develop, implement, use and monitor GenAI, and an examiner reading a log has no direct evidence of the policy in force.

    Enforcing policy in the execution path changes the evidence. Each tool call is evaluated before it runs and receives a decision: allow, redact, block or escalate for human approval. The decision, the policy applied and the outcome become part of the record, so the evidence reflects both what the agent was permitted to do and what it did. Published guidance does not state that examiners require runtime enforcement. This is an engineering position, and its value is the quality of evidence available under scrutiny.

    Trussed enforces policy in the execution path at the level of individual interactions and tool calls, and generates continuous audit-ready evidence from that enforcement. It deploys self-managed in the customer cloud, with configurable retention and data residency. Trussed is deepest in insurance, a regulated financial sector, and its production record covers 18+ months of continuous operation in a regulated enterprise. Its scope is individual interactions and tool calls, so correlating them into a workflow-level narrative still depends on the run, task and event identifiers in your own schema.

    From CrewAI event to examiner record

    Capture

    Run, agent, task, tool-call and approval events emitted through one audit client.

    Structure

    A fixed schema with agent identity, inputs, outputs and time stamps.

    Preserve

    Append-only storage separate from the agent runtime, with hashing and access controls.

    Produce

    Indexed retrieval of a complete run for an examiner on request.

    See how enforcement changes the evidence

    Review how policy enforcement on agent and tool calls produces audit-ready evidence of what an agent was allowed to do and what it did.

    Explore Agent and Tool-Call Enforcement
    Next step

    How does your AI governance program compare?

    See where your program has gaps in less than 2 minutes.