feat: working TOM agent
This commit is contained in:
29
.agents/plans/iter-02-platform-deployment/steps/step-1.md
Normal file
29
.agents/plans/iter-02-platform-deployment/steps/step-1.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Step 1: the image (E7)
|
||||
|
||||
Built 2026-10-20.
|
||||
|
||||
## What was built
|
||||
|
||||
- **`Dockerfile`.** Two stages. The builder installs the Execution engine from a named build context, `engine`, copying only its `pyproject.toml` and `execution_engine/`. The runtime stage holds `app/`, `agents/`, `providers/` and `skills/` in `/app` and runs `python -m app.main` as a non-root user (10001) on port 8080. The agent is not installed: `ROOT` in `workflow.py` is found from `__file__`, so it must run from its own folder, as the reference agent does.
|
||||
- **Defaults for a container:** `CHECKPOINTER=sqlite` with its files in the `/data` volume, and `ENV_FILE_EXPORT=false`.
|
||||
- **`.dockerignore`:** keeps `.venv`, `.cache`, `.env`, `eval/results`, `deliverables`, tests and plans out of the image.
|
||||
|
||||
```bash
|
||||
podman build --build-context engine=../orchestration_engine -t localhost/agents/tom-analysis:local .
|
||||
```
|
||||
|
||||
## What differed from the plan
|
||||
|
||||
- **Credentials and the non-root user.** The application default credentials file is mode 600, so the image's user cannot read it under rootless podman. The container is run with `--userns=keep-id:uid=10001,gid=10001`, which maps the developer's user onto the image's. The file's mode is not changed.
|
||||
- **Podman ignores `HEALTHCHECK`** in an OCI-format build. The compose entry declares its own (step 3).
|
||||
|
||||
## Verified
|
||||
|
||||
- Neither repository has a commit yet, so "a clean checkout" was taken as the files git would commit (`git ls-files --cached --others --exclude-standard`) of both, copied to an empty folder. The image built from that, and the Workflow loads in it with its five Phases.
|
||||
- The container answers `/health` and both agent card paths; the card advertises `A2A_PUBLIC_URL`. From inside it, the credentials are readable and a Gemini request on Vertex AI answers.
|
||||
- An A2A `message/send` with `pre_approved`, `customer_case` and `scope` in the message metadata reached the engine, which checked the spec. A Customer case that differs from the spec's is refused by name.
|
||||
- 177 tests pass; `ruff` and `mypy` are clean. No Python changed.
|
||||
|
||||
## Not done
|
||||
|
||||
- CI's means, a dependency on the engine's repository at a pinned commit, needs the engine's repository to have a commit to pin.
|
||||
20
.agents/plans/iter-02-platform-deployment/steps/step-2.md
Normal file
20
.agents/plans/iter-02-platform-deployment/steps/step-2.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Step 2: a real-model run through the container
|
||||
|
||||
Run 2026-10-20.
|
||||
|
||||
## What was run
|
||||
|
||||
Evaluation case 01's written spec (`eval/datasets/specs/landing-zone-shared.yaml`), sent to the container from step 1 as one A2A `message/send` with `configuration.blocking: false`, then polled with `tasks/get`. The message metadata carried `pre_approved: true`, `customer_case: bench-landing-zone-shared` and the spec as `scope`. Models were Gemini on Vertex AI with the developer's application default credentials, mounted read-only.
|
||||
|
||||
## Result
|
||||
|
||||
| Minutes | State | Capabilities | People | Scenarios |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| 31.6 | completed | 20 | 5.1 | 13 of 13 pass |
|
||||
|
||||
The task's artifacts were all eleven files: the guide, `scope.yaml` and `scope.json`, operational requirements, capabilities, the Target operating model and its organisation chart, staffing, findings, verdicts and scenarios.
|
||||
|
||||
## What differed from the plan
|
||||
|
||||
- **The Customer case must be the spec's.** The first attempt named another slug and was refused at once: "The scope spec is for bench-landing-zone-shared, and this was started for smoke-01." A caller that sends a spec sends its Customer case with it.
|
||||
- **Postgres.** The engine tries `localhost:5432`, logs a warning and falls back to SQLite in `/data`. Harmless here; a shared deployment sets `DATABASE_URL`.
|
||||
28
.agents/plans/iter-02-platform-deployment/steps/step-3.md
Normal file
28
.agents/plans/iter-02-platform-deployment/steps/step-3.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Step 3: on the platform's network
|
||||
|
||||
Built 2026-10-20.
|
||||
|
||||
## What was built
|
||||
|
||||
In the dev kit (`../modernization-platform/packages/agent-builder-local-dev-kit`), two personal files, excluded from git in that clone's `.git/info/exclude`:
|
||||
|
||||
- **`agents-compose.build.personal.yml`:** `tom-analysis` built from `../../../tom_analysis` with `additional_contexts: {engine: ../../../orchestration_engine}`.
|
||||
- **`agents-compose.personal.yml`:** the container `tom-analysis` on `agent-builder-network`, port `${TOM_ANALYSIS_PORT:-10020}:8080`, `A2A_PUBLIC_URL=http://tom-analysis:8080`, the credentials mounted read-only, named volumes for `/data` and `/app/deliverables`, and its own healthcheck.
|
||||
|
||||
```bash
|
||||
./scripts/compose.sh agents build tom-analysis
|
||||
./scripts/compose.sh agents up tom-analysis
|
||||
```
|
||||
|
||||
The owner registered it in the catalogue from the admin page (Agents, Discover agent, `http://tom-analysis:8080`). It is listed as `target_operating_model_agent`.
|
||||
|
||||
## What differed from the plan
|
||||
|
||||
- **No pod.** podman-compose puts every container in one pod, and podman refuses a per-container user namespace (`keep-id`, step 1) inside a pod. The personal file sets `x-podman: in_pod: false`. Agents reach each other by name on the network, not through the pod.
|
||||
- **The platform calls the address an agent was registered with,** not the A2A interface its card names (`agent_catalog_service.py` sets `endpoint.url` to the discovery URL). The engine served JSON-RPC only at `/a2a`, so every platform call would have been a 404. Chosen by the owner: the engine serves the same handler at `/` as well (`execution_engine/main.py`, with a test in `tests/toy/test_server.py`). The card still names `/a2a`. The platform's choice is worth raising with its team.
|
||||
|
||||
## Verified
|
||||
|
||||
- From the API and workers containers: `/health`, both card paths, and JSON-RPC at `/` and at `/a2a`.
|
||||
- The catalogue record names the agent, its skill and its examples.
|
||||
- The engine: 532 tests pass; `ruff` and `mypy` clean. This agent: 177 tests pass.
|
||||
Reference in New Issue
Block a user