How Praxa Executes Multi-Step Workflows
When you submit a mission, the agent receives yourgoalSpec and plans a sequence of steps that it believes will achieve the goal within the declared resourceBudget. Each step is a traceable unit of work — the agent records what it did, what tool it called, and what result it received before advancing to the next step.
The
maximumParallelism field in resourceBudget controls how many
concurrent branches the agent may execute at once. Setting it above 1
allows the agent to research multiple competitors simultaneously, which
can significantly reduce elapsed time for fan-out workflows.mission.steps when you poll getMission(), giving you a running record of progress even before the workflow completes.
Sending Signals to a Running Mission
Signals let you inject data or instructions into a mission that is still in progress — for example, to provide a user’s choice, supply a value fetched from an external system, or redirect the agent’s focus.
Here is a fuller example that waits until the mission reaches a waiting state before sending a signal:
Streaming Live Progress
ThemissionEvents() async generator yields every server-sent event emitted during the mission’s lifetime. Pipe these events to your front-end via WebSocket or SSE to give users a live view of agent progress.
Cancelling a Workflow
CallcancelMission() whenever you need to stop execution — user request, budget alert, or external policy trigger. The gateway records the cancellation durably and the agent terminates at the next safe checkpoint.
mission.cancelled and closes. If you have an active missionEvents() loop running, it will exit on its own once it receives the terminal event.
Error Recovery
When a mission transitions tofailed, the mission.failed event’s data field contains error details you can inspect to understand what went wrong. To retry the workflow, create a new mission with a fresh idempotency key.
The
PraxaClient automatically retries transient HTTP errors (408, 425, 429,
500–504) on idempotent requests up to three times with exponential back-off.
The error recovery pattern above is for handling missions that reach a
terminal failed status at the application level, not HTTP transport failures.