invoking-cli-agents

Orchestrate CLI coding agents from Python with execute and stream workflows.

12|3|Updated Mar 29, 2026
One-click install
npx skills add https://github.com/ScottRBK/agent-shell --skill invoking-cli-agents
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: invoking-cli-agents
Source: https://github.com/ScottRBK/agent-shell/tree/main/agent-skills/invoking-cli-agents
Command: npx skills add https://github.com/ScottRBK/agent-shell --skill invoking-cli-agents

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Programmatically invoke and orchestrate CLI coding agents (Claude Code, OpenCode) from Python, enabling multi-agent collaboration, streaming outputs, and session continuity.

Core Features & Use Cases

  • Orchestrate multiple CLI agents from Python, with a unified interface for execute and stream.
  • Manage session resumption via session_id for multi-step workflows.
  • Apply tool scoping (Claude Code only) to restrict agent capabilities and track costs.
  • Example workflow: orchestrate a planning step followed by execution and streaming results.

Quick Start

Instantiate agents via AgentShell and call execute() or stream() to coordinate a CLI agent.

Frequently Asked Questions about invoking-cli-agents

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I invoke CLI coding agents from Python?

You can resume CLI agent sessions in Python by passing a session_id to the adapter, enabling multi-step workflow continuity and conversation tracking across Claude Code and OpenCode.

Can I restrict tool access when orchestrating Claude Code from Python?

You can restrict tool access when orchestrating Claude Code by applying tool scoping with the allowed_tools parameter, limiting agent capabilities and tracking costs during execution.

How do I stream outputs from multiple CLI agents in Python?

You stream outputs from multiple CLI agents in Python by calling the stream() method on AgentShell, which supports real-time output coordination and multi-agent collaboration.

What parameters are available when programmatically executing CLI agents?

Available parameters when programmatically executing CLI agents include session_id, allowed_tools, model, effort, include_thinking, and auto_approve, configurable through the adapter-based workflow.

Does the Python CLI agent orchestration support both Claude Code and OpenCode?

The Python CLI agent orchestration supports both Claude Code and OpenCode through a unified adapter-based interface, allowing execute and stream operations across both platforms.