Skip to main content

A CLI tool to browse, search, and run ACP agents

Project description

ACP Agent CLI & SDK ๐Ÿš€

PyPI version Python versions License: MIT

This project provides a friendly and intuitive CLI and SDK for the ACP Registry, enabling developers to quickly browse, search, run, and containerize ACP (Agent Client Protocol) agents.

Motivation ๐Ÿ’ก

The official ACP Registry provides an extensive list of agents. This project simplifies discovery and integration through three core pillars:

  • Interactive Discovery: Browse and fuzzy-search the entire registry directly from your terminal.
  • Seamless Execution: Run any agent locally with automatic environment setup, or integrate them into Python apps via the async SDK.
  • Production Deployment: Automatically generate optimized Containerfiles to run agents in isolated environments or CI/CD pipelines.

Usage ๐Ÿš€

There are three ways to use acp-agent:

1. CLI Usage

We recommend using uv to manage and run this project.

# List all agents
uvx acp-agent list

# Search for agents
uvx acp-agent search opencode

# Run an agent locally
uvx acp-agent run opencode

# Run with a specific working directory, environment variables, and extra arguments
# Any arguments after the options are passed directly to the agent
uvx acp-agent run opencode --cwd ./my-project -e DEBUG=true -- --help

Example Search Output

Search Results for 'opencode'
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ ID       โ”ƒ Name     โ”ƒ Description                  โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚ opencode โ”‚ OpenCode โ”‚ The open source coding agent โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

2. SDK Usage

You can integrate acp-agent into your Python projects.

import asyncio
from acp_agent import run_local

async def main():
    # Run an agent and attach to its output (stdout/stderr)
    # This will automatically handle downloading and environment setup
    # returns the exit code of the agent
    exit_code = await run_local("opencode", attach=True)
    print(f"Agent exited with code: {exit_code}")

if __name__ == "__main__":
    asyncio.run(main())

3. Container Usage

Generate a Containerfile to run an agent inside ANY container you defined.

import asyncio
from pathlib import Path
from acp_agent import format_containerfile

async def main():
    # Generate Containerfile content for 'opencode'
    # This will inject the agent installation and CMD into your base image
    content = await format_containerfile(
        agent_id="opencode",
        containerfile="FROM python:3.12-slim"
    )
    Path("Dockerfile").write_text(content)

    if __name__ == "__main__":
        asyncio.run(main())

Managing Agent Configuration

For many agents, maintaining configuration and authentication state is crucial. The SDK provides a get_config function that returns the default host paths for an agent's configuration and credentials:

from acp_agent import get_config

if config := get_config("opencode"):
    print(f"Config path: {config.config}") # ~/.config/opencode
    print(f"Credential path: {config.credential}") # ~/.local/share/opencode/auth.json

After starting your container, you can manually copy these files from your host to the container's expected locations (e.g., via docker cp) to fully replicate your host-side environment and authentication state within the isolated container.

License

MIT License

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

acp_agent-0.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

acp_agent-0.1.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for acp_agent-0.1.0.tar.gz
Algorithm Hash digest
SHA256 64d7cd15550fd2d801baa6f1153b949745e04281ea6d525b41bf66d14b48039f
MD5 f23b918c8bfbee5c8ace96773fa1c389
BLAKE2b-256 78d1c68b11565744da59639abdf0d18bfd66bda5cc48d62cf9c2dc10bf4a4c28

See more details on using hashes here.

Provenance

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

Publisher: release.yml on observerw/acp-agent

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

File details

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

File metadata

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

File hashes

Hashes for acp_agent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5d675079eeb40c26a3f37bea9ebd7f1cf75d780e3026acb362e86b3df7523a7
MD5 0e42e1589b973963eb80d826fd6f251c
BLAKE2b-256 202ec539e927d0e31a71b6e10ed22c69a33946c63e160d0f7a9424621eace6d0

See more details on using hashes here.

Provenance

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

Publisher: release.yml on observerw/acp-agent

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