Skip to Content
Technical walkthroughsBuild an Autonomous Agent

Scenario: Build an Autonomous Agent

Technical reference. This page is for integrations, advanced configuration, or platform operations. For portal tasks, start with the user guide.

This scenario uses the current runtime contract for the agent step. The agent behavior is defined in the flow step itself, while governance comes from the release-bound assets around it.

What You’ll Build

A Research Assistant workload that:

  • accepts a topic from the user
  • runs an autonomous agent loop
  • calls approved tools during the loop
  • applies release-bound guardrails
  • records reasoning and evidence for later review

Prerequisites

  • Orqestra running locally with make dev
  • a model_policy asset version available
  • a policy_bundle asset version available
  • optional: a guardrail_config asset version available

If you need to create those supporting assets first, start with Assets, Policies, and Guardrails.

Step 1: Create the Flow

Create a flow that uses the agent step directly:

name: Research Agent Flow description: Autonomous research with governed runtime controls trigger: type: api_request inputs_schema: type: object required: [topic] properties: topic: type: string observability: trace_all: true metrics: [latency, token_count, cost] entry_step: research steps: - id: research type: agent goal: "Research {{trigger.topic}} and produce a concise analysis" system_prompt: "You are a careful research assistant. Prefer grounded, concise answers and cite sources when possible." tools: - github_api - http_request max_iterations: 6 inputs: max_tokens: 800 next: respond - id: respond type: return output: answer: "{{steps.research.output.content}}" tools_called: "{{steps.research.output.tools_called}}" turns_used: "{{steps.research.output.turns_used}}"

Create the flow asset:

orqestractl flow create \ --slug research-agent-flow \ --owner team:research \ --file flow.yaml

Step 2: Create the Workload

orqestractl workload create \ --slug research-assistant \ --owner team:research

Step 3: Create the Release

orqestractl release create --workload $WORKLOAD_ID --environment production --target-lane all

Step 4: Bind The Governed Assets

Bind the assets that make the workload runnable and governable:

orqestractl release bind $RELEASE_ID --asset-version $FLOW_V1 --role orchestration_flow orqestractl release bind-model-policy $RELEASE_ID --asset-version $MODEL_POLICY_V1 orqestractl release bind $RELEASE_ID --asset-version $POLICY_V1 --role policy_bundle

If you want content safety on the agent goal and final answer, also bind:

orqestractl release bind $RELEASE_ID --asset-version $GUARDRAIL_V1 --role guardrail_config

Step 5: Promote The Release

orqestractl release transition $RELEASE_ID --to review_ready orqestractl release transition $RELEASE_ID --to approved orqestractl release transition $RELEASE_ID --to active

Step 6: Exercise The Workload

Run the workload through the portal or through the runtime surface you attach to research-assistant.

Expected behavior:

  1. policy is evaluated first
  2. the agent receives the goal
  3. the agent may call the tools in its tools allowlist
  4. guardrails are applied if guardrail_config is bound
  5. the final answer, reasoning trace, and telemetry are persisted

Step 7: Inspect The Execution

orqestractl execution get $EXECUTION_ID --format json

Look for:

  • reasoning_trace in the agent output
  • tools_called
  • guardrail_event evidence artifacts if guardrails were bound
  • execution-level token and cost telemetry

The inputs.max_tokens value caps the agent step’s completion budget. Omit it only when the release-bound model_policy default is appropriate for every agent turn in the flow; legacy releases may still resolve a model_config binding.

Important Design Note

The current runtime executes the agent step from the flow payload itself. You can still create governed agent assets for versioning and product management, but the runnable execution contract for this scenario is the flow step shown above.

What You Learned

  • how to model an autonomous agent with the current agent step
  • how governance is applied through release bindings rather than extra flow syntax
  • how to inspect the resulting reasoning and evidence trail