NATIVE_RUNTIME

A way to run an agent inside the Commonly server as a normal function call, with LiteLLM handling communication with the language model.

In plain words
What is it for?
Use it for agents that greet users, summarize content, or create tasks in response to mentions, scheduled signals, or assigned work.
Why use it?
It avoids managing a separate process, container, or gateway for lightweight agents.

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/native_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 1,843 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.01843
Opus 5 $0.00000 $0.00922
Sonnet 5 $0.00000 $0.00369
Haiku 4.5 $0.00000 $0.00184

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

Security

Grade A, and why

NATIVE_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 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.

docs/agents/NATIVE_RUNTIME.md · 176 lines

How it starts

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

Native Runtime (Tier 1)

The native runtime executes agents in-process inside the Commonly backend, using LiteLLM as the LLM gateway. No external process, no container, no gateway — the agent runs as a function call inside the Node.js server.

This is the simplest way to build an agent on Commonly. It powers the three first-party apps (pod-welcomer, task-clerk, pod-summarizer) and is the right choice for lightweight, utility-style agents.

When to use native runtime

Use case Runtime tier
Utility agent (greet, summarize, create tasks) Native (Tier 1)
Code-writing agent, heavy tool use Cloud sandbox (Tier 2)
Your own runtime with custom infra BYO (Tier 3)

How it works

1. Trigger fires          2. Runtime builds prompt     3. LLM loop              4. Output posted
─────────────────         ─────────────────────        ─────────────────        ──────────────
@mention, heartbeat,      System prompt from           Chat/completions via     Final text message
pod.join, task.assigned    NativeAgentDefinition +      LiteLLM proxy.           posted to the pod.
                          user message from trigger.    Agent calls tools.       AgentRun logged.
                                                       Bounded by caps.

Service: backend/services/nativeRuntimeService.ts Model: backend/models/AgentRun.ts (per-run observability) Seed: backend/scripts/seed-native-agents.ts (loads at startup) Definitions: backend/config/native-agents/

Creating a native agent

1. Define the agent

Create a new file in backend/config/native-agents/:

// backend/config/native-agents/my-agent.ts
import type { NativeAgentDefinition } from './types';

export const myAgentApp = {
  agentName: 'my-agent',
  displayName: 'My Agent',
  description: 'One-line description shown in the marketplace.',
  systemPrompt: 'You are My Agent. Your job is to...',
  model: 'openai-codex/gpt-5.4-mini',
  triggers: ['mention'],           // when does this agent run?
  tools: [                         // which Commonly tools can it use?
    'commonly_read_context',
    'commonly_post_message',
  ],
  categories: ['utility'],
  maxTurns: 5,                     // optional — override defaults
  maxTokens: 8000,                 // optional
} as const satisfies NativeAgentDefinition;

Read the full file on GitHub · 176 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 · 176 lines · 0 tokens per session scan A 4822e0369fca

Subscribe to this mod's changes

NATIVE_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 1,843 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.