# Zentra Agent Incident Scribe (`zentrafoundry/zentra-agent-incident-scribe`) Actor

Generate clean incident reports from agent and Actor failure evidence.

- **URL**: https://apify.com/zentrafoundry/zentra-agent-incident-scribe.md
- **Developed by:** [Zentra](https://apify.com/zentrafoundry) (community)
- **Categories:** AI, Agents, Developer tools
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 result delivereds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Zentra Agent Incident Scribe

Generate clean incident reports from agent and Actor failure evidence.

### Make agents earn more

### 1. One-sentence promise

Write incident reports from evidence, not guesswork.

### 2. When to use this Actor

Use this Actor when Agent operators, support teams, platform owners needs Convert failure evidence into timeline, impact, cause, and remediation. and a buyer-visible AgentOps artifact before any pay-per-event charge is recorded.

### 3. When not to use this Actor

Do not use this Actor as a legal, security, compliance, revenue, or incident certification system. Findings are deterministic signals, not a legal, security, or compliance certification. Review high-impact decisions before blocking production workflows.

### 4. Inputs table

| Input | Purpose |
| --- | --- |
| `inlineItems` | Inline records, traces, runs, events, manifests, or scenario artifacts supplied directly by the buyer. |
| `sourceDatasets` | Optional user-selected Apify datasets. |
| `sourceKeyValueStores` | Optional user-selected Apify key-value stores. |
| `actorJson`, `inputSchemaJson`, `outputSchemaJson`, `readmeText` | Actor/package metadata used by policy, passport, audit, and repair flows. |
| `connectorManifests` | Optional MCP connector/tool definitions for policy linting. |
| `logText`, `runMetadata`, `inputJson`, `outputJson` | Explicit run artifacts used for audit, repair, cost, or incident reports. |
| `scenarios`, `inlineTraces`, `inlineRuns`, `inlineEvents`, `toolCall` | Actor-specific artifacts for monitor, trace, cost, incident, and firewall outputs. |
| `notificationConnectors`, `destinationConnectors` | Optional user-supplied MCP writeback connectors. Destructive actions are not automatic. |
| `dryRun`, `maxArtifacts` | PPE control fields for would-charge ledgers and low-cost buyer trials. |

### 5. Output datasets table

The generated Actor config exposes these dataset aliases:

```json
[
    "default",
    "timeline",
    "findings",
    "evidence",
    "remediations",
    "actions"
]
````

Every successful run also writes a default dataset row containing the summary, confidence, evidence hash, preflight quote, would-charge ledger, and earnings report.

### 6. Example input JSON

```json
{
    "incidentTitle": "Agent workflow failed during connector writeback",
    "logText": "403 forbidden while posting update",
    "inlineEvents": [
        {
            "timestamp": "2026-06-18T00:00:00Z",
            "message": "writeback denied"
        }
    ],
    "redactSecrets": true
}
```

### 7. Example output rows

```json
{
  "actorSlug": "zentra-agent-incident-scribe",
  "status": "artifact_ready",
  "summary": "Buyer-visible AgentOps artifact produced.",
  "artifact": {
    "kind": "agentops_result",
    "evidence": {
      "redactionApplied": true
    }
  },
  "runSummary": {
    "pricingModel": "PAY_PER_EVENT",
    "wouldChargeEventCount": 1
  }
}
```

Actor-specific datasets include findings, evidence, clean/quarantine rows, policy packs, audit metrics, scenario results, normalized spans, policy decisions, repair steps, cost events, or incident timelines depending on the selected AgentOps Actor.

### 8. Privacy and permission notes

This Actor is designed for limited permissions. It can read only its own run storages and user-provided resources selected in the input form. Optional MCP connectors are supplied by the user at runtime through Apify's connector proxy; the Actor does not receive raw third-party credentials.

Secret-looking values are redacted before snippets are stored in evidence rows. Evidence datasets store hashes, redacted snippets, counts, and field paths instead of raw credentials or full logs.

### 9. PPE pricing notes

Pricing model: `PAY_PER_EVENT`.

- `incident-report-created`: $0.5000 after one incident report
- `timeline-extracted`: $0.1200 after one ordered incident timeline
- `remediation-plan`: $0.2500 after one prevention plan

The Actor writes `preflightQuote.json` before paid work and `agentEarningsReport.json` after the run. Dry runs produce a would-charge ledger without billing. Internal validation runs, canary runs, synthetic checks, and forecasts are not buyer revenue. Buyer-visible charged events are the revenue truth.

### 10. Troubleshooting

- If the Actor reports `ppe-disabled`, set `ZENTRA_ENABLE_PPE=1` only in the real paid Apify environment.
- If connector findings are high or critical, reduce connector scope before exposing the tool to autonomous agents.
- If no source artifacts are supplied, the Actor runs a deterministic sample so the output contract remains inspectable.
- If a writeback connector fails, review the `actions` dataset. The core artifact remains valid.

### 11. Changelog

- `1.0.0`: Initial reconciled Zentra AgentOps public Actor package with limited permissions, multiple dataset outputs, evidence hashing, dry-run PPE ledger, and owner-gated publication flow.

# Actor input Schema

## `buyerQuery` (type: `string`):

Buyer-safe query or scope for the records returned by this product.

## `taskIntent` (type: `string`):

Stable product-specific purpose for this saved Apify task.

## `sourceMode` (type: `string`):

Sample emits public-safe Apify Actor Record rows. Approved live source mode keeps the same output fields and only uses owner-approved public URLs.

## `outputMode` (type: `string`):

Use sample records for Apify Store QA or buyer-ready records for approved Apify Actor Record delivery.

## `startUrls` (type: `array`):

Public URLs to use for live Apify Actor Record extraction after source-policy approval. Leave empty for sample mode.

## `maxItems` (type: `integer`):

Caps the number of Apify Actor Record rows written to the dataset.

## `perSourceLimit` (type: `integer`):

Caps validated rows from any one source before cross-source deduplication.

## `maxTotalChargeUsd` (type: `number`):

Buyer-selected spend ceiling; the Apify run-level maximum remains authoritative.

## `overallTimeoutSecs` (type: `integer`):

Stops additional source work once the bounded run deadline is reached.

## `requestTimeoutSecs` (type: `integer`):

Timeout applied independently to each approved source request.

## `maxRequestRetries` (type: `integer`):

Bounded retry count for transient source failures.

## `sinceLastRun` (type: `boolean`):

Uses stable Actor state to skip logical records delivered by earlier runs.

## `deltaMode` (type: `boolean`):

Preserves stable deduplication keys for recurring tasks and schedules.

## Actor input object example

```json
{
  "buyerQuery": "buyer-ready records with source evidence",
  "taskIntent": "buyer-ready-product-run",
  "sourceMode": "sample",
  "outputMode": "sample-records",
  "startUrls": [],
  "maxItems": 1,
  "perSourceLimit": 25,
  "maxTotalChargeUsd": 5,
  "overallTimeoutSecs": 900,
  "requestTimeoutSecs": 30,
  "maxRequestRetries": 2,
  "sinceLastRun": false,
  "deltaMode": true
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "buyerQuery": "buyer-ready records with source evidence",
    "taskIntent": "buyer-ready-product-run",
    "sourceMode": "sample",
    "outputMode": "sample-records",
    "startUrls": [],
    "maxItems": 1,
    "perSourceLimit": 25,
    "maxTotalChargeUsd": 5,
    "overallTimeoutSecs": 900,
    "requestTimeoutSecs": 30,
    "maxRequestRetries": 2,
    "sinceLastRun": false,
    "deltaMode": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("zentrafoundry/zentra-agent-incident-scribe").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "buyerQuery": "buyer-ready records with source evidence",
    "taskIntent": "buyer-ready-product-run",
    "sourceMode": "sample",
    "outputMode": "sample-records",
    "startUrls": [],
    "maxItems": 1,
    "perSourceLimit": 25,
    "maxTotalChargeUsd": 5,
    "overallTimeoutSecs": 900,
    "requestTimeoutSecs": 30,
    "maxRequestRetries": 2,
    "sinceLastRun": False,
    "deltaMode": True,
}

# Run the Actor and wait for it to finish
run = client.actor("zentrafoundry/zentra-agent-incident-scribe").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "buyerQuery": "buyer-ready records with source evidence",
  "taskIntent": "buyer-ready-product-run",
  "sourceMode": "sample",
  "outputMode": "sample-records",
  "startUrls": [],
  "maxItems": 1,
  "perSourceLimit": 25,
  "maxTotalChargeUsd": 5,
  "overallTimeoutSecs": 900,
  "requestTimeoutSecs": 30,
  "maxRequestRetries": 2,
  "sinceLastRun": false,
  "deltaMode": true
}' |
apify call zentrafoundry/zentra-agent-incident-scribe --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=zentrafoundry/zentra-agent-incident-scribe",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Zentra Agent Incident Scribe",
        "description": "Generate clean incident reports from agent and Actor failure evidence.",
        "version": "1.0",
        "x-build-id": "p6D9hICgudj7Ec2vY"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/zentrafoundry~zentra-agent-incident-scribe/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-zentrafoundry-zentra-agent-incident-scribe",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/zentrafoundry~zentra-agent-incident-scribe/runs": {
            "post": {
                "operationId": "runs-sync-zentrafoundry-zentra-agent-incident-scribe",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/zentrafoundry~zentra-agent-incident-scribe/run-sync": {
            "post": {
                "operationId": "run-sync-zentrafoundry-zentra-agent-incident-scribe",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "sourceMode"
                ],
                "properties": {
                    "buyerQuery": {
                        "title": "Apify Actor Record query",
                        "type": "string",
                        "description": "Buyer-safe query or scope for the records returned by this product.",
                        "default": "buyer-ready records with source evidence"
                    },
                    "taskIntent": {
                        "title": "Apify Actor Record task intent",
                        "type": "string",
                        "description": "Stable product-specific purpose for this saved Apify task.",
                        "default": "buyer-ready-product-run"
                    },
                    "sourceMode": {
                        "title": "Run sample or approved live sources",
                        "enum": [
                            "sample",
                            "startUrls"
                        ],
                        "type": "string",
                        "description": "Sample emits public-safe Apify Actor Record rows. Approved live source mode keeps the same output fields and only uses owner-approved public URLs.",
                        "default": "sample"
                    },
                    "outputMode": {
                        "title": "Apify Actor Record output mode",
                        "enum": [
                            "sample-records",
                            "buyer-ready-records"
                        ],
                        "type": "string",
                        "description": "Use sample records for Apify Store QA or buyer-ready records for approved Apify Actor Record delivery.",
                        "default": "sample-records"
                    },
                    "startUrls": {
                        "title": "Approved Apify Actor Record source URLs",
                        "type": "array",
                        "description": "Public URLs to use for live Apify Actor Record extraction after source-policy approval. Leave empty for sample mode.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "title": "URL",
                                    "type": "string",
                                    "description": "Approved public Apify Actor Record source URL."
                                }
                            }
                        },
                        "default": []
                    },
                    "maxItems": {
                        "title": "Maximum Apify Actor Record rows",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Caps the number of Apify Actor Record rows written to the dataset.",
                        "default": 1
                    },
                    "perSourceLimit": {
                        "title": "Maximum rows per source",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Caps validated rows from any one source before cross-source deduplication.",
                        "default": 25
                    },
                    "maxTotalChargeUsd": {
                        "title": "Maximum total charge (USD)",
                        "minimum": 0.01,
                        "maximum": 1000,
                        "type": "number",
                        "description": "Buyer-selected spend ceiling; the Apify run-level maximum remains authoritative.",
                        "default": 5
                    },
                    "overallTimeoutSecs": {
                        "title": "Overall timeout seconds",
                        "minimum": 30,
                        "maximum": 3600,
                        "type": "integer",
                        "description": "Stops additional source work once the bounded run deadline is reached.",
                        "default": 900
                    },
                    "requestTimeoutSecs": {
                        "title": "Source request timeout seconds",
                        "minimum": 5,
                        "maximum": 120,
                        "type": "integer",
                        "description": "Timeout applied independently to each approved source request.",
                        "default": 30
                    },
                    "maxRequestRetries": {
                        "title": "Maximum source retries",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "integer",
                        "description": "Bounded retry count for transient source failures.",
                        "default": 2
                    },
                    "sinceLastRun": {
                        "title": "Only emit new logical records",
                        "type": "boolean",
                        "description": "Uses stable Actor state to skip logical records delivered by earlier runs.",
                        "default": false
                    },
                    "deltaMode": {
                        "title": "Delta mode",
                        "type": "boolean",
                        "description": "Preserves stable deduplication keys for recurring tasks and schedules.",
                        "default": true
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
