Interface: UseAgentChatOptions
Properties
Section titled “Properties”agent:
string
Agent name registered with the agents() plugin (e.g. "assistant",
"helper"). Send-time payload includes this so the plugin routes the
turn to the right AgentDefinition.
endpoint?
Section titled “endpoint?”
optionalendpoint?:string
Override the chat endpoint. Default "/api/agents/chat" matches the
route the agents plugin mounts under its prefix. Useful when the
server mounts under a non-default base path or when proxying.
onEvent?
Section titled “onEvent?”
optionalonEvent?: (event) =>void
Called for every parsed SSE event before any state update. Use this to drive tool-call rows, approval cards, inspectors, or anything beyond the streaming text content. Errors thrown here are swallowed so a buggy handler can’t kill the stream.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
skills?
Section titled “skills?”
optionalskills?:string[]
Known skill names for this agent — typically
getPluginClientConfig("agents").skills?.[agent] mapped to s.name.
A leading /token in a sent message is treated as skill sugar ONLY
when token matches one of these names; anything else is sent
verbatim, so ordinary messages that begin with / (paths, commands
like /tmp is full or /usr/bin/python …) are never mangled. Omit
or leave empty to disable /-prefix sugar entirely.