host-code-execution

Executes shell, Python, and Node.js commands on the connected A0 CLI host machine.

19.1k|3.8k|Updated Jun 10, 2024
One-click install
npx skills add https://github.com/agent0ai/agent-zero --skill host-code-execution
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: host-code-execution
Source: https://github.com/agent0ai/agent-zero/tree/main/plugins/_a0_connector/skills/host-code-execution
Command: npx skills add https://github.com/agent0ai/agent-zero --skill host-code-execution

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When Agent Zero runs inside Docker, it cannot directly touch your real computer. This Skill guides safe use of the code_execution_remote tool so the agent can run terminal commands, Python, and Node.js on the machine where the A0 CLI is connected, without confusing the host with the container.

Core Features & Use Cases

  • Host-side runtimes: Run terminal, python, or nodejs code on the CLI host with persistent numbered sessions, plus output polling and reset recovery for stuck sessions.
  • Access mode awareness: Respects CLI-side toggles, distinguishing Read&Write access (mutating runtimes allowed) from Read-only access (mutating runtimes blocked).
  • Clear boundaries and failure handling: Directs browser requests to the browser tool instead of shell launchers, and explains exactly what to tell the user when no CLI is connected, execution is disabled, or a request times out.
  • Use Case: Ask the agent to list files in a local project folder on your laptop; it runs the command through the CLI host's terminal session rather than inside the Docker container.

Quick Start

Ask the agent to run a shell command on your local computer using the connected A0 CLI host.

Frequently Asked Questions about host-code-execution

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

FAQPage Schema
How do I run terminal commands on my local machine from Agent Zero?

Connect the A0 CLI on your local machine to the Agent Zero instance, then ask the agent to run the command. It uses code_execution_remote with runtime=terminal so the command executes on the CLI host, not inside the Docker container.

How do I run Python or Node.js code on the host instead of Docker?

Use code_execution_remote with runtime=python or runtime=nodejs. Reuse the same integer session number to keep state across calls, since session state lives in the CLI frontend on the host.

Why does remote code execution say it is disabled or no client is connected?

Remote execution can be turned off in the A0 CLI, or no CLI may be connected to the instance. Connect the CLI to this Agent Zero instance and enable remote execution in the CLI settings before retrying.

Why are mutating runtimes blocked in read-only mode?

When local file access is set to Read only, the CLI blocks mutating runtimes like terminal, python, and nodejs. Switch local file access to Read&Write with F3; runtime=output and runtime=reset still work for existing sessions.

Can I open a browser page on the host using shell commands?

No. Shell launchers like xdg-open, open, start, or webbrowser.open must not be used for browser requests. Use the browser tool instead, and follow its Chrome remote-debugging consent instructions if prompted.