bots-garden/sidekickspublic Fork
⑂ release/v1.6.0
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/sidekicks.git
git clone ssh://git@rickub.com/bots-garden/sidekicks.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
use-sidekicks-tools-from-an-agent.md · 56 lines · 4.8 KBmarkdown
Blame HistoryOpen raw

How to let an agent use Sidekicks' tools

This guide shows how to let a mini-me agent (mm) call the tools Sidekicks offers it: the memory pressure of the computer, what Sidekicks is, the channel it is talking in, the list of channels and of agents, and a search in the history of any channel. Few ACP agents can discover the tools of their client; mini-me can, which is why this guide uses it. It assumes the agent is already added (see Add an agent) and started with --acp --config <file>.

Steps

  1. Open the agent's file (agent.yaml) and add, under acp::

    acp:
      clientTools:
        enabled: true
        discovery: meta      # or request
        permissions: auto    # ask: the user allows each call
        timeout: 30s
    
  2. Restart the agent: in Sidekicks, Stop then send it a message, or quit and relaunch Sidekicks. The tools are offered when the agent starts.

  3. Ask it, for instance in #general:

    • @riker what is the memory pressure? — it calls client_memory_pressure;
    • @riker what is Sidekicks? — it calls client_about_sidekicks;
    • @riker which channel are we in, and who is here? — it calls client_current_channel;
    • @riker list the channels — it calls client_list_channels;
    • @riker which agents are there? — it calls client_list_agents;
    • @riker what did we say about Lyon in #general? — it calls client_search_messages with query: Lyon and channel: general.

    The call shows in its answer like any tool call (client: memory_pressure), and in its log ([acp] client tools (meta): … at start).

A model may answer a question it was already asked from its earlier answer instead of calling the tool again; the descriptions of the tools whose result changes (memory, channels, agents, search) tell it to call again each time, and a small model follows that better when its instructions say it too. A small model also calls a tool more readily when its instructions name it: add to its system: a line such as "Call client_current_channel to know where you are and who is there."

Variants

  • Choose the tools offered, or turn them off: in Settings, add to the configuration of Sidekicks

    agentTools:
      enabled: true          # false: no tool at all
      offer:                 # only these; without "offer", all of them
        - memory_pressure
        - current_channel
        - list_agents
    

    then save. The tools are read when an agent starts: a running agent whose tools change shows "restart to apply changes"; restart it. The editor suggests the names after - . An unknown name is shown as a warning.

  • The agent says it has no such tool: open its log (Log in the status bar). At start, Sidekicks writes sidekicks: tools offered (meta): about_sidekicks, current_channel, …, then mm writes [acp] client tools (meta): client_… with the tools it took. A tool missing from the first line is left out by agentTools; from the second only, mm refused it (its stderr says why). If an older log lacks it, the agent was started before the change: restart it. If the log shows it and the agent still denies it, the model overlooked it: name the tool in its system: instructions.

  • The agent searches files with bash instead: a channel named like a folder (documentation) can make a coding agent look for files. Name the channel with # and say "messages": @riker search the messages of #documentation about Kotlin. For a coding agent, add to its system: a line such as "To find what was said in a Sidekicks channel, call client_search_messages, never bash."

  • Keep an agent to its own channels: list_channels lists every channel (the direct conversations are not listed), and search_messages reads every channel and direct conversation (channel: @alice), not only the agent's. Leave them out of offer if that is not wanted.

  • discovery: request: Sidekicks reads the agent's file (the one after --config) to know it, announces the tools only, and gives the list each time the agent opens a session. The file is read on this computer: an agent in a sandbox or a container must have it at the same path, which the assistant's sbx and Docker variants already require.

  • permissions: ask, or auto without yolo: true: each call asks the user first, with the usual permission card (client: <name>).

  • Another agent (Claude, Codex, Gemini, docker-agent): the tools are offered too, but these agents do not discover a client's tools and ignore them; they work as before. Few ACP agents can discover them today: mini-me can (why).

See also

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# How to let an agent use Sidekicks' tools

This guide shows how to let a mini-me agent (`mm`) call the tools Sidekicks offers it: the memory pressure of the computer, what Sidekicks is, the channel it is talking in, the list of channels and of agents, and a search in the history of any channel. Few ACP agents can discover the tools of their client; mini-me can, which is why this guide uses it. It assumes the agent is already added (see [Add an agent](add-an-agent.md)) and started with `--acp --config <file>`.

## Steps

1. Open the agent's file (`agent.yaml`) and add, under `acp:`:

   ```yaml
   acp:
     clientTools:
       enabled: true
       discovery: meta      # or request
       permissions: auto    # ask: the user allows each call
       timeout: 30s
   ```

2. Restart the agent: in Sidekicks, **Stop** then send it a message, or quit and relaunch Sidekicks. The tools are offered when the agent starts.
3. Ask it, for instance in `#general`:
   - `@riker what is the memory pressure?` — it calls `client_memory_pressure`;
   - `@riker what is Sidekicks?` — it calls `client_about_sidekicks`;
   - `@riker which channel are we in, and who is here?` — it calls `client_current_channel`;
   - `@riker list the channels` — it calls `client_list_channels`;
   - `@riker which agents are there?` — it calls `client_list_agents`;
   - `@riker what did we say about Lyon in #general?` — it calls `client_search_messages` with `query: Lyon` and `channel: general`.

   The call shows in its answer like any tool call (`client: memory_pressure`), and in its log (`[acp] client tools (meta): …` at start).

A model may answer a question it was already asked from its earlier answer instead of calling the tool again; the descriptions of the tools whose result changes (memory, channels, agents, search) tell it to call again each time, and a small model follows that better when its instructions say it too. A small model also calls a tool more readily when its instructions name it: add to its `system:` a line such as "Call client_current_channel to know where you are and who is there."

## Variants

- **Choose the tools offered, or turn them off**: in **Settings**, add to the configuration of Sidekicks

  ```yaml
  agentTools:
    enabled: true          # false: no tool at all
    offer:                 # only these; without "offer", all of them
      - memory_pressure
      - current_channel
      - list_agents
  ```

  then save. The tools are read when an agent starts: a running agent whose tools change shows "restart to apply changes"; restart it. The editor suggests the names after `- `. An unknown name is shown as a warning.
- **The agent says it has no such tool**: open its log (**Log** in the status bar). At start, Sidekicks writes `sidekicks: tools offered (meta): about_sidekicks, current_channel, …`, then mm writes `[acp] client tools (meta): client_…` with the tools it took. A tool missing from the first line is left out by `agentTools`; from the second only, mm refused it (its stderr says why). If an older log lacks it, the agent was started before the change: restart it. If the log shows it and the agent still denies it, the model overlooked it: name the tool in its `system:` instructions.
- **The agent searches files with bash instead**: a channel named like a folder (`documentation`) can make a coding agent look for files. Name the channel with `#` and say "messages": `@riker search the messages of #documentation about Kotlin`. For a coding agent, add to its `system:` a line such as "To find what was said in a Sidekicks channel, call client_search_messages, never bash."
- **Keep an agent to its own channels**: `list_channels` lists every channel (the direct conversations are not listed), and `search_messages` reads every channel and direct conversation (`channel: @alice`), not only the agent's. Leave them out of `offer` if that is not wanted.

- **`discovery: request`**: Sidekicks reads the agent's file (the one after `--config`) to know it, announces the tools only, and gives the list each time the agent opens a session. The file is read on this computer: an agent in a sandbox or a container must have it at the same path, which the assistant's sbx and Docker variants already require.
- **`permissions: ask`**, or `auto` without `yolo: true`: each call asks the user first, with the usual permission card (`client: <name>`).
- **Another agent** (Claude, Codex, Gemini, docker-agent): the tools are offered too, but these agents do not discover a client's tools and ignore them; they work as before. Few ACP agents can discover them today: mini-me can ([why](../explanation/why-acp.md#offering-tools-to-the-agents)).

## See also

- What each tool returns, and the protocol: [Tools offered to the agents](../reference/agents-and-events.md#tools-offered-to-the-agents)
- [Why Sidekicks speaks ACP](../explanation/why-acp.md#offering-tools-to-the-agents)