Saltearse al contenido
Developer Preview — APIs and language features may change before 1.0

ask

Esta página aún no está disponible en tu idioma.

The ask step invokes external reasoning: an LLM, a symbolic planner, or any governed reasoning provider. It is the primary way machines think.

Variants

ask has three forms depending on how the reasoning provider is specified:

FormSyntaxPurpose
ask ... usingask name using "provider:model"Specify the model directly
ask ... fromask name from: "@mashin/actions/..."Delegate to an effect machine
ask ... ofask name of "agent-name"Ask another agent

Basic syntax

ask classify using "anthropic:claude-sonnet-4-6"
with task
"Classify this email by urgency and category."
returns
category as text
urgency as number

How it works

  1. The runtime evaluates the context and task blocks to build the prompt
  2. A governance directive is emitted (the reason capability must be allowed)
  3. The reasoning provider processes the request
  4. The response is parsed into the returns schema
  5. The result is available as steps.{name}.{field}

Governance

Every ask step emits a governance directive before execution. The machine must declare the reason capability in its ensures > permissions section:

ensures
permissions
allowed to
reason

Without this permission, the governance pipeline denies the step.

Step type

ask steps have step type :reason in the execution trace and ledger events.

See also