Axon concepts

Axon is the Mach5 workflow layer for approved action. It lets apps, analysts, and AI agents call external systems, run automations, and perform side effects through one controlled path.

Use Axon when work needs action. Use SQL for read-only analysis. Use ingest pipelines for durable collection.

Axon workflows list

Axon workflow detail

Core model

An Axon workflow is a versioned program with typed input, typed output, local state, control flow, and effects.

ConceptMeaning
WorkflowA versioned unit of work, for example NotifyFinding@v1.
InputThe JSON-compatible value passed to a workflow at start.
OutputThe value returned by the workflow.
StepA statement in the workflow body.
EffectA call to something outside pure local evaluation.
Connector effectAn effect that invokes a Mach5 connector operation.
PolicyA with { ... } object attached to a step or effect to guide approval, retry, timeout, or execution behavior.
RunOne execution of a workflow.

Effects

Effects are the boundary between workflow logic and the outside world. Axon supports built-in effects such as sleep, HTTP, events, child workflows, LLM calls, and connector operations.

The connector effect is the main integration surface:

let result = effect connector {
  connection: "slack-prod",
  operation: "post_message",
  input: {
    channel: input.channel,
    text: input.text
  }
}

The connection name resolves to a configured connector connection. The operation must be exposed with the Axon facet by that connector.

Axon, SQL, and ingest pipelines

Many integrations support more than one surface.

SurfaceUse it forSide effects allowed?
AxonWorkflow actions, approvals, enrichment calls, and controlled external writes.Yes, if the operation exposes an Axon effect.
SQLRead-only lookup, search, inventory, and analysis.No.
Ingest pipelinesDurable collection from source operations.No.

A common data app flow is:

  1. ingest events from GitHub, Okta, Slack, email, or object storage
  2. analyze and enrich with SQL
  3. investigate with AI
  4. use Axon to post a Slack update, open an issue, send email, or perform an approved response

Safety classes

Every connector operation carries safety metadata.

Safety classMeaningExamples
Read-only safeBounded metadata read or validation.validate connection, lookup user, get repository
Read-only expensiveRead that may require pagination or external API cost.list users, search messages, list audit events
Side-effecting lowReversible or low-risk write.post message, add label, create comment
Side-effecting highHigher-impact write.create repository, update policy, rerun workflow
DestructiveRemoves, disables, deletes, archives, or revokes something.delete file, deactivate account, revoke session

Side-effecting and destructive operations should be protected by approval policy in production workflows.

Idempotency

Retries are normal in distributed workflows. Axon effects expose idempotency expectations so an action can be retried without accidentally duplicating external writes.

Read-only effects do not require idempotency. Side-effecting effects may require a caller-provided key. Use stable keys derived from the run, target, and intent.

let issue = effect connector {
  connection: "github-prod",
  operation: "create_issue",
  input: {
    owner: "acme",
    repo: "platform",
    title: input.title,
    body: input.body
  }
} with {
  idempotency_key: `{{ input.finding_id }}:create_issue`
}

Outcomes

An Axon connector effect returns one of four outcomes.

OutcomeMeaning
successThe operation completed and returned output.
pendingThe operation is waiting on external progress and returns a resume token.
retryable_errorThe operation failed temporarily and can be retried, optionally after a delay.
fatal_errorThe operation failed permanently and should not be retried without changing input or configuration.

Agents and approvals

AI agents should use Axon for actions. This gives agents the same controlled path as humans: explicit operations, safety metadata, approvals, idempotency, and a run record.

For syntax and full examples, see Axon syntax.

Analytics Cookies

Help us understand website usage.

Necessary storage remembers your choice. With your consent, Mach5 also uses PostHog analytics to measure website traffic and interactions.

Change this anytime from Cookie Settings in the footer. Privacy Notice.