demo_scripts
Class info¶
🛈 DocStrings¶
Turn scripts of the demo agent that exercise the rest of ACP v2.
background
async
¶
background(agent: DemoAgent, session: DemoSession) -> list[BackgroundWork]
A dev server that keeps running after the turn.
Source code in src/acptui/demo_scripts.py
cancellable_tool
async
¶
cancellable_tool(agent: DemoAgent, session: DemoSession) -> None
A tool call the client can cancel with tool_call/cancel.
Source code in src/acptui/demo_scripts.py
command_permission
async
¶
command_permission(agent: DemoAgent, session: DemoSession) -> None
Permission for a command (instead of a tool call).
Source code in src/acptui/demo_scripts.py
compact
async
¶
compact(agent: DemoAgent, session: DemoSession) -> None
A context compaction with a streamed summary.
Source code in src/acptui/demo_scripts.py
elicit_form
async
¶
elicit_form(agent: DemoAgent, session: DemoSession) -> None
Ask for structured input with a form.
Source code in src/acptui/demo_scripts.py
elicit_url
async
¶
elicit_url(agent: DemoAgent, session: DemoSession) -> None
Ask the user to visit a URL, then report it complete.
Source code in src/acptui/demo_scripts.py
extension
async
¶
extension(agent: DemoAgent, session: DemoSession) -> None
Custom messages: a _ notification and a custom session update.
Source code in src/acptui/demo_scripts.py
media
async
¶
media(agent: DemoAgent, session: DemoSession) -> None
Every kind of content block, in a message and in a tool call.
Source code in src/acptui/demo_scripts.py
notices
async
¶
notices(agent: DemoAgent, session: DemoSession) -> None
Notices of every severity.
Source code in src/acptui/demo_scripts.py
plans
async
¶
plans(agent: DemoAgent, session: DemoSession) -> None
A markdown plan and an item plan that is removed again.
Source code in src/acptui/demo_scripts.py
subagent
async
¶
subagent(agent: DemoAgent, session: DemoSession) -> None
A child session: subagent updates, session messages, its own conversation.
Source code in src/acptui/demo_scripts.py
suggest
async
¶
suggest(agent: DemoAgent, session: DemoSession) -> None
Suggest what to send next.