bots-garden/sidekickspublic Fork
⑂ release/v1.5.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
why-acp.md · 36 lines · 5.3 KBmarkdown
Blame HistoryOpen raw

Why Sidekicks speaks ACP — explanation

What is this about?

Sidekicks is a desktop application to talk with AI agents, for people who are not developers. It does not contain an agent: it is a client that starts agents as separate programs and talks to them with the Agent Client Protocol (ACP), JSON-RPC over the agent's standard input and output. This page explains that choice and what the first contact with real agents taught us. The detailed decisions are in ADR 0001.

Why a protocol rather than an integration

The owner's goal is an application that is agnostic of the agent. Integrating one agent's library would tie Sidekicks to it; speaking a protocol means any agent that implements ACP — mm today, the agents Zed or JetBrains support tomorrow — can be added with three lines of YAML. ACP also already models what a conversation with an agent needs: streamed answers, tool calls, permission requests, cancellation, slash commands.

What the spike learnt from real agents

Reading a specification is not the same as watching an agent. The spike drove the test agents and recorded the traffic (traces). Four findings shape the product:

  • mm speaks ACP version 1. The site already documents a version 2; Sidekicks targets v1 and isolates the protocol in one package so v2 can be added later.
  • mm cannot reload a session. After a restart, Sidekicks must give the agent the context of the conversation again; the agent's memory of the conversation is Sidekicks' job.
  • Skills are slash commands. Garfield's skills arrive as commands, and /idioms Il pleut des cordes. sent as plain text runs the skill. In a channel with several agents, /garfield:idioms … only needs Sidekicks to strip the agent's name and send the rest to Garfield.
  • A small model does not take no for an answer. Refused once, Riker retried the same action forty times in different forms until mm gave up with an error. A permission dialog that only offers "allow" and "reject" leaves a non-technical user facing forty dialogs; hence "never in this conversation" and "stop the agent" (see the wireframe).

Offering tools to the agents

ACP lets a client answer methods of its own (names starting with _), but says nothing about how an agent learns them, nor how a model calls them. mini-me fills that gap with a small protocol, org.mini-me/tools: the client lists its tools, and mm turns each one into a tool of its model, client_<name>. Sidekicks speaks it (issue #90) because only Sidekicks knows some things an agent is asked about: the memory pressure of the computer it shares with the agents, the version of the application, the channel a conversation happens in and who else is there. Offering a tool costs an agent nothing when it does not know the protocol: the list travels in _meta, which ACP tells every agent to ignore when it does not understand it. Sidekicks follows the agent's choice of discovery, read in its file, rather than a setting of its own: the agent's file already says it, and two places to keep in step would drift apart.

Few ACP agents can use these tools. ACP defines how a client answers an extension method, not how an agent finds out which ones exist: discovering a client's tools and handing them to a model is a convention between the two sides, and each agent would need its own. mini-me has one, acp.clientTools, and its documentation describes it as a specification any client can implement; that is the one Sidekicks follows. Claude (claude-agent-acp), Codex (codex-acp), Gemini (gemini --acp) and docker-agent do not discover client tools today: they start and answer as before, without them. If another agent adopts a discovery convention, Sidekicks can answer it with the same tools, since only the way the list is announced differs.

Some tools read Sidekicks' history (issue #91): the list of channels and a search in any of them. An agent already reads the history of the channels it is a member of, since it is told what it has not seen; these tools open the others too. That is deliberate: asking an agent "what did we decide about Lyon last week?" is useful precisely when the decision was taken elsewhere. The user keeps the choice with one setting, agentTools, on by default: off, or a list of the tools offered. It is global rather than per agent because a per-agent list would have to be kept in step with every agent added, for a need nobody has yet; it can come later. The search reads the stored messages one by one, since the store has no text index: a channel's history is small enough for it.

Rejected alternatives

  • Writing the JSON-RPC layer by hand: possible, but the Go SDK by Coder is generated from the official schema, covers every v1 message, and has no dependencies. Owning that code would be cost without benefit.
  • Waiting for ACP v2: no agent we use speaks it yet.
  • Advertising file and terminal access to agents: mm uses its own tools and never asked; it stays a later, optional feature.

How it relates to the rest

Only the internal/acp package will know about ACP; the rest of the application sees Sidekicks' own events (see Architecture). The four test agents and their memory constraints are covered in Memory and local models.

 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
# Why Sidekicks speaks ACP — explanation

## What is this about?

Sidekicks is a desktop application to talk with AI agents, for people who are not developers. It does not contain an agent: it is a **client** that starts agents as separate programs and talks to them with the [Agent Client Protocol](https://agentclientprotocol.com) (ACP), JSON-RPC over the agent's standard input and output. This page explains that choice and what the first contact with real agents taught us. The detailed decisions are in [ADR 0001](../../adr/0001-acp.md).

## Why a protocol rather than an integration

The owner's goal is an application that is **agnostic of the agent**. Integrating one agent's library would tie Sidekicks to it; speaking a protocol means any agent that implements ACP — mm today, the agents Zed or JetBrains support tomorrow — can be added with three lines of YAML. ACP also already models what a conversation with an agent needs: streamed answers, tool calls, permission requests, cancellation, slash commands.

## What the spike learnt from real agents

Reading a specification is not the same as watching an agent. The spike drove the test agents and recorded the traffic ([traces](../../spikes/acp/README.md)). Four findings shape the product:

- **mm speaks ACP version 1.** The site already documents a version 2; Sidekicks targets v1 and isolates the protocol in one package so v2 can be added later.
- **mm cannot reload a session.** After a restart, Sidekicks must give the agent the context of the conversation again; the agent's memory of the conversation is Sidekicks' job.
- **Skills are slash commands.** Garfield's skills arrive as commands, and `/idioms Il pleut des cordes.` sent as plain text runs the skill. In a channel with several agents, `/garfield:idioms …` only needs Sidekicks to strip the agent's name and send the rest to Garfield.
- **A small model does not take no for an answer.** Refused once, Riker retried the same action forty times in different forms until mm gave up with an error. A permission dialog that only offers "allow" and "reject" leaves a non-technical user facing forty dialogs; hence "never in this conversation" and "stop the agent" (see the [wireframe](../../design/04-permission.png)).

## Offering tools to the agents

ACP lets a client answer methods of its own (names starting with `_`), but says nothing about how an agent learns them, nor how a model calls them. mini-me fills that gap with a small protocol, `org.mini-me/tools`: the client lists its tools, and mm turns each one into a tool of its model, `client_<name>`. Sidekicks speaks it (issue #90) because only Sidekicks knows some things an agent is asked about: the memory pressure of the computer it shares with the agents, the version of the application, the channel a conversation happens in and who else is there. Offering a tool costs an agent nothing when it does not know the protocol: the list travels in `_meta`, which ACP tells every agent to ignore when it does not understand it. Sidekicks follows the agent's choice of discovery, read in its file, rather than a setting of its own: the agent's file already says it, and two places to keep in step would drift apart.

Few ACP agents can use these tools. ACP defines how a client answers an extension method, not how an agent finds out which ones exist: discovering a client's tools and handing them to a model is a convention between the two sides, and each agent would need its own. mini-me has one, `acp.clientTools`, and its documentation describes it as a specification any client can implement; that is the one Sidekicks follows. Claude (`claude-agent-acp`), Codex (`codex-acp`), Gemini (`gemini --acp`) and docker-agent do not discover client tools today: they start and answer as before, without them. If another agent adopts a discovery convention, Sidekicks can answer it with the same tools, since only the way the list is announced differs.

Some tools read Sidekicks' history (issue #91): the list of channels and a search in any of them. An agent already reads the history of the channels it is a member of, since it is told what it has not seen; these tools open the others too. That is deliberate: asking an agent "what did we decide about Lyon last week?" is useful precisely when the decision was taken elsewhere. The user keeps the choice with one setting, `agentTools`, on by default: off, or a list of the tools offered. It is global rather than per agent because a per-agent list would have to be kept in step with every agent added, for a need nobody has yet; it can come later. The search reads the stored messages one by one, since the store has no text index: a channel's history is small enough for it.

## Rejected alternatives

- **Writing the JSON-RPC layer by hand**: possible, but the Go SDK by Coder is generated from the official schema, covers every v1 message, and has no dependencies. Owning that code would be cost without benefit.
- **Waiting for ACP v2**: no agent we use speaks it yet.
- **Advertising file and terminal access to agents**: mm uses its own tools and never asked; it stays a later, optional feature.

## How it relates to the rest

Only the `internal/acp` package will know about ACP; the rest of the application sees Sidekicks' own events (see [Architecture](architecture.md)). The four test agents and their memory constraints are covered in [Memory and local models](memory-and-local-models.md).