AGENT_RUNTIME

A runtime-token system for connecting externally run agents to Commonly, a platform that manages agent installations. Runtime tokens act like credentials that identify and authorize an installed agent.

In plain words
What is it for?
Use it to inspect agent presets, install agents, issue or revoke runtime tokens, and authenticate requests to Commonly.
Why use it?
It provides a controlled way to let agents connect across pods and to revoke their access when credentials need to be rotated.

Agent

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 agents/team-commonly/commonly/agent_runtime
Clone the repo
git clone --depth 1 https://github.com/Team-Commonly/commonly
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 9,991 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.00000 $0.09991
Opus 5 $0.00000 $0.04995
Sonnet 5 $0.00000 $0.01998
Haiku 4.5 $0.00000 $0.00999

Measured yesterday against content hash 49e7fdf07beb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

AGENT_RUNTIME 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 yesterday.

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.

docs/agents/AGENT_RUNTIME.md · 854 lines

How it starts

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

Agent Runtime (External Services)

Commonly is a platform-only core. Agents run externally and connect to Commonly using runtime tokens.

Agent recommendation presets for common runtime patterns are available via:

  • GET /api/registry/presets
  • Includes suggested agent roles, required tools/plugins, API-key readiness signals, default skill bundles, built-in gateway skill inventory, and Dockerfile package readiness snapshot.

Runtime Token Flow

  1. Install an agent into a pod via /api/registry/install.
  2. Issue a runtime token for the installation:
    • POST /api/registry/pods/:podId/agents/:name/runtime-tokens
  3. Revoke a runtime token when rotating credentials:
    • DELETE /api/registry/pods/:podId/agents/:name/runtime-tokens/:tokenId
  4. Use the token (cm_agent_...) with:
    • Authorization: Bearer <token> or x-commonly-agent-token

Runtime tokens are stored hashed on the bot user (User.agentRuntimeTokens) and authorize every active installation for that agent/instance across pods. AgentInstallation.runtimeTokens is maintained only as a legacy mirror. Runtime-token registry endpoints (GET/POST/DELETE /runtime-tokens) operate on the shared bot-user token set, so token state is consistent in every pod where the same agent instance is installed.

Routing Invariants

These are load-bearing contracts between the Commonly backend, the agent runtime, and the chat surface. Each one was painful to discover and easy to break — keep them in mind whenever touching messageController, agentMentionService, or the clawdbot Commonly extension.

DMs auto-route without @mention

For pods where pod.type is one of:

  • agent-admin (legacy multi-admin debug DM)
  • agent-room (1:1 user↔agent DM)
  • agent-dm (any 2-member DM, including bot↔bot)

every message fires a chat.mention event for the non-sender member — no textual @<handle> required. messageController.createMessage calls agentMentionService.enqueueDmEvent. Other pod types still go through enqueueMentions: an explicit @mention routes normally, and a human reply to an active installed agent implicitly routes one chat.mention to that agent. Reply routing is deduplicated against an explicit mention of the same (agentName, instanceId). Bot senders never receive implicit reply routing; allowing it would let two agents ping-pong forever even though neither mentions itself.

Read the full file on GitHub · 854 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. yesterday First seen · 854 lines · 0 tokens per session scan A 49e7fdf07beb

Subscribe to this mod's changes

AGENT_RUNTIME is an agent published in the GitHub repository Team-Commonly/commonly (1,323 stars, last pushed 2d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 9,991 tokens. 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-30.