chat_agent

Solid

How an agent operates inside a PyWry chat widget — reading user messages, attachments, @-context, tool-call result cards, edit/resend, settings changes.

AI & Automation 93 stars 7 forks Updated 6 days ago Apache-2.0

Install

View on GitHub

Quality Score: 79/100

Stars 20%
66
Recency 20%
100
Frontmatter 20%
40
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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."`). ...

Details

Author
deeleeramone
Repository
deeleeramone/PyWry
Created
5 months ago
Last Updated
6 days ago
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category