Commit Graph

14 Commits

Author SHA1 Message Date
1b05504207 feat: forward tool-result images to the MCP caller in send_message results
fast-agent's agent.send() returns only the final assistant text, so
ImageContent produced by downstream tools during the agentic loop
(playwright screenshots, rommie desktop captures) reached the agent's own
vision model but never crossed the MCP boundary — Daedalus and lead agents
saw text-only results.

A per-request after_tool_call hook (pallas.image_passthrough, same
composition pattern as assistant_stream / loop_guard) collects every
ImageContent block from the turn's tool results; send_message then returns
a FastMCP ToolResult of [final text, *images]. Turns with no images return
the plain string — wire shape unchanged (the str-only output schema is
dropped so the union return passes through cleanly; no consumer read
structuredContent). Images cascade hop-by-hop up delegation chains with no
extra wiring: verified live playwright → dolores → harper → MCP client,
image intact at each hop.

New per-agent agents.yaml knob max_result_images (default 8, keeps most
recent, 0 disables) and pallas_result_images_total counter. Version 0.7.0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-01 22:47:25 -04:00
b38d4b1c69 feat: upgrade fast-agent-mcp to 0.7.22, add Fable 5 / Opus 4.8 Mantle wire names
Bumps the runtime from 0.7.15 to 0.7.22 (last 0.7.x release). All five
monkey-patched surfaces (MCPAgentClientSession.send_request/call_tool,
MCPAggregator._execute_on_server/_create_session_factory/call_tool),
ToolRunnerHooks, and both AnthropicConverter private methods patched by
mantle_shims were verified unchanged in signature at 0.7.22.

Adds claude-opus-4-8 and claude-fable-5 to MANTLE_WIRE_NAMES; both are
natively known to fast-agent's ModelDatabase as of 0.7.17+ (1M context).

58/58 tests pass; server/patch modules import cleanly on 0.7.22.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 06:34:12 -04:00
4809d781ff feat: deployment-level no_shell policy (agents.yaml no_shell: true)
fast-agent auto-activates its shell execute tool on any agent with
skills configured, and Context.no_shell — the only opt-out — has no
constructor or config knob. Add install_no_shell(), a wrapper on
fast_agent.context.initialize_context that stamps no_shell=True on
every context, installed from server.main() when the deployment's
agents.yaml sets a truthy top-level no_shell: key. Skill loading via
read_skill is unaffected. Default behaviour unchanged for deployments
without the key.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 14:03:23 -04:00
47a9dd92ea fix: pin fast-agent-mcp==0.7.15 to match the 0.7.15-era API
pallas 0.5.0 targets fast-agent 0.7.15 but pinned it unbounded
(>=0.7.15). Deploys install with --upgrade --force-reinstall, so pip
pulled 0.9.9, whose major refactor removed fast_agent.core.prompt,
fast_agent.mcp.server.AgentMCPServer (the MultimodalAgentMCPServer base
class), and the mcp_aggregator/mcp_agent_client_session re-exports —
crashing every consumer (kottos, mentor, iolaus) at import time.

Pin exactly until pallas is ported to the 0.9.x Harness* API.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 14:21:05 -04:00
e29669304b Release 0.5.0: Upgrade to Fast Agent 0.7.15 2026-06-05 13:21:49 -04:00
febd4b4062 chore: bump version to 0.4.1 2026-05-28 15:37:42 -04:00
d387650bf2 Rel: 0.3.0 Stream intermediate messages 2026-05-28 06:11:52 -04:00
440f7fb60c feat: add per-agent loop safeguards for tool-call turns
Introduce three optional per-agent config fields to bound tool-call loop
execution: `max_iterations` (default 15), `streaming_timeout` (default
120s), and `turn_timeout` (default 300s wall-clock).

- Plumb limits from agent config through `_build_agents_table` and
  `_start_agent` into `MultimodalAgentMCPServer` via `request_limits`
- Apply `max_iterations` and `streaming_timeout` to `RequestParams`
- Wrap turn dispatch in `asyncio.wait_for` to enforce `turn_timeout`,
  logging a warning on timeout
- Document the new fields in README
2026-05-27 05:41:08 -04:00
ca7d714a31 docs(pallas): document sampling parameters and Prometheus metrics
Add two new sections to the Pallas documentation:

- Sampling parameters: explain that temperature/top_p/top_k are
  configured via the fast-agent decorator's `request_params`, with a
  provider support matrix and a note on Claude Opus 4.7 stripping these
  params in favor of `output_config.effort`.
- Metrics: document the Prometheus `/metrics` endpoint exposed on the
  registry port, including scrape config, full metrics reference table,
  and notes on where each metric is captured.
2026-05-23 07:49:21 -04:00
6fcdb509df Release 0.2.1 fixes LLM API Status Error 2026-05-17 19:09:34 -04:00
75d529cf16 docs: update Mantle setup to reflect automatic shim detection 2026-05-12 11:16:22 -04:00
95fa6e6fc0 feat!: stateless per-request agents; add history + conversation_id to send_message
Make Pallas truly stateless per the 'Pallas is ephemeral' contract.

BREAKING (behavioural, not API):
  * instance_scope changes from 'shared' to 'request' in pallas.server.
    Each MCP tools/call now acquires a freshly-created fast-agent instance
    via the existing create_instance / dispose_instance factories and
    disposes it immediately after the response.

With 'shared' mode:
  * Every MCP caller saw the same agent.message_history, so different
    Daedalus conversations leaked into each other.
  * Mid-chat context was silently truncated once the model window filled.
  * Restarting the Pallas process wiped all in-flight conversation state,
    even though Daedalus had it persisted in Postgres.

With 'request' mode the Pallas process holds no per-conversation state;
the caller (Daedalus) owns history and reseeds it on every turn.

send_message gains two optional arguments:
  * history: list[{role, content, images?}] in chronological order,
    converted to PromptMessageExtended and seeded onto the fresh
    instance's message_history before agent.send().
  * conversation_id: opaque string, logged for trace correlation only —
    Pallas never interprets or persists it.

Malformed history entries (bad role, missing image data/mime_type, etc.)
are skipped with a warning rather than raising, so a single bad row
cannot wipe a whole conversation.

The {agent}_history MCP prompt is still registered under 'request'
scope for backward compatibility but always returns []; history lives
on the client.

Version bumped to 0.2.0.
2026-04-27 08:16:59 -04:00
0cea5ece3a feat: add /healthz and /metrics endpoints, replace print with logging
- Add /healthz endpoint returning LLM provider validation status
- Add /metrics endpoint serving Prometheus metrics via prometheus_client
- Replace all print() calls in health.py with proper logging module
- Remove _PREFIX variable in favor of structured logger context
2026-04-10 11:22:26 +00:00
9092afb532 Initial commit: pallas package extracted from mentor 2026-04-02 12:41:53 +00:00