Add the MCP server panel, and pin the MCP deps it relies on
rohit-sahoo
32ea6e3
The tool servers sleep when idle, and a cold one made the agent look broken with no way
to tell why. The panel opens as a floating overlay beside the model controls — an
accordion pushed the whole page down — and every row carries its own refresh, so waking
one cold server never re-hits the healthy ones. A dot beside the label aggregates status
so a down server is visible without opening anything. Rows paint "Checking…" before the
requests start: a cold server can take ~10s, and without that the header refresh looked
like it did nothing.
Refreshes run with queue=False. The app serializes queued work at concurrency 1, so a
queued refresh would hold the only slot and stall every visitor's chat turn behind it.
fastmcp-slim and mcp are pinned in the same commit because this push triggers a rebuild,
and an unpinned rebuild is what just took MIO down: fastmcp-slim 4.0.0 dropped the
mcp<2.0 cap, pip took mcp 2.x, and 2.x renamed ToolsCapability.listChanged, which
pydantic-ai 2.16.0 still re…
Tell the model the current date on every run
rohit-sahoo
81232b9
Asked about a date or a recent event, the agent answered from its training cutoff
("I don't know, my knowledge ends ...") because nothing ever told it what today is.
That also blocked instructions it already had — resolving "today", "yesterday",
"recent" and "latest" into a real range for the tools.
Appended per request rather than folded into SYSTEM_PROMPT, which is built once at
import: a Space that stays up for days would otherwise keep asserting its boot date.
Not a substitute for the tools — the note also says the training cutoff implies nothing
about what data exists, since coverage and recency come from the tools (granule
coverage, event feeds) rather than from the model.
Make inline code readable: light chip, not Gradio's dark one
rohit-sahoo
88f76f4
Gradio 6 styles inline code as a dark chip, which lands dark-on-dark inside these
light chat bubbles — identifiers the agents return constantly (CMR concept-ids, GIBS
layer names) were effectively illegible. Adopt the light chip the Illustration agent
already used, so all seven render code identically: #3d33ab on #efeefb, measured at
8.09:1 contrast (WCAG AAA). Headings and table cells stay plain, where a chip would
just add clutter; fenced blocks get a light surround with transparent inner code.
Fix collaborator row labels rendering as SMES
rohit-sahoo
23dcc0f
The row-label span was styled text-transform:uppercase, so the label text "SMEs"
rendered as "SMES" — the lowercase plural s cannot survive that transform. Drop the
transform from the row labels only, so they render as written: "SMEs" and
"Implementation Team". The COLLABORATORS heading and the AKD eyebrow keep their
all-caps treatment (the changed style string is unique to _collab_row).
Relabel SME row to SMEs
rohit-sahoo
9c90ef3
The row lists several people, so the plural label reads correctly.
Collaborators: SME / Implementation Team rows; live auto-updating model list
rohit-sahoo
e76839b
Collaborators now follow the MIO Agent layout — an SME row above an Implementation
Team row — instead of one flat list.
Model selection no longer goes stale: the dropdown was a hardcoded list, which is how
it still offered gpt-5.2/5.5 after the GPT-5.6 family (sol/terra/luna) shipped. It now
builds from the visitor's own live catalogue (GET /v1/models), ranked by OpenAI's
created stamp with release tiers kept in order (flagship before the cheaper tiers), so
a new release appears AND becomes the default on its own with no redeploy. An explicit
visitor choice is preserved, AGENT_MODEL still pins, and any failure falls back to the
static list rather than emptying the dropdown. Filtering is a denylist, not an
allowlist, so a future family that drops the gpt- prefix isn't silently hidden.
Reasoning effort gains 5.6's max and ultra depths; previously anything past high was
silently downgraded to medium.
Count visitors in-app (HF exposes no visitor API for Spaces)
rohit-sahoo
0463fb0
Every HF analytics endpoint 404s and the Space API's expand field list has no
views/visitors equivalent, so there is nothing to query — the app counts its own.
Gradio issues a fresh session_hash per page load, so one log line per unseen
session is one visit; the ops dashboard tallies page loads and distinct visitors.
Privacy: the client IP is never logged raw. It is hashed with a salt and truncated
to 10 hex chars — enough to count distinct visitors, non-reversible. The salt comes
from the VISIT_SALT secret (shared across the agents so one person using several
counts once) and falls back to a per-boot random value if unset.
Code Search: collaborators row, About AKD in eyebrow, NASA Science resources, card title
rohit-sahoo
dec214e
Add a 12-person Collaborators row (9 ORCID-linked, 3 name-only) after the h1;
restore the About AKD link into the eyebrow row; reword description to 'curated
NASA Science resources'; HF card title (README) -> 'AKD - Code Search Agent'.
On-page h1 stays 'Accelerated Knowledge Discovery: Code Search Agent'.
Header polish: remove repo slug + Running pill + logo; About AKD in eyebrow row
rohit-sahoo
1aa8d81
Upgrade to pydantic-ai 2.16 + AKD guardrails via harness capabilities
rohit-sahoo
71a6e4c
pydantic-ai 1.81 -> 2.16.0 with pydantic-ai-harness 0.10.0, matching the other
three agents: the manual guard relays become InputGuard(gliguard)/OutputGuard
(risk_agent) capabilities on the Agent; hosted web search moves from
builtin_tools to the WebSearch capability; the three filtered FastMCP servers
move to MCPToolset(StreamableHttpTransport); BuiltinToolCallPart becomes
NativeToolCallPart in the activity stream. Same semantics throughout: input
blocks render as a single bubble with the model never invoked, output blocks
replace the answer and stay out of conversation memory, fail-open when the
guardrails service is unreachable.
Rewrites the backend from the private akd-ext CodeSearchCareAgent to the
artifacts-driven pattern: prompt from artifact/agents.md (the CARE v2 skill
from NASA-IMPACT/akd-plugins), references via a read_reference tool, discovery
tools via the plugin's FastMCP servers, OpenAI hosted web search. Adds AKD
guardrails (gliguard input + risk_agent output) relayed to the guardrails
service. UI unchanged. Public deps only — no build secret.
Soften off-topic decline: warm redirect with tailored examples