What You’ll Accomplish
Workflow Observability lets you see exactly what any headless caller (AI agent, script, CI/CD job, or scheduled batch) did in Hoop, with the same identity, audit, and policy story as an interactive user. You can:- Authenticate automation with named identities instead of shared admin credentials
- Scope each caller’s permissions to only the connections and groups it needs
- Group the sessions of the same logical run into one workflow, even across multiple commands or connections
- Keep a complete audit trail of who ran what, when, and as part of which task
The Problem Workflow Observability Solves
Much of the work that touches production is not interactive: ad-hoc scripts against the warehouse, deploy pipelines running migrations and smoke tests, scheduled export jobs, AI agents chaining tool calls to finish each queued task. To an audit log, all of that typically looks the same: a string of isolated, anonymous-looking sessions with no way to answer the questions operators actually ask:- Who (or which system) ran this command?
- What else did it do before and after?
- Which of these fifty sessions belong to the ticket we’re investigating?
How Workflow Observability Works
Two building blocks make this possible.1. API Keys: named identities for headless callers
Automated callers authenticate using an API Key (prefixed withhpk_) instead of a browser login. Keys are:
- Named: sessions are attributed to
nightly-report,deploy-pipeline, orticket-agentrather than an anonymous administrator. - Scoped: the key inherits only its assigned groups’ permissions, so the blast radius matches the job.
- Revocable: deactivate a compromised or retired key instantly, without redeploying the Gateway.
- Auditable: the Gateway tracks who created each key, who deactivated it, and when it was last used.
2. Correlation IDs: group related sessions into a workflow
Most automated work is a chain of steps: a deploy migration then smoke test then health check, a pipeline querying a source and writing to a destination, an agent reading a task and calling several APIs. Tag each call with a shared correlation value so the sessions of the same run link together. The behavior is identical on the CLI and the REST API.- CLI
- REST API
Pass
--correlation-id on every hoop exec invocation:The correlation ID is a free-form printable ASCII string up to 255 characters. Use whatever identifier the caller already has: a CI build number, cron run ID, ticket/task ID, agent workflow ID, or a UUID generated at the start of the run.
Common Scenarios
Scripts run by engineers
A data scientist runs a multi-step script against production. Each step is executed through
hoop exec with a shared correlation ID, so the whole run shows up as one traceable workflow instead of scattered queries.CI/CD pipelines
A deploy pipeline uses a scoped API Key to run migrations, seed data, and health checks. Tagging every step with the build ID answers “what did build #842 actually do in prod?” from the audit log.
Scheduled jobs
A nightly export uses an API Key scoped to a single read-only connection. Tagging each run with its cron run ID lets you trace and replay a failed export without guessing which sessions belong to it.
AI agents
An agent picks up tasks from a queue and issues many tool calls per task. With a named API Key and task-ID tagging, operators can open any task and see exactly what the agent did, under the same masking and guardrails as any other caller.
Quick Start
Prerequisites
To get the most out of this guide, you will need to:- Either create an account in our managed instance or deploy your own hoop.dev instance
- You must be your account administrator to perform the following actions
- Admin access to create API Keys
- A script, CI job, scheduled task, or agent that calls Hoop through the CLI (
hoop exec) or the REST API
Step 1: Create an API Key for the workflow
Name and scope the key
Name the key after the caller (e.g.
nightly-report, deploy-pipeline, ticket-agent). Assign groups that grant only the connections this workflow needs; avoid admin unless genuinely required.Step 2: Authenticate with the API key
- CLI
- REST API
Persist the key in the local config on the workflow’s host:The CLI then authenticates as the key’s identity for every subsequent command.
Step 3: Tag each call with a correlation ID
Pass a shared identifier on every call in the same logical run:- CLI
- REST API
Use the
--correlation-id flag on hoop exec:Related Features
Session Recording
Full replay of every session, including automated ones. See exactly what a script, pipeline, or agent executed and what it got back.
Guardrails
Block destructive operations regardless of the caller. The same rules apply to humans, scripts, and agents.
Live Data Masking
Mask automated query results just like interactive sessions, so sensitive data never leaves the Gateway.
API Keys Setup
Technical reference for creating, rotating, and revoking API keys via the Web App and REST API.