mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-18 13:03:58 +00:00
Improve documentation: README settings table, philosophy section, custom-tools intro, rpc hook_error event, hooks import aliases
This commit is contained in:
parent
5e5bdadbf9
commit
3424550d21
12 changed files with 155 additions and 2319 deletions
|
|
@ -1,6 +1,24 @@
|
|||
# Custom Tools
|
||||
|
||||
Custom tools extend pi with new capabilities beyond the built-in read/write/edit/bash tools. They are TypeScript modules that define one or more tools with optional custom rendering for the TUI.
|
||||
Custom tools are additional tools that the LLM can call directly, just like the built-in `read`, `write`, `edit`, and `bash` tools. They are TypeScript modules that define callable functions with parameters, return values, and optional TUI rendering.
|
||||
|
||||
**Example use cases:**
|
||||
- Ask the user questions with selectable options
|
||||
- Maintain state across calls (todo lists, connection pools)
|
||||
- Custom TUI rendering (progress indicators, structured output)
|
||||
- Integrate external services with proper error handling
|
||||
- Tools that need user confirmation before proceeding
|
||||
|
||||
**When to use custom tools vs. alternatives:**
|
||||
|
||||
| Need | Solution |
|
||||
|------|----------|
|
||||
| Always-needed context (conventions, commands) | AGENTS.md |
|
||||
| User triggers a specific prompt template | Slash command |
|
||||
| On-demand capability package (workflows, scripts, setup) | Skill |
|
||||
| Additional tool directly callable by the LLM | **Custom tool** |
|
||||
|
||||
See [examples/custom-tools/](../examples/custom-tools/) for working examples.
|
||||
|
||||
## Quick Start
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue