Skip to Content
🎉 Scout Docs 2.0 is here!
WorkflowsRunning Workflows

Running Workflows

Scout workflows run from three places: the Console for development, the API or SDK for production systems, and integrations like Copilot and Slack when configured.

Console (fastest for development)

Open Console by clicking the play icon in the workflow canvas. Type an input, hit run, and see each block’s output in real time.

Use Console to:

  • Confirm your input payload shape before wiring up a real system
  • Spot errors in individual blocks without deploying anything
  • Test edge cases quickly during active development

See Console for a full debug loop walkthrough.

API

Trigger a workflow run from any backend service or automation.

curl -X POST "https://api.scoutos.com/v2/workflows/{workflow_id}/execute?environment=production" \ -H "Authorization: Bearer $SCOUT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "user_message": "Generate a weekly summary" }, "streaming": false }'

The response includes the run ID, status and your workflow’s output fields:

{ "run_id": "run_abc123", "status": "success", "outputs": { "response": "Here is your weekly summary..." }, "duration_ms": 1240 }

SDK

The Python and TypeScript SDKs wrap the API with type safety and streaming support.

Python:

from scoutos import Scout client = Scout(api_key="YOUR_API_KEY") result = client.workflows.execute( workflow_id="workflow_id", inputs={"user_message": "Generate a weekly summary"}, environment="production", ) print(result.outputs["response"])

TypeScript:

import { ScoutClient } from "scoutos"; const client = new ScoutClient({ apiKey: "YOUR_API_KEY" }); const result = await client.workflows.execute("workflow_id", { inputs: { user_message: "Generate a weekly summary" }, environment: "production", }); console.log(result.outputs.response);

Streaming

For long-running workflows or LLM output, use streaming to get tokens as they arrive instead of waiting for the full response.

Python:

stream = client.workflows.execute_stream( workflow_id="workflow_id", inputs={"user_message": "Generate a weekly summary"}, ) for chunk in stream: print(chunk.delta, end="", flush=True)

TypeScript:

const stream = await client.workflows.executeStream("workflow_id", { inputs: { user_message: "Generate a weekly summary" }, }); for await (const chunk of stream) { process.stdout.write(chunk.delta ?? ""); }

Integrations

Workflows also run through Copilot and Slack when those integrations are configured. The integration handles the trigger and input routing — you don’t call the API directly in these cases.

Environments

Always pass an explicit environment when calling via API or SDK:

EnvironmentWhen to use
developmentActive building and debugging
stagingPre-production validation
productionLive user traffic

See Environments for how to promote revisions across stages.

Next Steps

  • Console: Test quickly in the workflow UI
  • Environments: Deploy safely across stages
  • Logs: Inspect run status, duration and failures

Built with ❤️ by Scout OS

Last updated on