Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/pants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,20 @@ jobs:
with:
name: distribution
path: dist/
- name: Push image to quay.io
id: push-to-quay
- name: Push MCP image to quay.io
id: push-mcp-to-quay
uses: redhat-actions/push-to-registry@v2
with:
tags: quay.io/next-gen-ui/mcp:dev
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Push A2A image to quay.io
id: push-a2a-to-quay
uses: redhat-actions/push-to-registry@v2
with:
tags: quay.io/next-gen-ui/a2a:dev
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
# - name: push README to quay.io
# uses: christian-korneck/update-container-description-action@v1
# env:
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,20 @@ jobs:
with:
name: dist
path: dist/
- name: Push image to quay.io
id: push-to-quay
- name: Push MCP image to quay.io
id: push-mcp-to-quay
uses: redhat-actions/push-to-registry@v2
with:
tags: quay.io/next-gen-ui/mcp:latest quay.io/next-gen-ui/mcp:${{github.ref_name}}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Push A2A image to quay.io
id: push-a2a-to-quay
uses: redhat-actions/push-to-registry@v2
with:
tags: quay.io/next-gen-ui/a2a:latest quay.io/next-gen-ui/a2a:${{github.ref_name}}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
publish:
name: "Publish to PyPI"
needs:
Expand Down
12 changes: 12 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@
// "--config-path", "${workspaceFolder}/../ngui_openshift_mcp_config.yaml"
],
},
{
"name": "Python Debugger: A2A Server",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/libs/next_gen_ui_a2a",
"console": "integratedTerminal",
"env": {
"PYTHONPATH": "${workspaceFolder}/libs"
},
"args": [
],
},
{
"name": "Python Debugger: distribution-all",
"type": "debugpy",
Expand Down
5 changes: 5 additions & 0 deletions libs/3rdparty/python/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ python_requirements(
source="rich-requirements.txt",
)

python_requirements(
name="a2a",
source="a2a-requirements.txt",
)

python_requirements(
name="mcp",
source="mcp-requirements.txt",
Expand Down
1 change: 1 addition & 0 deletions libs/3rdparty/python/a2a-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a2a-sdk==0.3.11
61 changes: 61 additions & 0 deletions libs/next_gen_ui_a2a/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This target sets the metadata for all the Python non-test files in this directory.
python_sources(
name="lib",
dependencies=[
"libs/3rdparty/python:a2a",
],
)

# This target sets the metadata for all the Python test files in this directory.
python_tests(
name="tests",
dependencies=[
"libs/3rdparty/python:a2a",
"libs/3rdparty/python:pytest",
],
)

# This target allows us to build a `.whl` bdist and a `.tar.gz` sdist by auto-generating
# `setup.py`. See https://www.pantsbuild.org/docs/python-distributions.
#
# Because this target has no source code, Pants cannot infer dependencies. We depend on `:lib`,
# which means we'll include all the non-test Python files in this directory, and any of
# their dependencies.
python_distribution(
name="dist",
dependencies=[
":lib",
],
provides=python_artifact(
name="next_gen_ui_a2a",
version=env("VERSION"),
license="Apache-2.0",
description="A2A integration for Next Gen UI Agent",
long_description_content_type="text/markdown",
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: Apache Software License",
],
url="https://github.com/RedHat-UX/next-gen-ui-agent",
),
long_description_path="libs/next_gen_ui_a2a/README.md",
generate_setup=True,
)

docker_image(
name="docker",
source="Containerfile",
repository="next-gen-ui/a2a",
image_tags=[env("VERSION"), "latest", "dev"],
registries=[
"quay.io",
],
dependencies=[
":dist",
"libs/next_gen_ui_agent:dist",
"libs/next_gen_ui_rhds_renderer:dist",
],
)
41 changes: 41 additions & 0 deletions libs/next_gen_ui_a2a/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Next Gen UI A2A Server

# Build locally
# pants package ::
#
# Run:
# podman run --rm -it -p 9999:9999 --env A2A_PORT="9999" quay.io/next-gen-ui/a2a:dev
# podman run --rm -it -p 9999:9999 --env NGUI_MODEL="llama3.2" --env NGUI_PROVIDER_API_BASE_URL="http://host.containers.internal:11434/v1" --env NGUI_PROVIDER_API_KEY="ollama" quay.io/next-gen-ui/a2a:dev
FROM registry.access.redhat.com/ubi9/python-312-minimal:9.6

# Set work directory
WORKDIR /opt/app-root/src

# Copy Python Project Files (Container context must be the `python` directory)
COPY --chown=1001:root . /opt/app-root/src/

USER root

# Install next_gen_ui dependencies
RUN pip install \
next_gen_ui_agent*.whl \
next_gen_ui_a2a*.whl \
next_gen_ui_rhds*.whl \
a2a-sdk[http-server] uvicorn langchain_openai


# Allow non-root user to access the everything in app-root
RUN chgrp -R root /opt/app-root/src && chmod -R g+rwx /opt/app-root/src

ENV A2A_PORT="9999"
ENV NGUI_PROVIDER_API_KEY=""
ENV NGUI_PROVIDER_API_BASE_URL=""
ENV NGUI_MODEL="gpt-4o"

# Expose default port (change if needed)
EXPOSE $A2A_PORT

USER 1001

# Run the agent
CMD python -m next_gen_ui_a2a
Loading