From 307d46a6132b434a254a4a11d3c491194bad55b5 Mon Sep 17 00:00:00 2001 From: rgranadosd Date: Wed, 6 May 2026 17:45:26 +0200 Subject: [PATCH 1/3] Persist local agent chat hotfix in agent-api template --- .../templates/component-types/agent-api.yaml | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/deployments/helm-charts/wso2-amp-platform-resources-extension/templates/component-types/agent-api.yaml b/deployments/helm-charts/wso2-amp-platform-resources-extension/templates/component-types/agent-api.yaml index 0159d6467..7b88590c2 100644 --- a/deployments/helm-charts/wso2-amp-platform-resources-extension/templates/component-types/agent-api.yaml +++ b/deployments/helm-charts/wso2-amp-platform-resources-extension/templates/component-types/agent-api.yaml @@ -68,7 +68,7 @@ spec: items: type: string default: - - "http://localhost:3000" + - "http://localhost:13000" allowMethods: type: array items: @@ -153,10 +153,31 @@ spec: - name: main image: ${workload.container.image} imagePullPolicy: ${environmentConfigs.imagePullPolicy} - command: | - ${has(workload.container.command) ? workload.container.command : oc_omit()} - args: | - ${has(workload.container.args) ? workload.container.args : oc_omit()} + command: + - /bin/sh + - -lc + args: + - | + cat >/tmp/amp_chat_hotfix.py <<'PY' + from pathlib import Path + + p = Path('/workspace/main.py') + text = p.read_text() + old = """# Pydantic model for handling chat input\nclass Question(BaseModel):\n prompt: str\n""" + new = """# Pydantic model for handling chat input\nclass Question(BaseModel):\n prompt: str | None = None\n message: str | None = None\n session_id: str | None = None\n context: dict | None = None\n""" + if old in text: + text = text.replace(old, new, 1) + + old2 = """# Route to chat with OpenAI\n@app.post(\"/chat/\")\ndef ask_openai(question: Question):\n try:\n response = client.chat.completions.create(\n model=\"gpt-4o\",\n messages=[{\"role\": \"user\", \"content\": question.prompt}]\n )\n result = response.choices[0].message.content\n\n # Store chat history in database\n db = SessionLocal()\n db.add(QueryHistory(question=question.prompt, response=result))\n db.commit()\n\n return {\"response\": result}\n except Exception as e:\n raise HTTPException(status_code=500, detail=str(e))\n""" + new2 = """# Route to chat with OpenAI\n@app.post(\"/chat/\")\ndef ask_openai(question: Question):\n try:\n user_prompt = question.message or question.prompt\n if not user_prompt:\n raise HTTPException(status_code=422, detail=\"message or prompt is required\")\n\n response = client.chat.completions.create(\n model=\"gpt-4o\",\n messages=[{\"role\": \"user\", \"content\": user_prompt}]\n )\n result = response.choices[0].message.content\n\n # Store chat history in database\n db = SessionLocal()\n db.add(QueryHistory(question=user_prompt, response=result))\n db.commit()\n\n return {\"response\": result}\n except HTTPException:\n raise\n except Exception as e:\n raise HTTPException(status_code=500, detail=str(e))\n""" + if old2 in text: + text = text.replace(old2, new2, 1) + + p.write_text(text) + print("startup hotfix applied") + PY + /layers/google.python.runtime/python/bin/python3 /tmp/amp_chat_hotfix.py + exec /cnb/process/web resources: requests: cpu: ${environmentConfigs.resources.requests.cpu} From 2d74f190edf689dfdca78aeb48587487e8aa3f4f Mon Sep 17 00:00:00 2001 From: rgranadosd Date: Wed, 6 May 2026 19:37:35 +0200 Subject: [PATCH 2/3] Document external repo used for import testing --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index b35bda9f3..475c0f1b9 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,14 @@ An open control plane designed for enterprises to deploy, manage, and govern AI agents at scale. +## Note About External Repository Import Testing + +To validate agent import and deployment from an external source repository, we used the following public repository as a compatible agent example: + +- https://github.com/kooljo/poc-agent-sdk (branch: main, commit: 8de1694693c4dea1220dbb1397b00a227fd23e98) + +This repository was used to verify integration and automatic deployment of internally hosted agents from source code stored on GitHub. + ## Overview WSO2 Agent Manager provides a comprehensive platform for enterprise AI agent management. It enables organizations to deploy AI agents (both internally hosted and externally deployed), monitor their behavior through full-stack observability, and enforce governance policies at scale. From 4bd2d99bb9bffc1346d8ad13321734ec9d3f200b Mon Sep 17 00:00:00 2001 From: rgranadosd Date: Wed, 6 May 2026 20:43:48 +0200 Subject: [PATCH 3/3] Fix monitor workflow schema for OpenChoreo CRD --- .../workflow-monitor-evaluation.yaml | 92 +++++++++++++++---- 1 file changed, 74 insertions(+), 18 deletions(-) diff --git a/deployments/helm-charts/wso2-amp-evaluation-extension/templates/workflow-templates/workflow-monitor-evaluation.yaml b/deployments/helm-charts/wso2-amp-evaluation-extension/templates/workflow-templates/workflow-monitor-evaluation.yaml index 5748337ed..87e676e38 100644 --- a/deployments/helm-charts/wso2-amp-evaluation-extension/templates/workflow-templates/workflow-monitor-evaluation.yaml +++ b/deployments/helm-charts/wso2-amp-evaluation-extension/templates/workflow-templates/workflow-monitor-evaluation.yaml @@ -15,24 +15,80 @@ spec: # Schema definition for monitor workflows # Note: These parameters are populated by the Go scheduler for each run - schema: - parameters: - monitor: - name: "string | description=\"Monitor unique name\"" - displayName: "string | default=\"\" description=\"Human-readable monitor name\"" - agent: - id: "string | description=\"Agent unique identifier\"" - environment: - id: "string | description=\"Environment unique identifier\"" - evaluation: - evaluators: "string | description=\"JSON array of evaluator configs\"" - llmProviderConfigs: "string | default=\"[]\" description=\"JSON array of LLM provider credentials (envVar/value pairs)\"" - samplingRate: "number | default=1.0 description=\"Sampling rate for traces (0.0-1.0)\"" - traceStart: "string | description=\"Start time for trace evaluation (ISO 8601 format, calculated by scheduler)\"" - traceEnd: "string | description=\"End time for trace evaluation (ISO 8601 format, calculated by scheduler)\"" - publishing: - monitorId: "string | description=\"Monitor UUID for publishing scores\"" - runId: "string | description=\"Run UUID for this evaluation execution\"" + parameters: + openAPIV3Schema: + type: object + required: + - monitor + - agent + - environment + - evaluation + - publishing + properties: + monitor: + type: object + required: + - name + properties: + name: + type: string + description: Monitor unique name + displayName: + type: string + default: "" + description: Human-readable monitor name + agent: + type: object + required: + - id + properties: + id: + type: string + description: Agent unique identifier + environment: + type: object + required: + - id + properties: + id: + type: string + description: Environment unique identifier + evaluation: + type: object + required: + - evaluators + - traceStart + - traceEnd + properties: + evaluators: + type: string + description: JSON array of evaluator configs + llmProviderConfigs: + type: string + default: "[]" + description: JSON array of LLM provider credentials (envVar/value pairs) + samplingRate: + type: number + default: 1.0 + description: Sampling rate for traces (0.0-1.0) + traceStart: + type: string + description: Start time for trace evaluation (ISO 8601 format, calculated by scheduler) + traceEnd: + type: string + description: End time for trace evaluation (ISO 8601 format, calculated by scheduler) + publishing: + type: object + required: + - monitorId + - runId + properties: + monitorId: + type: string + description: Monitor UUID for publishing scores + runId: + type: string + description: Run UUID for this evaluation execution # Rendered workflow resource for WorkflowRun executions # Each WorkflowRun creates a single Workflow (not CronWorkflow)