Skip to content

armgit / ax

Public Imported from GitHub
0

Agent Executor (AX) is Google's open agentic orchestration runtime

Go

Add instructions to deploy and test the harness scaffolding (#39)

Jaana Dogan3ac22bde7485
diff --git a/internal/SUBSTRATE_REFACTOR_CLEANUPS.md b/internal/SUBSTRATE_REFACTOR_CLEANUPS.md
index 7eb1c37..93de9f5 100644
--- a/internal/SUBSTRATE_REFACTOR_CLEANUPS.md
+++ b/internal/SUBSTRATE_REFACTOR_CLEANUPS.md
@@ -4,3 +4,5 @@
* Remove axepp.
* Remove ate build tag.
* Remove harnessHandler once Exec RPC is revisited.
+* Introduce a SubsrateHarness that wraps a regular Harness implementation and provides
+ automatic resume and suspension.
diff --git a/internal/manifests/README.md b/internal/manifests/README.md
new file mode 100644
index 0000000..ef0fa8f
--- /dev/null
+++ b/internal/manifests/README.md
@@ -0,0 +1,71 @@
+# AX Harness Deployment on Kubernetes
+
+This directory contains manifests to deploy AX with the `harness` configuration path on Kubernetes using Agent Substrate.
+
+---
+
+## Deploying
+
+Make sure your target environment variables are exported:
+
+```bash
+export PROJECT_ID="ax-substrate" # Your GCP project ID
+export GEMINI_API_KEY="your-api-key"
+export BUCKET_NAME="snapshot-substrate-test-$PROJECT_ID"
+export KO_DOCKER_REPO="gcr.io/$PROJECT_ID/ate-images"
+export KO_DEFAULTPLATFORMS="linux/amd64"
+```
+
+Render the template variables and apply the resolved manifest:
+
+```bash
+sed -e "s|\${GEMINI_API_KEY}|${GEMINI_API_KEY}|g" \
+ -e "s|\${BUCKET_NAME}|${BUCKET_NAME}|g" \
+ internal/manifests/ax-deployment2.yaml \
+ | GOFLAGS="-tags=harness" ko apply -f -
+```
+
+Use the following command for initial deployment:
+
+```bash
+kubectl apply -f ax-deployment2.yaml
+```
+
+If you have a deployment and rolling out a new version, you can do:
+
+```bash
+kubectl delete pods -l app=ax-server -n ax
+kubectl delete workerpool ax-harness-workerpool -n ax
+kubectl delete actortemplate ax-harness-template -n ax
+```
+
+Wait until all pods are up and running:
+
+```bash
+kubectl get pods -n ax
+```
+
+---
+
+## Testing the Deployment
+
+Proxy the `ax-server` ReplicaSet port to your local environment:
+
+```bash
+kubectl port-forward -n ax rs/ax-server 8494:8494
+```
+
+Execute a query against the local port-forwarded server using the `ax` CLI:
+
+```bash
+ax exec --server localhost:8494 --input "hello"
+```
+
+The server should respond with:
+```text
+Conversation: fb344a18-3720-4c4f-8a6e-2ce34db975b3
+
+⏺ hello
+
+Hello world
+```