running-and-streaming

running-and-streaming is an agent for coding agents from sixb-ai/sixb. It costs 0 tokens per session (2,102 once invoked), scanned A, original, MIT.

A specification for controlling a defined software agent through an HTTP API and receiving its live progress over a WebSocket. A thread is a conversation, and a run is one agent turn.

In plain words
What is it for?
It helps developers list agents, create and manage conversation threads, post messages, read message parts, and stream runs as they happen.
Why use it?
It explains how to start conversations, send messages, follow execution, and retrieve the agent's saved responses and activity.

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/sixb-ai/sixb/running-and-streaming
Clone the repo
git clone --depth 1 https://github.com/sixb-ai/sixb

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for running-and-streaming

README.md
[![agentmods](https://agentmods.dev/badge/agents/sixb-ai/sixb/running-and-streaming.svg)](https://agentmods.dev/agents/sixb-ai/sixb/running-and-streaming)
Your own site
<a href="https://agentmods.dev/agents/sixb-ai/sixb/running-and-streaming"><img src="https://agentmods.dev/badge/agents/sixb-ai/sixb/running-and-streaming.svg" alt="Measured on agentmods" height="20"></a>
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 2,102 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.1 $0.00000 $0.02102
Opus 5 $0.00000 $0.01051
Sonnet 5 $0.00000 $0.00420
Haiku 4.5 $0.00000 $0.00210

Measured yesterday against content hash 893f6aa3f6f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

running-and-streaming 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/running-and-streaming.md · 174 lines

How it starts

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

Running and streaming

A defined agent does nothing until a conversation drives it. You drive it over HTTP — create a thread, post a message, follow the run — and stream the run live over a websocket.

Threads, runs, and messages

  • A thread is one conversation with one agent, owned by a principal. It has a status (active or archived) and an ordered list of messages.
  • A run is one turn. Posting a user message to a thread triggers a run.
  • A message has a role (system, user, assistant) and structured parts: text, reasoning, step-start, tool-call, and file. The assistant message is persisted once the run finishes.

HTTP API

Method Path Purpose
GET /api/agents List agents you can run.
GET /api/agents/:agentId Get one agent.
GET /api/agent-threads List threads (filter by agentId, status).
POST /api/agent-threads Create a thread ({ agentId, title?, threadId? }).
GET /api/agent-threads/:threadId Get a thread.
GET /api/agent-threads/:threadId/messages List a thread's messages.
POST /api/agent-threads/:threadId/messages Post a user message — triggers a run.
GET /api/agent-threads/:threadId/runs List a thread's runs.
POST /api/agent-threads/:threadId/runs/:runId/retry Retry a failed run without adding another user message.
POST /api/agent-threads/:threadId/cancel Cancel the thread's queued or running run ({ runId }).
GET /api/agent-runs/:runId Get a run's status.
GET /api/agent-threads/:threadId/messages/:messageId/files/content Download a file attached to a message.

Trigger a run

There is no separate run-trigger endpoint — posting a message is the trigger. The 202 response returns the canonical durable run:

// POST /api/agent-threads/:threadId/messages   { "text": "Which invoices are overdue?" }
{
  "run": {
    "id": "run_...",
    "threadId": "thr_...",
    "agentId": "accounts",
    "triggerMessageId": "msg_...",
    "requestedBy": { "type": "user", "id": "usr_..." },
    "status": "queued",
    "attempt": 0,
    "streamId": "agents.runs.run_...",
    "createdAt": "2026-07-11T20:00:00.000Z"
  }
}

Read the full file on GitHub · 174 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 Changed · +6 lines 893f6aa3f6f8
  2. 5d ago First seen · 168 lines · 0 tokens per session scan A 8b563e43466c

Subscribe to this mod's changes

running-and-streaming is an agent published in the GitHub repository sixb-ai/sixb (61 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,102 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.