Skip to main content

A lightweight abstraction for executing CLI coding agents headlessly

Project description

Agent Shell

Agent Shell is a light weight abstraction for executing a cli coding agent headlessly and returning the output that can be used programatically as a unified contract

Examples

Execute

from agent_shell.shell import AgentShell
from agent_shell.models.agent import AgentType

shell = AgentShell(agent_type=AgentType.CLAUDE_CODE)

response = await shell.execute(
    cwd="/path/to/project",
    prompt="Can you tell me about this project?",
    allowed_tools=["Read", "Glob", "Grep"],
    model="sonnet",
)

print(response.response)
print(f"Cost: ${response.cost:.4f}")

Stream

from agent_shell.shell import AgentShell
from agent_shell.models.agent import AgentType

shell = AgentShell(agent_type=AgentType.CLAUDE_CODE)

async for event in shell.stream(
    cwd="/path/to/project",
    prompt="Refactor the auth module",
    allowed_tools=["Read", "Edit", "Bash"],
    model="sonnet",
    effort="high",
    include_thinking=True,
):
    print(f"[{event.type}] {event.content}")

Supported CLI Agents:

  • Claude Code
  • OpenCode
  • Gemini CLI
  • Copilot CLI
  • Codex

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_shell_py-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_shell_py-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file agent_shell_py-0.1.0.tar.gz.

File metadata

  • Download URL: agent_shell_py-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agent_shell_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d82e839d91cd9c5a23ac8e677b0525cb94ab77d98de2cbc2074184bd43964874
MD5 18418cbc9d0787e4d090d1abd8cccecf
BLAKE2b-256 6da06dbfd405392ef3c20dbb61188ec25de10e14bbe4fd4a6899a00082b24740

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_shell_py-0.1.0.tar.gz:

Publisher: publish.yml on ScottRBK/agent-shell

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent_shell_py-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agent_shell_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agent_shell_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14a12b7f18d6455eade092e55bc77ec7999207379dff6bcfe282953043324561
MD5 babe2e00bc07cd0bd223c1296bcd7c77
BLAKE2b-256 b716728cf96081d7e3c340bea1159345d2723405c7a1ecad01b13dbc4885b761

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_shell_py-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ScottRBK/agent-shell

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page