Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

16.9 KB
Raw Blame
{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "description": "Request body for registering a scout config without waiting for the coordinator tick.\n\nUpsert keyed on `skill_name`: if the coordinator (or a concurrent caller) already\nregistered the row, the provided tunables are applied to it instead.",
    "properties": {
        "allowed_mcp_tools": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Exact MCP tool names selected for this scout, excluding its built-in run context tools. Null means no tool restriction; an empty list selects no additional tools. Write access is derived from selected write tools. Clearing to null preserves the last write scopes. Send this field or tool_preset, never both. Requires the scouts-tool-access feature flag."
        },
        "auto_pause_exempt": {
            "description": "Exempt this scout from the inactivity pause, which otherwise switches off a scout that goes a fortnight without surfacing anything anyone engages with. Set it on watchdog scouts whose value is staying quiet. Defaults to false.",
            "type": "boolean"
        },
        "display_name": {
            "description": "Name shown wherever people identify this scout, written however you want it — spaces, capitalization, and acronyms are kept as typed, and two scouts may share one. It does not change the scout's skill name, which stays its identity, so renaming a scout keeps its schedule, run history, notes, memory, and links. At most 200 characters; blank means the scout has no name of its own and is labelled from its skill name instead.",
            "maxLength": 200,
            "type": "string"
        },
        "emit": {
            "description": "Whether the scout writes findings to the inbox. False = dry-run: it runs and logs but emits nothing. Defaults to true.",
            "type": "boolean"
        },
        "enabled": {
            "description": "Whether this scout runs on its schedule. Defaults to true.",
            "type": "boolean"
        },
        "lifecycle_locked": {
            "description": "Opt-in guard on this scout's lifecycle. Off by default, so anyone with scout write access may pause, resume, switch the scout to dry run, or delete it. On, only the person the scout's runs act as or a project admin may do any of those, or change this flag. Use it on a scout whose output people depend on: `signal_scout:write` is a project-wide scope held by people and by unattended agents alike, and a resume has to pass the project's enabled-scout maximum that a pause does not, so a bulk pause is not undone in one step. The lock never stops an automatic pause, such as the inactivity sweep or the repeated-failure breaker.",
            "type": "boolean"
        },
        "mcp_gateway_server_ids": {
            "description": "MCP gateway servers (by id) this scout's runs may use, chosen from the connections members shared to the whole team. Selection is per scout: an empty list gives the scout no MCP servers. Applies from the scout's next run.",
            "items": {
                "type": "string"
            },
            "maxItems": 100,
            "type": "array"
        },
        "model": {
            "anyOf": [
                {
                    "maxLength": 200,
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Optional model id this scout's runs are pinned to, e.g. `claude-opus-4-5`. Must be one of the platform's agent models; an invalid id is rejected with the available ones listed. Null keeps the default model, chosen by the platform. Early access: the pin can only be set on projects enrolled in the scout model preview, and only takes effect there. Set null to clear it."
        },
        "network_access": {
            "description": "What the scout's sandbox can reach over the network while it runs. Defaults to `trusted`, the platform's trusted-domain allowlist (PostHog, GitHub, common package registries). Set `full` to let this scout reach any site, for skills that read external sources such as documentation or papers.\n\n* `trusted` - Trusted domains only\n* `full` - Full",
            "enum": ["trusted", "full"],
            "type": "string"
        },
        "output_destinations": {
            "description": "Destinations that receive each finding or report this scout emits. Empty by default.",
            "properties": {
                "inbox": {
                    "description": "Whether this scout's reports appear in the shared inbox. Defaults to true. Set false to keep the reports this scout authors out of the inbox and its Slack notifications, for example for a digest scout read in Slack. Reports this scout only edits are not affected. An update that omits this key keeps the stored value.",
                    "type": "boolean"
                },
                "slack": {
                    "anyOf": [
                        {
                            "properties": {
                                "channel": {
                                    "anyOf": [
                                        {
                                            "maxLength": 255,
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ],
                                    "description": "Slack channel target in the channel picker's `channel_id|#channel-name` format. Null while choosing a channel; no messages are sent until a channel or user is set."
                                },
                                "integration_id": {
                                    "description": "ID of the Slack integration whose bot posts this scout's findings and reports.",
                                    "minimum": 1,
                                    "type": "number"
                                },
                                "thread_reports": {
                                    "default": true,
                                    "description": "When true, post a report as a thread: a short lead in the channel and the rest split into replies at the summary's section labels, which can be Markdown headings or bold labels. Keeps a long summary from being clipped at Slack's section limit. On by default; set it false to post a single message, which can truncate a long summary. It does not change how findings post.",
                                    "type": "boolean"
                                },
                                "users": {
                                    "anyOf": [
                                        {
                                            "items": {
                                                "maxLength": 255,
                                                "pattern": "^[UW][A-Z0-9]{4,}\\s*(\\|.*)?$",
                                                "type": "string"
                                            },
                                            "maxItems": 5,
                                            "minItems": 1,
                                            "type": "array"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ],
                                    "description": "Slack members to send output to as direct messages, each in `member_id|@display-name` format (a bare member ID like `U0123ABC456` also works). Each member gets their own DM from the PostHog app; at most 5. Set either this or `channel`, not both. Useful for personal scouts where a DM beats a channel."
                                }
                            },
                            "required": ["integration_id"],
                            "type": "object"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "Slack destination for each emitted scout finding or report. Null or omitted disables Slack delivery."
                },
                "webhook": {
                    "anyOf": [
                        {
                            "properties": {
                                "hog_function_id": {
                                    "description": "Id of the CDP destination delivering this scout's reports. Set by the product that provisioned it, so it can find that destination again to update or remove it.",
                                    "type": "string"
                                }
                            },
                            "required": ["hog_function_id"],
                            "type": "object"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "The CDP destination another product provisioned for this scout's reports. Null or omitted means no webhook. Unlike Slack, Signals does not deliver this itself: the reference lives here so the owning product can manage the destination's lifecycle."
                }
            },
            "type": "object"
        },
        "precheck_query": {
            "anyOf": [
                {
                    "maxLength": 10000,
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Optional HogQL `SELECT` a scheduled run evaluates before it starts. When it returns no rows, or one row with one false value (`false`, `0`, null or empty), the run is skipped: no sandbox, no model call, and no run row. Any other result starts the run, and the scout reads the rows. A query error also starts the run. Use `{since}` (the start of the last run that ran, or when the scout was created) and `{now}` to look only at what is new, e.g. `SELECT count() FROM events WHERE event = '$exception' AND timestamp > {since}`. To run at least once a week however quiet it is, add `OR {since} < {now} - INTERVAL 7 DAY` to the condition. Only scheduled runs evaluate it: a manual or workflow run always starts. `{interval_minutes}` is the gap between two scheduled runs, so a backstop can follow the schedule: `{since} < {now} - toIntervalMinute(greatest(1440, 2 * {interval_minutes}))` runs at least daily and never more often than every two intervals. The query stops after 10 seconds and reads at most 50 rows. Try a query with `scout-config-precheck-test` before you save it. Null or blank uses the default pre-check the scout's skill ships, if any. To turn every pre-check off, set `precheck_disabled`."
        },
        "repositories": {
            "description": "GitHub repositories this scout clones into its sandbox, each in `organization/repo` format. Set them for a scout that reads code, so it can search the tree and run the project's own tests instead of reading files one API call at a time. Empty (the default) leaves the sandbox without a checkout. The scout's GitHub access stays read-only either way, so a repository listed here is never writable from a run. At most 10, each reachable through the project's GitHub connection. Applies from the scout's next run.",
            "items": {
                "maxLength": 255,
                "type": "string"
            },
            "maxItems": 10,
            "type": "array"
        },
        "run_cron_schedule": {
            "anyOf": [
                {
                    "maxLength": 100,
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Optional five-field cron expression, e.g. '30 9 * * *' (daily at 09:30), '0 9,17 * * *' (twice daily), or '0 9 * * 1-5' (weekday mornings). Evaluated in the project timezone. Takes precedence over `run_interval_minutes`; occurrences must be at least 30 minutes apart."
        },
        "run_interval_minutes": {
            "description": "Minutes between runs (30–43200). Defaults to 1440 (every 24 hours).",
            "maximum": 43200,
            "minimum": 30,
            "type": "number"
        },
        "skill_name": {
            "description": "The skill to register a config for. Any valid skill name works — the config row is what makes a skill a scout. The skill must already exist on this project — author it via the skills store first.",
            "maxLength": 200,
            "type": "string"
        },
        "structured_output_schema": {
            "anyOf": [
                {
                    "additionalProperties": {},
                    "propertyNames": {
                        "type": "string"
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Optional JSON Schema (draft 2020-12) describing ONE structured record this scout produces via `scout-record-output` — e.g. a per-report quality judgment (`{\"type\": \"object\", \"properties\": {\"verdict\": {\"enum\": [\"good\", \"bad\", \"unsure\"]}, \"reason\": {\"type\": \"string\"}}, \"required\": [\"verdict\", \"reason\"]}`). The root must be `\"type\": \"object\"`. Setting a schema turns the structured-output channel on: the run prompt renders the schema and every submitted record is validated against it and recorded in the project as a `$scout_structured_output` event, queryable like any event. The channel also requires emit — a dry-run scout has nowhere to record to. Cardinality is the scout's call (one record per run, one per judged entity, ...). Null = channel off. Setting a schema requires skill-authoring authorization (the `llm_skill:write` scope and skill editor access) since the scout reads it verbatim in its prompt; clearing it needs only the config write. Records validate against the schema in force when the run was dispatched."
        },
        "tags": {
            "description": "Free-form labels for grouping the fleet, e.g. `[\"revenue\", \"on-call\"]`. Normalized to lowercase kebab-case (`On Call` and `on_call` both become `on-call`), deduped, and stored sorted; at most 10 tags, each at most 50 characters once normalized. Pass the full desired set — a write replaces the existing tags rather than merging into them. Filter the config list with the `tags` query parameter.",
            "items": {
                "type": "string"
            },
            "maxItems": 10,
            "type": "array"
        },
        "tool_preset": {
            "description": "Expand this named preset into a saved tool list. Later preset changes do not alter the saved list. Send this field or allowed_mcp_tools, never both. Requires the scouts-tool-access feature flag.\n\n* `read_only` - Read only\n* `support_notes` - Support notes",
            "enum": ["read_only", "support_notes"],
            "type": "string"
        },
        "write_scopes": {
            "description": "Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `event_definition:write`, `experiment:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `ticket:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. `ticket:write` lets the scout update tickets, manage saved views, and add private notes. Scouts cannot send public replies, compose emails, change existing notes, or change customer identity fields. Ticket changes can start workflows that message customers. `event_definition:write` lets the scout change the tags on event definitions and nothing else. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.",
            "items": {
                "type": "string"
            },
            "maxItems": 15,
            "type": "array"
        }
    },
    "required": ["skill_name"],
    "type": "object"
}