Skip to content

ccmitchellusa/orc-agent-a2a

Repository files navigation

👿‍Orc Agent A2A

Orc Agent A2A is an autonomous agent designed to simulate conversations with an Orc.

Features

  • Orc-speak: Ghazgûl kratak makh-ûrz!

Installation & Setup

  1. Clone the repository:
git clone https://github.com/yourusername/orc-agent-a2a.git
cd orc-agent-a2a
  1. Install dependencies:
uv sync --reinstall

alternatively:

pip install -r requirements.txt

Containerization

Build

docker build --load -t orc-agent:latest .

Deploy to local Podman, Rancher or Docker desktop

docker images ls
  1. Get the image id that was pushed
  2. Now run the image (on local podman)
podman run --rm -it orc-agent:latest

Build and deploy to IBM Cloud container registry

In this example, agentic is your icr NAMESPACE and a2a is your REPOSITORY name. Replace RESOURCE_GROUP with the name of the resource group where you want the container registry.

# Log docker into the IBM Clouf container registry at icr.io
ibmcloud cr login 
ibmcloud cr namespace-add -g RESOURCE_GROUP agentic
# Build the image and push it to the container registry in the 'agentic' namespace and 'a2a' repository.
docker build -f Dockerfile --push -t icr.io/agentic/a2a .

Run from source code in IBM Cloud container engine

  1. Navigate to Containers/Serverless/Projects

  2. Create a project, eg. “A2A-play”

  3. Navigate to “Applications”

  4. Create application Name: pirate-agent-a2a Code repo URL: https://github.com/ccmitchellusa/orc-agent-a2a

  5. Navigate to "Optional settings" Image start options Listening port: 8000

  6. Scroll back up to Code section.

  7. Select “Specify build details” > Next > Next >.

  8. Select a container registry namespace

  9. Select Done

CLI Usage

Start the agent:

./run.sh

Open browser on http://0.0.0.0:8000/agent-card.json to view card JSON.

A2A CLI Usage

To connect with Chris Hay's A2A CLI client (Localhost):

uvx a2a-cli --server http://localhost:8000 chat

Connect a2a-cli to agent running on Code Engine:

  1. In the IBM Cloud console> Code Engine > Application page, click "Test Application" in upper right corner. Copy the app's url.
  2. Replace the url in the following snippet with the actual app's url from step 1:
uvx a2a-cli --log-level DEBUG --server https://application-42.1uo9xqkaspg3.us-east.codeengine.appdomain.cloud chat

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Submit a pull request with a detailed description of your changes.

License

This project is licensed under the MIT License.

Acknowledgments

Special thanks to Chris Hay and the open-source community for providing tools and inspiration for this project.

About

A2A-compliant Orc Agent

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published