Skip to content
mentoor

Running agents headless from scripts and CI

For engineers

Running coding agents without a person at the keyboard: shell scripts, CI pipelines and agent SDKs

See where you stand

110 questions across four stages: Understand, Apply, Solve and Judge.

Try 5 questions

Practice items, not counted towards your mastery. No account needed.

Check yourself · 1 of 5

What is the main difference between an interactive agent session and a headless run?

Choose one answer

Check yourself · 2 of 5

Why should a script ask an agent for JSON instead of reading its prose answer?

Choose one answer

Check yourself · 3 of 5

Why is an agent in CI exposed to prompt injection?

Choose one answer

Check yourself · 4 of 5

When is an agent SDK a better fit than a one-shot CLI call?

Choose one answer

Check yourself · 5 of 5

Why set a turn cap on an unattended agent?

Choose one answer

Topics

  1. Non-interactive agent runs from the shell4 min read · Print and exec modes, pre-approved tools, output formats and exit codes for scripted runs
  2. Getting machine-readable results from agent runs4 min read · JSON and streamed output, schemas for the final answer, and validating results before acting on them
  3. Coding agents inside CI pipelines5 min read · Agent actions in GitHub Actions and other CI, triggers, token permissions, secrets and untrusted pull-request text
  4. Building on agent SDKs programmatically4 min read · Claude Agent SDK, Codex SDK and similar: sessions, custom tools and permission callbacks in your own code
  5. Logging, limits and telemetry for unattended runs4 min read · Turn and budget caps, timeouts, saved transcripts and OpenTelemetry metrics for agents nobody is watching

Start here

110 questions · last verified 2026-12