Audit Trail & AI Transparency

Every AI Agent invocation is recorded automatically. This chapter describes the technical transparency features the connector ships — what is recorded, where, and how to tune or redact it.

The per-activity chat-log variables

For each activity that runs the connector, an AI Agent service task or an ad hoc sub-process driven by an agent, the connector writes process-scoped variables named:

cibseven-connect-ai-agent_<activityId>~<eventSeq>

There is one variable per model call, written once, when the model has answered (the response event); the request event and any retrieval before it belong to the same variable. <eventSeq> is the number of its first event, padded with zeros to ten digits, for example cibseven-connect-ai-agent_reviewInvoice~0000000004. Each variable holds a JSON array of audit events; read in the order of their names, the variables of an activity are its timeline. A task with tools calls the model several times in one run, once more after each round of tool results; the number counts events, not calls, so gaps between the numbers are normal. Key behaviors:

  • One timeline per activity: when the activity runs again within the same process instance, the numbering continues.
  • Written once: a variable is never rewritten, so what is stored, also in the history at level full, grows with the events.
  • Many variables: an activity has about as many chat-log variables as it made model calls, and all of them are loaded wherever all variables of a process instance are (a variables tab, GET /process-instance/{id}/variables).
  • An activity id longer than 218 characters (fewer with characters outside ASCII) leaves no room for the number in a variable name: such an activity gets no chat log, and the connector logs a warning.
  • It is not an output parameter: the chat log is too large for an ordinary string variable, so the connector keeps it in variables of its own.
  • A companion flag variable cibseven-connect-ai-agent marks that the agent connector ran.
  • Failed calls are not kept. A model call that fails makes the task, or the agent’s step, fail, and its entry is undone together with the rest of the task’s work, so error events rarely appear in the log. A failed call shows in the incident, in the job log (history level full) and as an LLM ERROR line in the application log. Requests that the HTTP client repeats by itself do not show either: the log shows one call even if it was sent twice.
  • Retention. While the process instance runs, the chat log is process variables. After it ends, it exists only in the history, at history level audit or full, and history cleanup removes it after the historyTimeToLive of the process definition. At level activity or none nothing of it is left after the end. To keep the record for six months after the end, use history level audit or full and set the process’s history time to live (History cleanup → Time to live in the Modeler) to at least P180D.

Reading the chat log

Earlier versions kept the chat log of an activity in one variable, cibseven-connect-ai-agent_<activityId>, rewritten on every event. A process instance that runs across the upgrade keeps that variable and continues in numbered variables after it. A reader, such as an audit export or a viewer, puts the chat log of an activity together from all variables whose names start with cibseven-connect-ai-agent_: the activity id is the part before the last ~, the variable without a number comes first, then the numbered ones in the order of their names. A reader that does not know the numbers shows every model call as an activity of its own, so update such readers together with the connector.

What’s recorded

Each event is a structured record (schema version 1). Fields seen on events include:

  • Identity / sequence: schemaVersion, type (request/response/error), runId, eventSeq, timestamp.
  • Model: provider, model, endpoint.
  • Process correlation: processInstanceId, processDefinitionId, processDefinitionKey, executionId, activityId (and businessKey / tenantId when present).
  • Caller identity: userId, userIdSource, groupIds.
  • Content: messages[] (role + content) on requests, and the model’s answer on responses.
  • Tools: tools[] (available tool names), toolProvenance{} (per tool: kind local/mcp, and for MCP the server, url, originalToolName), and toolCalls[] (the calls the model made, with id, name, arguments) on responses.
  • Outcome: durationMs; on errors, the error class and a short stack (up to 5 frames). Such events are rare: a failed call is usually undone together with the task’s work (see above).
  • Tool side-effects: when ProcessStarterTool starts a process, a record with the resulting processInstanceId, state, and the principal it executedAs is stitched onto the timeline.

A real request event (from the tool-usage demo):

{
  "schemaVersion": 1,
  "type": "request",
  "runId": "7643fc4c-9dfe-4ecd-99f1-2e25fcb3cc6d",
  "eventSeq": 0,
  "timestamp": "2026-05-24T13:19:26.110397928Z",
  "provider": "OPEN_AI",
  "model": "gpt-6-luna",
  "endpoint": "https://api.openai.com/v1",
  "processDefinitionKey": "agent-with-tool-usage",
  "activityId": "Activity_agentic_process_management",
  "userId": "demo",
  "groupIds": ["camunda-admin"],
  "messages": [
    { "role": "SYSTEM", "content": "You have access to ... ProcessStarterTool ..." },
    { "role": "USER",   "content": "Start the process \"process-as-a-tool\" ..." }
  ],
  "tools": ["runProcessByKey"],
  "toolProvenance": { "runProcessByKey": { "kind": "local" } }
}

The matching response event adds durationMs and the toolCalls[] the model issued. These logs are what the EE AI Agent Audit view renders.

Marking AI-generated output (aiMeta)

Mapping the AI-output marker output (${outputAiMeta} → e.g. agentOutput_aiMeta) attaches a machine-readable map to the result:

{ "aiGenerated": true, "runId": "...", "provider": "OPEN_AI", "model": "...", "responseId": "...", "generatedAt": "2026-..." }

Downstream user tasks, gateways, and history consumers can use it to distinguish AI-generated values from human-authored ones. Leave the output field unset to skip it. See Configuring the Agent.

Content redaction

For GDPR-conservative deployments, the content of request messages can be replaced with a SHA-256 hash plus the original character length (the rest of the event — identity, model, tools, timings — is preserved):

Setting Kind Default
cibseven.connect.ai-agent.redactContent system property false
CIBSEVEN_CONNECT_AI_AGENT_REDACT_CONTENT env var false

When enabled, each messages[].content becomes a {hash, length, redacted} marker: a fingerprint from which the text cannot be read back. Redaction is a server setting, not a field per task, and it covers only these messages. Plain text stays in the model’s answers (answer) and tool-call arguments (toolCalls[].arguments) in the log, in your output variable, in the conversation kept by chat memory and in the variables your tools write. This trades webclient readability for confidentiality. Resolution is property → env → default false.

Turning the chat-log variables off

The DB write can be suppressed at two scopes. The events are then kept nowhere: the connector writes them neither to the application log nor to the engine’s history (HistoryEventHandler); at log level DEBUG it logs only the text of the messages, without the other fields:

  • Per activity — the Persist chat-log audit variable field (persistChatLog), tri-state: empty = use global default, ${true} = force on, ${false} = force off (overrides the global).
  • Deployment-wide — cibseven.connect.ai-agent.chatLogVariable.enabled (system property) or CIBSEVEN_CONNECT_AI_AGENT_CHAT_LOG_VARIABLE_ENABLED (env), default true. The connector logs the resolved value once, at the first call of an agent that has no persistChatLog of its own, not at startup (WARN when disabled, since it’s a compliance-relevant deviation).

EU AI Act Warning

Disabling the variable removes the in-engine traceability used to satisfy Art. 12 (record-keeping) and Art. 26(6) (≥ 6-month retention). If you disable it, keep the record outside the engine by other means and document that record as the official one: the connector has no output of its own for the events yet.

Transparency to the end user

aiMeta is consumed by downstream logic. The person who reads or acts on the agent’s output in a Tasklist form is a distinct audience, and AI transparency obligations (e.g. EU AI Act Art. 50 user-facing disclosure) are about them. The connector gives you the signal; surfacing it is a modeling choice:

  • Label AI-generated values in forms. When a user task shows agentOutput, make it clear the value was produced by AI and should be reviewed — e.g. a read-only “AI-generated — please verify” field, or a form hint driven by agentOutput_aiMeta.aiGenerated.
  • Prefer review steps for consequential output. Put a human approval between the agent and any irreversible action (the human-in-the-loop pattern).
  • Give reviewers the trail. In CIB seven Enterprise, the AI Agent Audit view renders the chat-log timeline so a reviewer can see the prompt, tools, and reasoning behind an answer.

The EU AI Act compliance guide

Deployer obligations, risk-tier guidance, retention, and the Article-by-Article mapping are maintained in a separate compliance guide (COMPLIANCE.md), so the legal content can be reviewed and versioned independently of this technical manual. Refer to that guide for compliance decisions; use this chapter for the knobs that implement them.

On this Page: