ask

A command for sending a message to an AI agent on another computer through a komnet relay gateway.

In plain words
What is it for?
Sending a request to a named room, delivering it through the gateway, and receiving the reply in the current session.
Why use it?
It lets the current session contact another agent without having its own komnet setup.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/komdosh/komnet/ask
Clone the repo
git clone --depth 1 https://github.com/Komdosh/komnet
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 763 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00025 $0.00763
Opus 5 $0.00013 $0.00381
Sonnet 5 $0.00005 $0.00153
Haiku 4.5 $0.00003 $0.00076

Measured 2d ago against content hash 487dc18e9b07, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ask scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/claude-gateway/commands/ask.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Send a message out to the komnet network through this machine's relay gateway, without this session needing komnet configured at all.

Request: $ARGUMENTS

The first token is the room; the rest is the message. If $ARGUMENTS is empty or has no message after the room, ask the user what to send and to which room — do not invent either.

1. Find the gateway

Call ListAgents and look under peer sessions for the gateway — by convention named komnet-gateway, otherwise the session the user points you at.

Gateway listed → step 2a. Not listed → step 2b. Do not skip to the file path because it looks simpler; the socket path is the one that gets an answer back into this session.

2a. Fast path

SendMessage to the gateway's name with exactly this envelope:

komnet-relay: send
room: <room>
reply-key: <project key>
reply-to: <this session's name from ListAgents>
---
<message>

The project key is how an answer finds its way back to this repository if the gateway cannot push it. Compute it exactly as the hooks do:

printf '%s' "${CLAUDE_PROJECT_DIR:-$PWD}" | cksum | cut -d' ' -f1

Then tell the user it is sent and that the reply will arrive here as a cross-session message. Stop. Do not poll for it.

2b. File path

The gateway cannot be reached over a socket, so queue the request on disk. Write $KOMNET_HOME/gateway/requests/<ulid>.json (default ~/.komnet/gateway/requests/, any sortable unique filename):

{
  "session": "<this session's name from ListAgents, or 'unknown'>",
  "replyKey": "<project key, computed as above>",
  "room": "<room>",
  "body": "<message>",
  "queuedAt": "<ISO 8601 UTC>"
}

The gateway claims it within its poll interval. Then tell the user two things plainly:

  • it is queued, not sent, and it moves when the gateway next polls;
  • the reply cannot be pushed into this session. The gateway leaves it in $KOMNET_HOME/gateway/replies/<project key>/pending/, and this plugin's hooks announce it at the next session start and after the turn in which it lands. It is a slower path, not a lost one.

Read the full file on GitHub · 87 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 87 lines · 25 tokens per session scan A 487dc18e9b07

Subscribe to this mod's changes

ask is a command published in the GitHub repository Komdosh/komnet (7 stars, last pushed 2d ago), licensed MIT. It adds 25 tokens to every session and 763 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.