Skip to content

The assistant can search the web and be asked as a persona (M3c) - #61

Merged
davior merged 1 commit into
mainfrom
claude/beautiful-wright-og4xur
Nov 4, 2026
Merged

davior merged 1 commit into
mainfrom
claude/beautiful-wright-og4xur

Conversation

@davior

@davior davior commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Summary

GAM's half of M3c (web search and personas in the assistants; GVC's is a separate PR). No suite change was needed: the suite already served web search and personas to apps and applied a persona_id in chat. Merging this changes nothing until the assistant is used (it only exists with AI_BACKEND=suite).

  • web_search, a looking tool. The assistant can search the web for what the library can't say (who someone is, what a term means). The suite runs it (its own search backend, else DuckDuckGo), called as GAM for the person and credited to the conversation (subject_ref). What comes back is numbered text for the model to read and cite, capped at one page of results. It never writes: the assistant's rule that only Apply changes the library is untouched, and its prompt now says to use the web sparingly, say where a fact came from, and never present something from the web as if it were in the asset. A failed search is a result the model reads, not a failed turn.
  • Personas. A turn can be asked as one of the suite's personas, chosen in a picker above the message box that appears only when the suite has some. The suite applies the persona's system prompt first and its model for chat.assistant in place of the routed one; this app only names it.
    • The persona is kept on the turn row (new nullable column, migration e8c41a7b2d56), so a turn a restart reruns is asked as the same persona. It belongs to the turn: the next message is asked as whatever the picker then says.
    • GET /api/assistant/personas returns only what a picker shows (id, name, description, avatar), never a system prompt, and is empty for any reason at all (none made, the suite down, not in suite mode), so a missing picker is never an error.
    • A persona deleted in the suite since it was chosen is dropped from the picker's state on the next load, so it isn't sent again. One the suite refuses mid-turn ends that turn with the suite's own sentence.

Test plan

  • cd backend && pytest -q: 1543 passed (7 new: the search end to end (as GAM for the person, credited to the conversation, results numbered, library untouched), a failed search read by the model, an empty query never reaching the suite, the picker without prompts, no personas when none/down/local, a persona sent to the suite and kept per turn, a refused persona's sentence; plus the migration test covers the new column).
  • cd frontend && npm run format:check && npm run lint && npm test && npm run build: 479 tests passed (5 new).
  • CI green, including the Docker image build.
  • A real search and a real persona against a real suite. Not run here: everything is against a faked suite. (To try it: make a persona on the suite's side first.)

Deployment

Merging and redeploying changes nothing until you ask the assistant something.

  1. Before pulling: nothing; the suite needs no change. To use personas, create one in the suite (for GAM or for every app).
  2. Configuration: nothing new.
  3. Deploy: rebuilds the backend and the frontend; the server needs outbound access to github.com for the client:
    git pull origin main
    docker compose up --build -d
    docker compose ps
    curl -f http://localhost:${APP_PORT}/api/health
  4. Migration: e8c41a7b2d56 (add_assistant_persona) runs on container start and adds one nullable column, persona_id, to assistant_turn. Existing turns read as "no persona". It downgrades by dropping the column; nothing needs backing up first.
  5. Other apps: none.
  6. Verify: open the assistant and ask "who is Giordano?". It searches the web (a step says so), answers citing where, and offers no change to the library. With a persona made in the suite, a picker appears above the message box; ask as it, and the suite's Usage shows the call under GAM.
  7. Roll back: the previous commit (the column is harmless if left).


Generated by Claude Code

…ersonas

web_search is a looking tool like the others: the suite runs the search and credits it to
the conversation, and what comes back is for the model to read and cite, never a write.
A failed search is a result the model reads, not a failed turn. A turn may be asked as one
of the suite's personas, chosen in a picker that appears only when the suite has some.
The persona is kept on the turn row, so a turn a restart reruns is asked as the same one,
and the suite applies its prompt and model; this app only names it. The personas endpoint
returns only what a picker shows, never a system prompt, and is empty for any reason at all.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1geD2ELWgL2sDpxYbx3Aw
@davior
davior marked this pull request as ready for review November 4, 2026 04:37
@davior
davior merged commit 1b779c0 into main Nov 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants