Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

fix: review fixes for agent kinds in list_bots

leepokaiec74387ba28e
diff --git a/cloud/src/routes/assistant.ts b/cloud/src/routes/assistant.ts
index 9b11e4ae..50d1bfe1 100644
--- a/cloud/src/routes/assistant.ts
+++ b/cloud/src/routes/assistant.ts
@@ -45,17 +45,19 @@ const TOOLS = [
"The user's Codync bots you can message, with their IDs, kinds, specialties and status, also those on the user's " +
"other computers in that computer's network (IDs like reviewer@laptop), where Claude Code sessions and Codex " +
"threads can be offered too. Narrow it with query or kind; it returns at most limit at a time, with next for " +
- "the rest. Without computer, every online computer answers.",
+ "the rest. Without computer, every online computer answers. Rows without kind come from a computer whose " +
+ "Codync is older and doesn't filter by kind.",
inputSchema: {
type: "object",
properties: {
query: { type: "string", description: "Words that must all appear in the bot's name or description." },
kind: {
type: "string",
- enum: ["codync", "claude-code", "codex", "terminal"],
+ enum: ["codync", "claude-code", "codex", "terminal", "other"],
description:
- "Only this kind of agent: codync (Codync bots), claude-code (Claude Code sessions), codex (Codex threads) " +
- "or terminal (a person at a terminal on another computer).",
+ "Only this kind of agent: codync (Codync bots), claude-code (Claude Code sessions), codex (Codex threads), " +
+ "terminal (a person at a terminal on another computer) or other (on a computer whose Codync doesn't say " +
+ "its kind yet).",
},
limit: { type: "integer", minimum: 1, maximum: 50, description: "At most this many (default 20)." },
cursor: { type: "string", description: "next from the previous call, for the rest." },
diff --git a/docs/design/codync-network.md b/docs/design/codync-network.md
index 7c991742..3aa65297 100644
--- a/docs/design/codync-network.md
+++ b/docs/design/codync-network.md
@@ -113,7 +113,7 @@ A computer in several networks runs one node per network, each with its own key,
| Wire | unchanged: old peers keep working | every request names its network |
| Cost | one endpoint (a socket, a relay connection) per network | one endpoint |
- `list_bots` takes `query`, `computer` (`this` for this one), `online`, `kind` (`codync`, `claude-code`,
- `codex`, `terminal`), `limit` and `cursor`, and an unnarrowed
+ `codex`, `terminal`, `other`), `limit` and `cursor`, and an unnarrowed
long list says how many bots each computer has, so a computer with many bots doesn't flood the agent. On one
computer without a network it lists that computer's bots.
diff --git a/docs/features/bot-collaboration.md b/docs/features/bot-collaboration.md
index c6e80b8a..dea65586 100644
--- a/docs/features/bot-collaboration.md
+++ b/docs/features/bot-collaboration.md
@@ -4,7 +4,7 @@ Create two or more bots normally, giving each a clear name, description, project
> Ask Reviewer to inspect the changes in /path/to/project. Have it report bugs without editing files, then summarize its findings for me.
-Every bot receives the built-in `team` MCP server. `list_bots` returns the other visible bots' IDs, descriptions, agents, folders and status. `message_bot(botId, message)` queues a self-contained request and returns at once, so the sender never waits: it ends its turn (or keeps working) and the recipient's final reply comes back to it later as a new turn in its own chat, where it answers you. The same tools work across ACP backends that support MCP servers.
+Every bot receives the built-in `team` MCP server. `list_bots` returns the other visible bots' IDs, kinds, descriptions, agents, folders and status. `message_bot(botId, message)` queues a self-contained request and returns at once, so the sender never waits: it ends its turn (or keeps working) and the recipient's final reply comes back to it later as a new turn in its own chat, where it answers you. The same tools work across ACP backends that support MCP servers.
The host records each exchange as one notice in both chats. Every client shows it as a compact row (centered in the apps, one ` · ` line in the terminal UI), "Messaged [avatar] Owen" in the sender's chat and "Message from [avatar] Egan" in the recipient's, with no request text. In a chat a run of consecutive exchanges with the same peer, in either direction, is one row, "3 messages with [avatar] Owen"; anything else the chat shows (a message, another notice, a card, an exchange with another peer) ends the run, trace entries do not, and the run is marked failed if any exchange failed. Only a failure is marked (danger color and a warning mark). Tapping the row opens a read-only "Egan ⇄ Owen" conversation sheet with the pair's whole history: author-labelled grey bubbles for each request and reply, time separators, "Waiting for Owen…" or the failure detail under a pending or failed exchange. It is laid out like the Full conversation sheet, with the pair as its title and an X to close. Tool details also remain in the trace. There is no additional team setup screen; a lead bot can set up the team itself (see Team management).
@@ -12,9 +12,9 @@ The host records each exchange as one notice in both chats. Every client shows i
When this computer is in a network with the user's other computers, `list_bots` also lists their bots (ids
`name@computer`) and `message_bot` reaches them: the request travels as a letter, runs in that bot's chat on its
-computer, and the reply comes back as the same reply turn. `list_bots` takes `query`, `computer`, `online`, `limit`
-and `cursor`. Notices for such an exchange carry `botMessage.peerName`. Setup, roles and limits:
-[codync-network](codync-network.md).
+computer, and the reply comes back as the same reply turn. `list_bots` takes `query`, `computer`, `online`, `kind`
+(`codync`, `claude-code`, `codex`, `terminal`, `other`), `limit` and `cursor`. Notices for such an exchange carry
+`botMessage.peerName`. Setup, roles and limits: [codync-network](codync-network.md).
## Notice data
diff --git a/docs/features/cloud-assistants.md b/docs/features/cloud-assistants.md
index f2bdb17a..bfea25b1 100644
--- a/docs/features/cloud-assistants.md
+++ b/docs/features/cloud-assistants.md
@@ -26,7 +26,7 @@ ChatGPT / Claude ──MCP over HTTPS──▶ mcp.codync.dev (cloud Worker)
request's `_meta`, `server/discover`) and `initialize` clients (2025-03-26 to 2025-11-25) both work.
- **Tools**: `list_computers` (from the account, answered by the Worker), and `list_bots`, `message_bot`,
`read_replies`, answered by the host (`list_bots` narrows by `query` and `kind`: `codync`, `claude-code`, `codex`,
- `terminal`). With several computers online, a listing asks each; a message needs
+ `terminal`, `other`). With several computers online, a listing asks each; a message needs
`computer` then. `message_bot` returns at once; the bot's reply waits on the host for `read_replies`, since
nothing can wake a hosted assistant.
- **Host** (`host/src/chat/team/assistant.rs`): the assistant messages bots like a bot does
diff --git a/host/crates/network/README.md b/host/crates/network/README.md
index 0a49e112..ceae6bba 100644
--- a/host/crates/network/README.md
+++ b/host/crates/network/README.md
@@ -137,11 +137,11 @@ point two nodes at one folder.
## Use
```rust
-use codync_network::{Address, Agent, Connector, Letter, Node, Reach};
+use codync_network::{Address, Agent, AgentKind, Connector, Letter, Node, Reach};
let (node, mut inbox) = Node::start(dir, &Connector::Public).await?;
node.join(invite, "laptop").await?;
-let coder = Agent { id: "coder".into(), name: "Coder".into(), about: "Writes the code".into() };
+let coder = Agent { id: "coder".into(), name: "Coder".into(), about: "Writes the code".into(), kind: AgentKind::Codync };
node.set_agents([(coder, Reach::App)]);
let to: Address = "reviewer@desk".parse()?;
@@ -152,6 +152,9 @@ while let Some(message) = inbox.recv().await {
}
```
+An agent's `kind` (`AgentKind`: Codync, ClaudeCode, Codex, Terminal, Other) says what it is, so others can pick one
+kind; `set_agents` sets it to ClaudeCode or Codex for a `Reach::ClaudeCode` or `Reach::Codex` agent.
+
`node.changes()` ticks whenever `node.directory()` would show something new (a computer joins or leaves, a role,
name or presence changes, another computer offers different agents), for an app that shows the network live.
diff --git a/host/crates/network/src/bin/codync-network/main.rs b/host/crates/network/src/bin/codync-network/main.rs
index 2c68d7a9..9a12142b 100644
--- a/host/crates/network/src/bin/codync-network/main.rs
+++ b/host/crates/network/src/bin/codync-network/main.rs
@@ -163,9 +163,8 @@ impl Daemon {
"codex" => Reach::Codex { thread: handle.into() },
_ => bail!("an agent is reached through claude or codex"),
};
- // The node makes it a Claude Code or Codex agent from its reach.
- let agent =
- Agent { id: id.into(), name: id.into(), about: about.unwrap_or_default(), kind: AgentKind::Other };
+ let kind = reach.kind().unwrap_or_default();
+ let agent = Agent { id: id.into(), name: id.into(), about: about.unwrap_or_default(), kind };
self.add(LocalAgent { agent, reach })
}
["agents"] => Ok(self.listing()),
diff --git a/host/crates/network/src/node/mod.rs b/host/crates/network/src/node/mod.rs
index a09ec0b0..42ebb8cc 100644
--- a/host/crates/network/src/node/mod.rs
+++ b/host/crates/network/src/node/mod.rs
@@ -10,7 +10,7 @@ use crate::reach::{Held, Reach};
use crate::roster::{self, Change, Role, Roster};
use crate::rules::{self, Rule};
use crate::types::{Address, Connector, Letter, Message, Peer, Sent};
-use crate::wire::{self, ALPN, Agent, AgentKind, Request, Response, Ticket};
+use crate::wire::{self, ALPN, Agent, Request, Response, Ticket};
use anyhow::{Context, Result, anyhow, bail};
use iroh::endpoint::Connection;
use iroh::protocol::Router;
@@ -230,10 +230,8 @@ impl Node {
let before = self.inner.offered();
// A session the network knocks on is the kind its harness is, whatever the app said.
let agents = agents.into_iter().map(|(mut agent, reach)| {
- match reach {
- Reach::ClaudeCode { .. } => agent.kind = AgentKind::ClaudeCode,
- Reach::Codex { .. } => agent.kind = AgentKind::Codex,
- Reach::App => {}
+ if let Some(kind) = reach.kind() {
+ agent.kind = kind;
}
(agent, reach)
});
diff --git a/host/crates/network/src/reach.rs b/host/crates/network/src/reach.rs
index 887c2689..98f376c1 100644
--- a/host/crates/network/src/reach.rs
+++ b/host/crates/network/src/reach.rs
@@ -7,6 +7,7 @@
//! the next message that wakes the agent.
use crate::types::Message;
+use crate::wire::AgentKind;
use anyhow::{Context, Result, anyhow, bail};
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
@@ -32,6 +33,15 @@ pub enum Reach {
}
impl Reach {
+ /// The kind of agent a session the network knocks on is; `None` for the app's own.
+ pub fn kind(&self) -> Option<AgentKind> {
+ match self {
+ Self::App => None,
+ Self::ClaudeCode { .. } => Some(AgentKind::ClaudeCode),
+ Self::Codex { .. } => Some(AgentKind::Codex),
+ }
+ }
+
/// Hands `messages` (held notices first) to the agent's harness.
pub async fn knock(&self, messages: &[Message], reply_command: &str) -> Result<()> {
let text = as_text(messages, reply_command);
diff --git a/host/src/chat/team.rs b/host/src/chat/team.rs
index 159229d6..90255f5b 100644
--- a/host/src/chat/team.rs
+++ b/host/src/chat/team.rs
@@ -52,7 +52,7 @@ pub fn tools() -> Value {
"properties": {
"query": {"type": "string", "description": "Words that must all appear in the bot's name or description."},
"computer": {"type": "string", "description": "Only the bots on the computer with this name (`this`: the one you run on)."},
- "kind": {"type": "string", "enum": ["codync", "claude-code", "codex", "terminal"], "description": "Only this kind of agent: codync (Codync bots), claude-code (Claude Code sessions), codex (Codex threads) or terminal (a person at a terminal on another computer)."},
+ "kind": directory::kind_property(),
"online": {"type": "boolean", "description": "Only bots whose computer can take a message now."},
"limit": {"type": "integer", "minimum": 1, "maximum": 50, "description": "At most this many (default 20)."},
"cursor": {"type": "string", "description": "next from the previous call, for the rest."},
diff --git a/host/src/chat/team/assistant.rs b/host/src/chat/team/assistant.rs
index 22b146ec..eb45e50d 100644
--- a/host/src/chat/team/assistant.rs
+++ b/host/src/chat/team/assistant.rs
@@ -213,10 +213,10 @@ pub fn tools() -> Value {
json!([
{
"name": "list_bots",
- "description": "List the user's Codync bots you can message, with their IDs, specialties and status: this computer's first, then those on the user's other computers (IDs like reviewer@laptop). Narrow it with query or kind; it returns at most limit at a time, with next for the rest.",
+ "description": "List the user's Codync bots you can message, with their IDs, kinds, specialties and status: this computer's first, then those on the user's other computers (IDs like reviewer@laptop), where Claude Code sessions and Codex threads can be offered too. Narrow it with query or kind; it returns at most limit at a time, with next for the rest.",
"inputSchema": {"type": "object", "properties": {
"query": {"type": "string", "description": "Words that must all appear in the bot's name or description."},
- "kind": {"type": "string", "enum": ["codync", "claude-code", "codex", "terminal"], "description": "Only this kind of agent: codync (Codync bots), claude-code (Claude Code sessions), codex (Codex threads) or terminal (a person at a terminal on another computer)."},
+ "kind": directory::kind_property(),
"limit": {"type": "integer", "minimum": 1, "maximum": 50, "description": "At most this many (default 20)."},
"cursor": {"type": "string", "description": "next from the previous call, for the rest."},
}},
diff --git a/host/src/chat/team/directory.rs b/host/src/chat/team/directory.rs
index 130439e8..450f1bd5 100644
--- a/host/src/chat/team/directory.rs
+++ b/host/src/chat/team/directory.rs
@@ -6,6 +6,7 @@ use crate::hub::Hub;
use crate::store::BotConfig;
use anyhow::Result;
use codync_network::{AgentKind, Peer};
+use serde::Deserialize;
use serde_json::{Value, json};
const DEFAULT_LIMIT: usize = 20;
@@ -90,7 +91,7 @@ impl Filter {
words: args["query"].as_str().unwrap_or_default().split_whitespace().map(str::to_lowercase).collect(),
computer: args["computer"].as_str().map(str::to_lowercase),
online: args["online"].as_bool() == Some(true),
- kind: args["kind"].as_str().map(|k| serde_json::from_value(json!(k)).unwrap_or_default()),
+ kind: AgentKind::deserialize(&args["kind"]).ok(),
}
}
@@ -112,6 +113,15 @@ impl Filter {
}
}
+/// The `kind` argument of the tools' `list_bots`, which [`Filter::of`] reads.
+pub(super) fn kind_property() -> Value {
+ json!({
+ "type": "string",
+ "enum": ["codync", "claude-code", "codex", "terminal", "other"],
+ "description": "Only this kind of agent: codync (Codync bots), claude-code (Claude Code sessions), codex (Codex threads), terminal (a person at a terminal on another computer) or other (on a computer whose Codync doesn't say its kind yet).",
+ })
+}
+
/// `limit` rows from `cursor`, with `next` for the rest; an unnarrowed listing that doesn't fit
/// also says how many bots each computer has.
fn page(rows: &[Row], args: &Value, summarize: bool) -> Value {
diff --git a/web/content/docs/cloud-assistants.mdx b/web/content/docs/cloud-assistants.mdx
index 792dc5b6..a6756c20 100644
--- a/web/content/docs/cloud-assistants.mdx
+++ b/web/content/docs/cloud-assistants.mdx
@@ -25,7 +25,7 @@ The assistant opens Codync's sign-in page. Sign in with the account your compute
## What the assistant can do
- **List your computers** and whether each one is online.
-- **List your bots**, with their names, descriptions and status. It can search them by name or description.
+- **List your bots**, with their names, descriptions, status and kind: a Codync bot, a Claude Code session, a Codex thread or a terminal. It can search them by name or description, or list only one kind.
- **Message a bot**: it sends one bot a task, the way one bot asks another for help ([Teamwork](/docs/teamwork)). The bot works on it in its own chat.
- **Read replies**: bots can take a few minutes, so the assistant comes back for the answer, for example when you ask it how the task went.