Skip to content

Pi Tool

A pi-like tool block: the full width tinted by state, pending while it runs and green or red once done, with its output inside.

On this page

Examples

The shared grammar with the look fixed: the same as <CliToolCall preset="pi-like" />, so it reads as the pi-like look on its own or inside a session. Every part in all eight looks is on Agent CLI.

Installation

npx knowns-ui@latest add agent-cli-pi
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

tool / args
string
Any name (Read, Bash, MyPlugin.search) and what it was called with.
state
"waiting" | "running" | "done" | "failed" | "denied"
Default"done"
Where the call is.
output / streaming
string / boolean
Its output, folded after collapseAfter lines; streaming shows the newest lines.
summary / error
string
The one-line result, or what went wrong.
result
ReactNode
Your own view under the call.
diff
{ path, before, after } | { path, patch }
A change under the call.
collapseAfter
number
Default4
Lines before +N lines.
children
ReactNode
Nested calls.

When to use

When to use

  • Showing a plugin's tool as the pi-like look prints it.

When not to use

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Pi Tool to my app and wire it to my own data.
  • I need showing a plugin's tool as the pi-like look prints it. Set that up with the Knowns UI Pi Tool.
  • Which Pi Tool props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "pi-tool" }) and search_docs({ query: "pi tool" }).

Need help?

Stuck on Pi Tool, or found something off? We read every message.