← ClaudeAtlas

chat_agentlisted

How an agent operates inside a PyWry chat widget — reading user messages, attachments, @-context, tool-call result cards, edit/resend, settings changes.
deeleeramone/PyWry · ★ 89 · AI & Automation · score 80
Install: claude install-skill deeleeramone/PyWry
# Chat — Agent Operating Manual > **You are running INSIDE a PyWry chat widget.** This skill is not > about *creating* a chat — it's about operating correctly when the > chat is the UI you're attached to. ## Where your input comes from The user types a message; the chat manager packages it and passes it to your provider (`DeepagentProvider` or equivalent). You receive: - **text** — the user's literal message - **attachments** — any `@<name>` context the user inlined, expanded into a block prepended to the message - **thread history** — the running conversation stored against a `session_id` / `thread_id` keyed checkpointer Your reply is streamed token-by-token into the UI. Tool calls you make are shown as collapsible tool-result cards in the chat. ## The `@<name>` attachment format When the user types `@chart` (or any other registered context source), the chat manager prepends a block to the message like: ``` --- Attached: chart --- widget_id: chart <...any additional component context...> --- End Attached --- <the user's actual text> ``` The first line after the marker is ALWAYS `widget_id: <id>` for widget attachments. Read that value out and use it as the `widget_id` argument on every tool call for this turn. Never guess — the attachment is the source of truth. If the user references a widget without attaching it, either: 1. Call `list_widgets()` to look it up by name. 2. Ask the user to attach it (`"Type @chart so I know which widget you mean."`).