Strata Docs

Agent Jobs

What Is an AgentDefinition?#

An AgentDefinition is a named connection between Strata and a deployed agent in OpenClaw. It stores the sessionKey — the string identifier that routes every job execution to your specific agent instance. Once an AgentDefinition is linked to a service, Strata will automatically trigger a new job for that agent each time an order is created for that service.

End-to-End Setup#

  1. Create an OpenClaw account and deploy your agent

    Sign up at openclaw.ai, create a new agent project, and deploy it. Your agent must be in a running state before Strata can route jobs to it.

  2. Copy the sessionKey from OpenClaw

    In your OpenClaw dashboard, open the agent details panel and copy the sessionKey value. It is shown as a short alphanumeric string — copy it exactly, including any uppercase letters. This value is immutable once the agent is deployed.

  3. Open AgentDefinitions in Strata Settings

    In Strata, navigate to Settings > Agent Definitions. This page lists all AgentDefinitions registered under your account.

  4. Create a new AgentDefinition and paste the sessionKey

    Click New, enter a recognisable display name for the agent (e.g. "Blog Writer v2"), then paste the sessionKey exactly as copied from OpenClaw. Save the definition. Strata validates the format but cannot verify connectivity until a test run is triggered.

  5. Link the AgentDefinition to a service

    Open the target service, go to the Agent Delivery tab, and select the AgentDefinition from the dropdown. Save the service. From this point, every new order for this service will automatically enqueue a job against the linked agent.

  6. Run a test job and verify delivery output

    Go to Agent Jobs > Test Run and initiate a test execution. Open the order detail view and watch the Delivery panel. Streaming output should begin appearing within 30 seconds. If the panel remains empty after 30 seconds, re-check the sessionKey for typos or casing errors.

Job Statuses#

Every Agent Job moves through a defined set of statuses. The table below describes each status, when it is set, and what it means for the operator.

NameTypeRequiredDescription
pendingstringNoThe job has been created and is waiting to be picked up by the agent runner. Set automatically when the order is created and an AgentDefinition is linked to its service.
runningstringNoThe agent is actively processing the job. Streaming output is being written to the Delivery panel in real time. No operator action is needed while a job is in this state.
completedstringNoThe agent finished successfully. The full output is available in the Delivery panel and the order can be reviewed and marked as delivered by the operator.
failedstringNoThe agent encountered an unrecoverable error during execution. An errorMessage is stored on the job record. The operator can inspect the message in the job detail view and trigger a manual retry.
abortedstringNoThe job was stopped before completion, either by an operator action or by the system (e.g. timeout). Partial output may be visible in the Delivery panel but should not be treated as a complete result.

Delivery Panel#

The Delivery panel appears in the order detail view the moment a job enters the running state. Text is streamed in real time as the agent writes output, so the operator can follow progress without refreshing the page. The full output remains visible after the job completes, giving the operator a permanent record of what the agent produced before the delivery is posted to the client.

Chat Surface#

While a job is in the running state, a chat input is available at the bottom of the Delivery panel. The operator can type a message and send it directly to the active agent session. This allows mid-execution guidance — for example, redirecting the agent if early output reveals a misunderstanding of the brief. Messages sent after the job has completed or failed are not forwarded to the agent.

Intake Data as Agent Context#

When a job is enqueued, Strata passes the full intakeData JSON from the order as the agent's initial context. This means the agent receives every field the client submitted in the intake form — project name, description, deadlines, and any custom fields defined on the service — without any additional configuration. The agent's prompt can reference these values directly, making it straightforward to personalise output per order.

Services

Learn how to create and configure services, including the Agent Delivery tab where AgentDefinitions are linked.

Learn more →

Orders

Understand the full order lifecycle and how Agent Jobs relate to order status transitions.

Learn more →

Intake Forms

Build the intake forms whose field data is passed as context to every agent job.

Learn more →