Port Pallas to the fast-agent 0.9.x Harness API (remove ==0.7.15 pin) #2

Open
opened 2026-07-15 10:51:28 +00:00 by r · 0 comments
Owner

Summary

Pallas is pinned to fast-agent-mcp==0.7.15 as a stopgap (commit 47a9dd9). fast-agent has since shipped through 0.9.9, which performed a major refactor that removes several internal APIs Pallas depends on. Pallas must be ported to the 0.9.x API so it can track upstream again; until then it is frozen ~15 releases back.

Background — why we pinned

Pallas 0.5.x was written against fast-agent 0.7.15 but pinned it unbounded (fast-agent-mcp>=0.7.15). Consumer deploys (kottos, mentor, iolaus) install with pip install --upgrade --force-reinstall, so pip resolved the newest release, 0.9.9, and every consumer crashed at import time:

ModuleNotFoundError: No module named 'fast_agent.core.prompt'

Commit 47a9dd9 changed the pin to fast-agent-mcp==0.7.15 to restore service. That is a freeze, not a fix — this issue tracks the real migration.

What broke in 0.9.9 (verified against a live 0.9.9 install)

Three fast-agent APIs Pallas imports no longer exist in 0.9.9:

Pallas usage 0.7.15 0.9.9
import fast_agent.core.promptPrompt.from_multipart (multimodal_server.py) present gone; Prompt moved to fast_agent.mcp.prompt (same from_multipart(multipart) signature, so a straightforward re-point)
from fast_agent.mcp.server import AgentMCPServer (base class of MultimodalAgentMCPServer) present gone; fast_agent.mcp.server now exports a Harness* family (HarnessMCPAppServer, create_harness_mcp_app_runtime, …) with a different contract
from fast_agent.mcp import mcp_aggregator, mcp_agent_client_session (used by _fastagent_patch.py) re-exported from fast_agent.mcp not re-exported from the package (the .py files still exist under fast_agent/mcp/ but the names aren't surfaced the way Pallas imports them)

All other fast_agent.* symbols Pallas imports still resolve under 0.9.9 — the breakage is concentrated in the server-binding core.

The hard part

MultimodalAgentMCPServer (multimodal_server.py) subclasses AgentMCPServer and overrides exactly two methods:

  • register_agent_tools — the images / history / conversation_id bridge that makes Pallas a stateless per-request server
  • _register_health_routes/live, /ready, /metrics, discovery doc

In 0.7.15, AgentMCPServer.__init__ takes (primary_instance, create_instance, dispose_instance, instance_scope, server_name, …, get_registry_version, reload_callback, tool_name_template). The 0.9.x HarnessMCPAppServer replaces this with a different construction/lifecycle model. Porting means re-expressing both overrides against the new API — this is not a mechanical rename.

_fastagent_patch.py reaches into mcp_aggregator / mcp_agent_client_session internals for bearer-token forwarding across the anyio TaskGroup boundary; that patch will likely need reworking against the new module layout too.

Scope / checklist

  • Re-point Prompt import to fast_agent.mcp.prompt (multimodal_server.py:26,50)
  • Port MultimodalAgentMCPServer from AgentMCPServer to the 0.9.x HarnessMCPAppServer API (both overridden methods)
  • Rework _fastagent_patch.py bearer-forwarding against the new fast_agent.mcp internals
  • Re-validate the other ~12 fast_agent.* imports still behave (they resolve, but confirm semantics haven't shifted — e.g. RequestParams, PromptMessageExtended, ToolRunnerHooks, ModelDatabase/ModelParameters)
  • Bump the pin to a bounded 0.9.x range (e.g. >=0.9,<0.10) — never leave it unbounded again
  • Test the full runtime on a throwaway host, not just imports: registry /live + /ready, an agent send_message with history + images, and Kernos bearer forwarding
  • Re-stage + redeploy kottos / mentor / iolaus (mentor is the immutable v0.2.0 tag; all vendor pallas_rel: main)
  • Stopgap pin: commit 47a9dd9
  • Consumers on psamathe.helu.ca (Virgo dev): kottos (up on 0.7.15), mentor + iolaus (need first deploy from Fornax — oci_secret rendering)
## Summary Pallas is pinned to `fast-agent-mcp==0.7.15` as a stopgap (commit `47a9dd9`). fast-agent has since shipped through **0.9.9**, which performed a major refactor that removes several internal APIs Pallas depends on. Pallas must be ported to the 0.9.x API so it can track upstream again; until then it is frozen ~15 releases back. ## Background — why we pinned Pallas 0.5.x was written against fast-agent **0.7.15** but pinned it unbounded (`fast-agent-mcp>=0.7.15`). Consumer deploys (kottos, mentor, iolaus) install with `pip install --upgrade --force-reinstall`, so pip resolved the newest release, **0.9.9**, and every consumer crashed at import time: ``` ModuleNotFoundError: No module named 'fast_agent.core.prompt' ``` Commit `47a9dd9` changed the pin to `fast-agent-mcp==0.7.15` to restore service. That is a freeze, not a fix — this issue tracks the real migration. ## What broke in 0.9.9 (verified against a live 0.9.9 install) Three fast-agent APIs Pallas imports no longer exist in 0.9.9: | Pallas usage | 0.7.15 | 0.9.9 | |---|---|---| | `import fast_agent.core.prompt` → `Prompt.from_multipart` (`multimodal_server.py`) | present | **gone**; `Prompt` moved to `fast_agent.mcp.prompt` (same `from_multipart(multipart)` signature, so a straightforward re-point) | | `from fast_agent.mcp.server import AgentMCPServer` (base class of `MultimodalAgentMCPServer`) | present | **gone**; `fast_agent.mcp.server` now exports a `Harness*` family (`HarnessMCPAppServer`, `create_harness_mcp_app_runtime`, …) with a different contract | | `from fast_agent.mcp import mcp_aggregator, mcp_agent_client_session` (used by `_fastagent_patch.py`) | re-exported from `fast_agent.mcp` | **not re-exported** from the package (the `.py` files still exist under `fast_agent/mcp/` but the names aren't surfaced the way Pallas imports them) | All other `fast_agent.*` symbols Pallas imports still resolve under 0.9.9 — the breakage is concentrated in the server-binding core. ## The hard part `MultimodalAgentMCPServer` (`multimodal_server.py`) subclasses `AgentMCPServer` and overrides exactly two methods: - `register_agent_tools` — the images / `history` / `conversation_id` bridge that makes Pallas a stateless per-request server - `_register_health_routes` — `/live`, `/ready`, `/metrics`, discovery doc In 0.7.15, `AgentMCPServer.__init__` takes `(primary_instance, create_instance, dispose_instance, instance_scope, server_name, …, get_registry_version, reload_callback, tool_name_template)`. The 0.9.x `HarnessMCPAppServer` replaces this with a different construction/lifecycle model. Porting means re-expressing both overrides against the new API — this is not a mechanical rename. `_fastagent_patch.py` reaches into `mcp_aggregator` / `mcp_agent_client_session` internals for bearer-token forwarding across the anyio TaskGroup boundary; that patch will likely need reworking against the new module layout too. ## Scope / checklist - [ ] Re-point `Prompt` import to `fast_agent.mcp.prompt` (`multimodal_server.py:26,50`) - [ ] Port `MultimodalAgentMCPServer` from `AgentMCPServer` to the 0.9.x `HarnessMCPAppServer` API (both overridden methods) - [ ] Rework `_fastagent_patch.py` bearer-forwarding against the new `fast_agent.mcp` internals - [ ] Re-validate the other ~12 `fast_agent.*` imports still behave (they resolve, but confirm semantics haven't shifted — e.g. `RequestParams`, `PromptMessageExtended`, `ToolRunnerHooks`, `ModelDatabase`/`ModelParameters`) - [ ] Bump the pin to a bounded 0.9.x range (e.g. `>=0.9,<0.10`) — **never leave it unbounded again** - [ ] Test the full runtime on a throwaway host, not just imports: registry `/live` + `/ready`, an agent `send_message` with `history` + `images`, and Kernos bearer forwarding - [ ] Re-stage + redeploy kottos / mentor / iolaus (mentor is the immutable `v0.2.0` tag; all vendor `pallas_rel: main`) ## Related - Stopgap pin: commit `47a9dd9` - Consumers on `psamathe.helu.ca` (Virgo dev): kottos (up on 0.7.15), mentor + iolaus (need first deploy from Fornax — `oci_secret` rendering)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: r/pallas#2