Skip to content

Agent Configuration (scion-agent.yaml)

The scion-agent.yaml file acts as the blueprint for an agent. It defines the environment, resources, and harness configuration required to run the agent.

  • Templates: .scion/templates/<template-name>/scion-agent.yaml
  • Active Agents: .scion/agents/<agent-name>/scion-agent.yaml
FieldTypeDescription
schema_versionstringShould be "1".
default_harness_configstringThe name of the default harness config to use (e.g., gemini, claude).
agent_instructionsstringRole-specific instructions for the agent (harness-agnostic).
system_promptstringThe system prompt to use for the agent (harness-agnostic).
imagestringOverride the container image defined in the harness config.
envmapEnvironment variables to inject into the container.
volumeslistAdditional volume mounts.
detachedboolRun in background (default true).
command_argslistAdditional arguments passed to the harness entrypoint.
task_flagstringCLI flag name for passing the task (e.g., --input). When set, the task is delivered as a flag value instead of a positional argument.
modelstringLLM model identifier override.

Scion automatically appends contextual instructions to the base agent_instructions during provisioning:

  • agents-git.md: Appended if the agent is running in a Git-backed workspace. Provides operational context for git worktree and branch management.
  • agents-hub.md: Appended if the agent is connected to a Scion Hub. Provides instructions for status reporting and Hub API interaction.

These extensions are managed by Scion and do not need to be manually included in your template definition.

FieldTypeDescription
max_turnsintMaximum number of LLM turns before the agent stops. Exceeding this triggers a LIMITS_EXCEEDED state and termination.
max_durationstringMaximum runtime duration (e.g., "2h", "30m"). Exceeding this triggers a LIMITS_EXCEEDED state and termination.
resourcesobjectContainer resource requests/limits (see below).
resources:
requests:
cpu: "500m"
memory: "512Mi"
limits:
cpu: "2"
memory: "2Gi"
disk: "10Gi"

Define auxiliary containers to run alongside the agent (e.g., a headless browser).

services:
- name: browser
command: ["chromium", "--headless"]
env:
DISPLAY: ":99"
ready_check:
type: tcp
target: "localhost:9222"
- name: delayed-job
command: ["./worker.sh"]
ready_check:
type: delay
target: "5s"
FieldTypeDescription
namestringRequired. Service name.
commandlistRequired. Entrypoint and arguments.
restartstringRestart policy: no, always, or on-failure.
envmapEnvironment variables for the service.
ready_checkobjectHealth check to determine if the service is ready.
FieldTypeDescription
typestringtcp, http, or delay.
targetstringHost:port (tcp/http) or duration (delay).
timeoutstringMaximum wait time.

Specify a different Hub endpoint for this agent.

hub:
endpoint: "https://hub.example.com"

Define secrets required by the agent. These follow the same schema as Orchestrator Settings Secrets.

Harness-specific settings for Gemini.

gemini:
auth_selectedType: "vertex-ai"

Override telemetry settings for this template or agent. These merge on top of any telemetry configuration defined in settings.yaml (global or grove scope), using last-write-wins semantics.

telemetry:
enabled: true
cloud:
endpoint: "monitoring.googleapis.com:443"
filter:
events:
exclude:
- "agent.user.prompt"
resource:
service.name: "my-specialized-agent"

See the Orchestrator Settings Reference for the full field reference and the Metrics guide for how telemetry settings merge across scopes.

Overrides for Kubernetes runtimes.

kubernetes:
namespace: "custom-ns"
serviceAccountName: "workload-identity-sa"
runtimeClassName: "gvisor"

When an agent starts:

  1. Template Load: Scion loads scion-agent.yaml from the selected template.
  2. Harness Resolution: It resolves the harness_config against the active profile’s harness_configs map in settings.yaml.
  3. Overrides: CLI flags (e.g., --image, --env) override values in scion-agent.yaml.
  4. Final Config: The resolved configuration is written to the agent’s runtime directory.