Workflows
Workflows are reusable, multi-step automation recipes that chain connector actions together. They're the backbone of Argonix's automation capabilities — from simple Slack notifications to complex cross-tool incident remediation.
Workflows and generic checks share the step traversal engine, reference resolution, comparisons, connector dispatch and output redaction. Each keeps its own execution record and policies: workflows support approvals, resumable actions, cancellation and compensation; checks evaluate health conditions and feed availability alerts. Existing definitions remain compatible. Workflow comparisons keep their historical conversions and treat null references as unresolved; checks keep strict typed comparisons and distinguish null from a missing field. Browser sessions and captures remain managed by the check adapter.
Overview
A workflow consists of:
- Steps — ordered sequence of connector actions (e.g., "get K8s pods", "query Loki logs", "post to Slack")
- Input variables — parameters extracted from the trigger (message, webhook body, alert context)
- Step chaining — each step can reference outputs from previous steps
- Error handling —
abortorskipon failure - Triggers — manual, schedule (cron), webhook, alert rule, operational signal, or an execution event from another workflow
Argonix ships with 42 pre-built workflows across 6 categories, and you can create custom ones.
Categories
| Category | Description | Examples |
|---|---|---|
| Identity & Access | User management, password resets, role assignments | Reset user password, disable compromised account, check user group membership |
| Incident Management | Investigation, escalation, remediation | Auto-investigate down monitor, escalate to PagerDuty, post incident summary |
| Onboarding / Offboarding | New hire setup, departure cleanup | Create user in all systems, revoke access on departure |
| DevOps / Infrastructure | Deployments, scaling, maintenance | Restart service in K8s, scale deployment, rotate secrets |
| Security | Audit, compliance, threat response | Audit admin access, check for exposed secrets, revoke suspicious sessions |
| General | Anything else | Custom data enrichment, cross-system reporting |
Step Structure
Each step in a workflow is a JSON object:
{
"id": "get_pods",
"tool": "kubernetes.list_pods",
"params": {
"namespace": "{{input.namespace}}"
},
"on_error": "abort"
}
| Field | Description |
|---|---|
id |
Unique step identifier (referenced by later steps) |
tool |
Connector action in the format connector_type.method_name |
params |
Key-value parameters with template variables |
on_error |
abort (stop workflow), skip, or continue |
when |
Optional structured condition controlling whether the step runs |
foreach |
Optional array or array reference, processed sequentially (100 items maximum) |
on_item_error |
abort or continue for a foreach step |
Template Variables
| Syntax | Description | Example |
|---|---|---|
{{input.field}} |
Value from the workflow trigger input | {{input.email}} |
{{step_id.output.field}} |
Output from a previous step | {{get_pods.output.items}} |
{{step_id.output}} |
Complete output from a previous step, preserving its JSON type | {{get_pods.output}} |
Every tool publishes an output JSON Schema. The step editor's Available data
panel lists fields guaranteed by previous tools and inserts the correct template
reference into the selected parameter. Fields that only exist for some successful
outcomes are marked as conditional. All 886 connector tools publish explicit
schemas. Internal data.* tools are deterministic; ai.analyze remains open
because its output fields are defined by the prompt.
Command Output and AI Analysis
ssh.exec_command and k8s.exec_command return stdout, stderr, exit_code,
and truncated. Kubernetes also returns the resolved pod and workload target.
The complete result is persisted as the step output and can be passed to the
existing explicit AI step:
{
"id": "analyze_command",
"tool": "ai.analyze",
"params": {
"input": "{{run_command.output}}",
"prompt": "Determine whether the command succeeded and summarize actionable errors.",
"output_instructions": "Return healthy, summary, and severity fields."
}
}
Conditions and Branches
Conditions use structured operators (eq, ne, gt, gte, lt, lte,
contains, exists, and truthy) and never evaluate arbitrary code. Branching
uses ordinary mutually exclusive steps:
[
{"id": "success", "tool": "slack.post_message",
"params": {"text": "Command succeeded"},
"when": {"value": "{{run_command.output.exit_code}}", "operator": "eq", "compare_to": 0}},
{"id": "failure", "tool": "slack.post_message",
"params": {"text": "Command failed: {{run_command.output.stderr}}"},
"when": {"value": "{{run_command.output.exit_code}}", "operator": "ne", "compare_to": 0}}
]
Use data.assert with on_error: "abort" to stop unless a condition passes.
Use data.filter, data.map, and data.reduce for deterministic array
transformations.
GitLab Pipeline Waits
Use gitlab.run_pipeline followed by gitlab.wait_pipeline instead of a generic
sleep step. The wait tool polls the specific pipeline for up to six hours and
returns terminal, successful, action_required, and timed_out fields that
can drive ordinary conditions:
[
{"id": "deploy", "tool": "gitlab.run_pipeline",
"params": {"project_id": "platform/api", "ref": "main"}},
{"id": "wait_deploy", "tool": "gitlab.wait_pipeline",
"params": {"project_id": "platform/api",
"pipeline_id": "{{deploy.output.id}}",
"timeout_seconds": 3600}},
{"id": "notify_failure", "tool": "slack.post_message",
"params": {"text": "Pipeline {{deploy.output.id}} ended with {{wait_deploy.output.status}}"},
"when": {"value": "{{wait_deploy.output.successful}}", "operator": "eq", "compare_to": false}}
]
The manual pipeline status is terminal with action_required: true. A timeout
is returned as structured output rather than a connector error, so the workflow
can choose whether to notify, retry, or abort.
For Each
A foreach step runs its tool sequentially for every array item. Parameters can
reference the current value through {{item}} or {{item.field}}:
{
"id": "inspect_instances",
"tool": "aws.instance_connect_exec",
"foreach": "{{list_instances.output.instances}}",
"on_item_error": "continue",
"params": {
"instance_id": "{{item.instance_id}}",
"command": "systemctl is-system-running"
}
}
The output contains one result per item plus count, succeeded, and failed.
Idempotent tools receive a stable key per item. A foreach step cannot currently
declare compensation; model the inverse action explicitly after filtering the
successful item results.
Example: Investigate Down Monitor
[
{
"id": "get_monitor",
"tool": "argonix.get_monitor",
"params": {"monitor_id": "{{input.monitor_id}}"},
"on_error": "abort"
},
{
"id": "check_pods",
"tool": "kubernetes.list_pods",
"params": {"namespace": "production", "label_selector": "app={{input.service}}"},
"on_error": "skip"
},
{
"id": "get_logs",
"tool": "loki.query_logs",
"params": {"query": "{app=\"{{input.service}}\"} |= \"error\"", "limit": 50},
"on_error": "skip"
},
{
"id": "notify",
"tool": "slack.post_message",
"params": {
"channel": "#incidents",
"text": "Investigation results for {{input.service}}:\n- Pods: {{check_pods.output.count}}\n- Recent errors: {{get_logs.output.count}}"
},
"on_error": "skip"
}
]
Inputs
A workflow's inputs are the {{input.x}} references used across its steps.
This is the single source of truth for what a workflow needs — the input set
is always derived from the steps, so it can never drift from what the workflow
actually uses.
How values are provided
When a workflow runs, Argonix resolves each {{input.x}} deterministically
first: any value present in the trigger input_data (a form field, a webhook
body key, or a structured field from an SRE patrol signal such as namespace or
pod_name) is used directly. Only the inputs left blank are extracted by the LLM
from the free-text message. If an {{input.x}} cannot be resolved, the step
fails according to its on_error — the raw {{input.x}} is never passed to a
tool as a literal string.
ssh.read_file and k8s.read_file read the beginning or end of a file with a
64 KiB default and 1 MiB maximum. Existing SSH file_read and log_read tools
remain available for workflow compatibility.
Input hints (optional annotations)
input_hints is an optional map that annotates the derived inputs with a
human-readable description and example. It never defines which inputs exist —
hints for variables not referenced in the steps are ignored.
{
"steps": [
{"id": "restart", "tool": "k8s.delete_pod",
"params": {"namespace": "{{input.namespace}}", "name": "{{input.pod_name}}"},
"on_error": "abort"}
],
"input_hints": {
"namespace": {"description": "Kubernetes namespace of the pod", "example": "prod"},
"pod_name": {"description": "Name of the pod to restart", "example": "api-gateway-7d9f"}
}
}
The API exposes the derived contract as a read-only inputs array on each
workflow ([{name, description, example, required}]), which powers the editor's
Inputs panel and the "Run" form. The same inputs are surfaced to the Argos agent
as optional typed parameters, so every surface stays in sync.
Creating a Workflow
Using the Web UI
- Go to Argos → Workflows.
- Click + New Workflow.
- Enter a name, category, and description.
- Use the visual workflow builder to add and configure steps.
- Set required connector types.
- Optionally configure a schedule (cron expression).
- Save and activate.
Screenshot: The Workflow Editor with the visual step builder.
Programmatically
curl -X POST https://api.argonix.io/api/0.1/organizations/{org_id}/argos/workflows/ \
-H "Authorization: Api-Key ax_xxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Investigate API Downtime",
"category": "incident",
"description": "Checks K8s pods, queries Loki logs, and posts summary to Slack",
"steps": [
{"id": "check_pods", "tool": "kubernetes.list_pods", "params": {"namespace": "production"}, "on_error": "skip"},
{"id": "get_logs", "tool": "loki.query_logs", "params": {"query": "{app=\"api\"} |= \"error\"", "limit": 50}, "on_error": "skip"},
{"id": "notify", "tool": "slack.post_message", "params": {"channel": "#incidents", "text": "Pod count: {{check_pods.output.count}}"}, "on_error": "skip"}
],
"required_connector_types": ["kubernetes", "loki", "slack"],
"requires_confirmation": false
}'
Triggering Workflows
Automations
Open Workflows → Automations and select Create automation. In When, choose the event. In Where, select one or more connectors. Leave the scope fields blank to monitor all eligible resources available through those connectors, or enter filters that apply to each selected connector. In Then, choose Investigate with Argos, Run a workflow, or Do nothing. Select Create and activate. Each detected event is associated with the connector that reported it.
To send notifications only, choose Do nothing and create a rule in Notification Rules. Choose When an automation starts, select the automation and choose a delivery channel.
| Event | Scope |
|---|---|
| PostgreSQL deadlock | A PostgreSQL connector reads counters for the databases allowed on its server. Enter a database name to narrow the rule. GCP and Azure can also be filtered by instance, and Azure by resource group. AWS can be filtered by Aurora or RDS PostgreSQL instance. |
| Container killed by an out-of-memory condition (OOM) | A Kubernetes or OpenShift connector with optional namespace and pod or workload filters. Argonix looks for a recent timestamped OOMKilled termination. |
| Image pull failure, configuration error or crash loop | Optionally select a Pod or workload in the namespace. The rules observe ErrImagePull / ImagePullBackOff, CreateContainerConfigError or CrashLoopBackOff respectively. Two minutes of persistent observations for the same container start one run. An observed recovery allows a new episode. |
| Job failed | All Jobs in scope, an exact Job or the executions of one CronJob. A terminal Failed=True condition starts one run per Job UID. |
| Container exited with an error | A timestamped termination with a nonzero exit code. Filter by Pod, workload or an exact exit code. |
| Creation rejected by admission policy | A controller Warning explicitly reports rejection by an admission policy, webhook, quota or OpenShift security constraint. |
| Controller API access forbidden | A controller Warning explicitly reports Kubernetes denying a user's operation on a resource. |
Both denial rules can target the object named by the event, such as a ReplicaSet. Repeated observations of one Event UID start one run. Coverage depends on controllers publishing events. Requests recorded only in API audit logs are outside the scope of these rules.
For direct PostgreSQL and Kubernetes OOM rules, the first successful observation establishes a baseline. The automation reacts to new evidence after that baseline. Each connector needs read access to the configured scope.
Cloud SQL uses the connector’s project. Azure Database for PostgreSQL Flexible Server uses its subscription and requires the deadlocks metric with database activity collection enabled. Both providers report deadlock_count per database. AWS uses the connector’s region and reports deadlocks_per_second per instance. Aurora uses CloudWatch and standard RDS PostgreSQL requires Performance Insights. To monitor one logical database on AWS, use a PostgreSQL connector pointed at that database.
For a direct PostgreSQL connector, SQL tools are available to the automation when the event concerns the database configured for the connection.
Grant read access to the target metadata and the provider’s metrics. The form suggests accessible resources and accepts exact names. For cloud sources, each completed interval starting after activation with a positive metric starts one run. Argonix checks the last ten minutes for delayed samples. Missing measurements appear as an unavailable observation.
Choose an active workflow that allows automatic starts and can run with any
selected connector. Fill in its required inputs. Fields provided by the event,
such as instance for a cloud source, can be left blank to use the observed value.
For example, select your production PostgreSQL connector, enter billing as the
database, and choose Investigate with Argos. Open the automation to see the
observation status, execution history and results. Edit, pause or reactivate the
rule from the same page. Configure start, finish or failure messages in
Notification Rules.
Operational signals
In the workflow editor settings, open Signal triggers and select Add
trigger. Choose a preset or a specific signal type, then select the connector
that provides the evidence. Filter by reason, namespace or workload to narrow
the scope. Map workflow inputs to fields from the signal or to literal values.
For example, map an input called namespace to signal_detail.namespace.
Save the workflow to apply its triggers.
When several rules match the same observation, Argonix creates one proposal or execution. It uses
the first matching rule for live evidence in the saved order, then the first
matching rule for evidence that requires review if no live rule matches.
| Preset | Evidence |
|---|---|
Out of memory (oom) |
OOMKilled on Kubernetes or OpenShift, or memory exhaustion in Cloud SQL logs. |
Restart (restart) |
A dated container termination and restart evidence on Kubernetes or OpenShift. |
Failure (failed) |
A failed Job, a Pod in the Failed phase or an active container failure such as CrashLoopBackOff on Kubernetes or OpenShift. |
Container crash loop (k8s_crash_loop) |
A container currently in CrashLoopBackOff. |
Image pull failure (k8s_image_pull_failed) |
A container currently in ErrImagePull or ImagePullBackOff. |
Pod evicted (k8s_pod_evicted) |
A Pod in the Failed phase with reason Evicted and a recent timestamp from the provider. The workflow requires review and simulates changes. |
Job failure (k8s_job_failed) |
A Job with the terminal Failed condition. |
Job exceeds its runtime limit (k8s_job_long_running) |
An active Job that reaches its configured activeDeadlineSeconds or the Patrol threshold before completing. |
VM stopped (vm_stopped) |
Confirmed power state from AWS EC2, GCP Compute, OVH Public Cloud, vSphere or Proxmox QEMU. The workflow requires review and simulates changes. |
VM failed (vm_failed) |
OVH Public Cloud reports ERROR for the instance. |
Argo CD application degraded (argocd_app_degraded) |
A reconciled application with current health status Degraded. |
Argo CD application out of sync (argocd_app_out_of_sync) |
A reconciled application with current sync status OutOfSync. This is evidence of deployment drift. |
The Kubernetes presets also work with OpenShift. For example, use Image pull
failure with your production namespace and map namespace from
signal_detail.namespace to collect the affected workload's events.
For a stopped VM, enter its exact Provider VM ID and map a vm_id input
from signal_detail.vm_id. The workflow can check its intended state and service
availability. For Argo CD, filter by application name and destination namespace.
A diagnostic workflow can collect the application diff for review. VM power and Argo CD sync status each
require a separate check to establish service health. These presets rely on
provider evidence available to the selected connector during the Patrol sweep.
In SRE Patrols, select the workflow under Notifications
& actions. The patrol supplies the observations and applies its scope,
confidence threshold and autonomy. If a rule matches, Patrol records the
proposal or execution in its report. For a direct run, ask Argos in conversation
or use /argos workflow run <slug>. The caller's connector access and the
workflow's confirmation requirements apply.
The API stores these rules in signal_triggers on the workflow. Each rule has
signal_kind, connector_id, optional reason, namespace, workload and
patrol_id, and an inputs map. A mapping with source set to literal uses
its value. A patrol_id restricts the rule to that patrol, including rules
moved from an existing patrol configuration.
Workflow lifecycle events
In the settings of the workflow that should run next, open Workflow lifecycle triggers and select Add trigger. Choose the source workflow and execution event, then map the target workflow's inputs from the source execution or from fixed values. Save the target workflow.
| Event | API event | When it fires |
|---|---|---|
| Started | execution.started |
The source workflow begins executing. |
| Succeeded | execution.completed |
The source workflow finishes successfully. |
| Failed | execution.failed |
The source workflow finishes with an error. |
For example, set the deployment workflow as the source in Post-deploy
checks and select Succeeded. Map environment to
execution.input_data.environment. In Deployment diagnosis, select the same
source and choose Failed. Map deployment_execution_id to execution.id
and deployment_error to execution.error_message.
Each source execution can launch a given target once per event type. The target must be active and allow automatic launch. It inherits the source run's authorized connector scope and applies its own step approvals. Argonix prevents a workflow chain from cycling back to a workflow it has already run.
These triggers use runs of the saved source workflow. Simulations and runs started with Run in the editor are excluded.
The target workflow's lifecycle_triggers field accepts one rule per
source_workflow_id and event_type pair. The source must belong to the same
organization. An inputs mapping can use a source path such as execution.status,
execution.input_data.<name> or event.occurred_at, or it can set source to
literal and provide a value.
Supervised containment
Configure a workflow with one target per containment step. A threat, finding or webhook can start the workflow. Argonix pauses the containment step for a signed-in operator to review the target. Changing the target or the connector configuration requires a new execution and approval. Use a separate step to notify the team after reviewing the provider result.
| Action | Connector setup and outcome |
|---|---|
azure.disable_user |
Enable supervised Entra containment on an Azure connection with an explicit service principal and tenant. The app needs Microsoft Graph User.EnableDisableAccount.All and User.Read.All and any directory role required for the target. Pass the exact Entra user object UUID. Argonix rereads accountEnabled after a change. |
vault.revoke_lease |
Configure the Vault HTTPS origin, a scoped token, one dynamic-secret issuing path and, if used, the Vault namespace. The token needs update on sys/leases/revoke and access to sys/capabilities-self for the connection check. Pass one full lease ID. A synchronous completion is recorded with the lease fingerprint. |
sentinelone.isolate_endpoint |
Add a separate isolation token and exact site ID to the SentinelOne connector. Pass the agent and site IDs. The output isolation_confirmed indicates whether a fresh provider read confirmed the isolation. |
If the connector has an explicit capability list, allow admin for Entra ID or write for Vault and SentinelOne. Use the connector credentials in Connectors. Workflow parameters identify targets. For Vault, the approval screen displays a shortened SHA-256 fingerprint of the lease ID and the connector name. Confirm uncertain outcomes at the provider before a new execution.
Manual Trigger (Web UI or API)
curl -X POST https://api.argonix.io/api/0.1/organizations/{org_id}/argos/workflows/{workflow_id}/trigger/ \
-H "Authorization: Api-Key ax_your_api_key" \
-H "Content-Type: application/json" \
-d '{"service": "api", "namespace": "production"}'
Returns 202 Accepted with the execution ID.
Webhook Trigger (CI/CD, External Systems)
Trigger any workflow from external systems using the webhook endpoint:
curl -X POST https://api.argonix.io/api/0.1/webhooks/argos/workflow/{workflow_slug}/ \
-H "Authorization: Api-Key ax_your_api_key" \
-H "Content-Type: application/json" \
-d '{"message": "Deploy to production completed for api v2.3.1"}'
The AI extracts required variables from the message field. You can also pass structured JSON:
curl -X POST https://api.argonix.io/api/0.1/webhooks/argos/workflow/post-deploy-check/ \
-H "Authorization: Api-Key ax_your_api_key" \
-H "Content-Type: application/json" \
-d '{"service": "api", "version": "2.3.1", "environment": "production"}'
→ See Webhook Triggers for CI/CD integration patterns.
Schedule Trigger (Cron)
Set a cron expression on the workflow to run it automatically:
{
"schedule": "0 9 * * 1-5"
}
This runs the workflow every weekday at 9:00 AM.
Alert Rule Trigger
Notification rules can trigger workflows when monitors go down. See Alerts & Incidents for auto_investigate and auto_remediate options.
Workflow Executions
Every workflow run produces a WorkflowExecution object:
| Field | Description |
|---|---|
status |
pending, running, completed, failed, cancelled |
input_data |
Input parameters used |
step_results |
Results of each step (output, duration, errors) |
error_message |
Error if the workflow failed |
started_at / completed_at |
Timing |
# List executions for a workflow
curl https://api.argonix.io/api/0.1/organizations/{org_id}/argos/workflows/{workflow_id}/executions/ \
-H "Authorization: Api-Key ax_your_api_key"
# List all executions across all workflows
curl https://api.argonix.io/api/0.1/organizations/{org_id}/argos/workflow-executions/ \
-H "Authorization: Api-Key ax_your_api_key"
Related
- Connectors — Workflows use connector actions.
- Webhook Triggers — CI/CD integration.
- Alerts & Incidents — Trigger workflows from alert rules.
- Advanced Use Cases — Real-world workflow patterns.
Call a webhook and analyze its response
Create a Webhook connection with the target URL, headers and, if needed, a Bearer token. Grant write for POST/PUT/DELETE (read is sufficient for GET), and select this connection for the workflow step. The webhook.get, webhook.post, webhook.put and webhook.delete actions return status_code and body; body contains parsed JSON or text limited to 2,000 characters.
By default, a 4xx/5xx response fails the step while retaining its status and body in the output. Set fail_on_http_error to false to pass this response to analysis or branching steps. Network errors and timeouts remain technical failures. A completed step means the response was received; it does not guarantee that the requested business operation succeeded.
[
{
"id": "call_webhook",
"tool": "webhook.post",
"params": {
"payload": {"service": "{{input.service}}"},
"fail_on_http_error": false
},
"on_error": "abort"
},
{
"id": "analyze_response",
"tool": "ai.analyze",
"params": {
"input": "{{call_webhook.output}}",
"prompt": "Evaluate the HTTP status and response body. Determine whether the service is healthy and explain any failure.",
"output_instructions": "Return healthy (boolean), summary (string) and severity (string)."
},
"on_error": "abort"
}
]
A subsequent condition can read {{analyze_response.output.healthy}}. For a deterministic decision, check {{call_webhook.output.status_code}} and fields in {{call_webhook.output.body}} directly. Keep credentials in the connection rather than step parameters.
