Skip to content
pi-c Artifact [f1f3797e34]
Login

Artifact [f1f3797e34]

Artifact f1f3797e34f1432b0e46d97c83b196108fa2de68a659326e448e73ad5f678d1d:


Tools

A reply can call the tools a request offers (--tools, setting defaultTools; see the command line reference). How each call is journaled is in durability. Beside Pi's tools, send_message lets a conversation message another (peers), and wake lets the model start a monitor, or a loop or a goal once you agree, and end a goal (loops).

Parallel tool calls

The tool calls of one reply run at the same time, as in Pi (its toolExecution "parallel", the default). Each call's PreToolUse hooks run first, one call after another in call order; then the calls run together, each in a process forked from pic, and each is journaled as a lone call is: intent, started, result, every step its own short transaction. Results commit as calls finish, but reach the transcript (and the model) in call order. tool_execution_start comes for every call before any runs; tool_execution_update and tool_execution_end come as each call goes. A crash mid-batch is recovered per call: a started command becomes unknown and is never run again, a started read, write or edit runs again, and a finished call keeps its one result. Esc, Ctrl-C and the RPC abort abort every running call. Calls on the same file wait for each other in call order when either changes it (Pi queues only edits and writes to one file; pic also keeps a read of that file in its place). pic settings toolExecution sequential (or Tool execution in /settings) runs the calls one by one instead. A codemode script's calls run the same way.

Web fetch

web_fetch {url, max_chars} reads a public web page: pic does the request itself (its own HTTP and TLS, nothing to install), and the model gets text. It is on by default; --exclude-tools web_fetch or -web_fetch leaves it out, and the offline setting refuses it, saying so.

The call is a GET, so after a crash a call that had started runs again. PreToolUse hooks and the secret guard see it like any tool call, so a hook can refuse a URL (hooks).

web_search {query, count} searches the web. The model sees one tool by that name; what answers it depends on the model:

The setting webSearch is auto (the provider's when it has one) or brave (always Brave, which spends nothing on the provider's meter). The provider's search is used only when pic can decide beforehand: in ask-all and read-only the call is Brave's, which permission modes ask about or refuse as they do web_fetch, since pic cannot ask before a call the provider makes itself. Under those two modes search therefore needs a Brave key; with none, the tool says so and the model has no search. offline and --exclude-tools web_search (or -web_search) turn both off, and the tool is offered when a Brave key exists or a provider with its own search has a key; --tools +web_search offers it regardless (without either it says how to add a key).

pic's own web_search asks Brave Search and returns a numbered list: a title, the address and a short snippet for each result. The model reads a page it likes with web_fetch.

The query leaves your machine for Brave, so permission modes count the call as a change: ask-all asks, read-only refuses. A call that had started runs again after a crash. PreToolUse hooks and the secret guard see it like any tool call (the hook name is WebSearch; the provider's own searches are not calls pic runs, so hooks do not see them).

Search ignores nothing

grep, find and the file lists behind @ completion and file pickers (the RPC command list_files) return files that .gitignore, .ignore, .fdignore, .zitignore, .fslignore and the ignore-glob settings list. Those files keep files out of commits; they do not keep them out of what the agent can look at, so the tools' descriptions no longer say "Respects .gitignore". Version-control folders (.git, .zit, _FOSSIL_, .fslckout) are not project files and stay out. Pi's limits and result text are unchanged.

To keep something from the agent, list it in a .picignore: gitignore syntax, in any folder, and a nested one covers only its own folder. It is read by grep, find and list_files, and nothing is left out unless one says so. The same rule will apply to full-text search. Differences from Pi lists this.

A file another conversation changed

When several pics work in one project, two conversations can change the same file. pic does not merge. It knows from the journal which conversation edited or wrote which file, and tells the agent when it meets another's change: one made while this pic was running the request, after this conversation last read, edited or wrote the file.

Changes made by commands (bash) are not tracked, nor are changes made while this conversation was idle. With one pic at a time none of this happens, forks included, and the tools behave as Pi's.