Index of every page on this site: llms.txt
All skills
Run it yourself

The cluster LLM gateway — 24 models with per-token metering against a $5 free credit. Use when the user wants to chat with or route work to specific models (GPT-6 Astra, the model 4, GPT-5.6 Terra, Kimi K3, DeepSeek V4 Pro, Qwen, GLM, MiniMax, Gemini), enable extended thinking/reasoning for hard problems, pick the cheapest model for a task, check remaining credit, or integrate completions programmatically via REST or the Python SDK.

  • 1 file
  • 4.2 KB
  • MIT
  • Updated 2 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/clusteragent/cluster/llm-gateway

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈113 tokens for metadata: the name and description. ≈922 when used: this file.

Description uses 5.6% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈450 characters, or 5.6%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Cluster LLM Gateway

24 models, one endpoint, metered per token against the wallet's credit ($5 free). Same shape as [OI] — swap the base URL and key.

Models

curl "https://clusteragent.dev/api/chat/models"
→ { "models": [
    { "id": "openai/gpt-6-astra",     "label": "GPT-6 Astra",       "group": "Frontier",  "context": 400000 },
    { "id": "anthropic/…",            "label": "the model 4",       "group": "Reasoning", … },
    { "id": "openai/gpt-5.6-terra",   "label": "GPT-5.6 Terra",     "group": "Frontier",  … },
    { "id": "google/gemini-3.8-flash","label": "Gemini 3.8 Flash",  "group": "Fast",      … },
    { "id": "deepseek/deepseek-v4-pro","label": "DeepSeek V4 Pro",  "group": "Reasoning", … },
    { "id": "moonshot/kimi-k3",       "label": "Kimi K3",           … },
    { "id": "glm/glm-5.3-flash",      "label": "GLM 5.3 Flash",     … },  # cheapest
    … 24 total
]}

Pricing is USD per 1M tokens (in / out) — included in the models response. Pick the cheapest model that handles the task; reserve Frontier models + thinking for genuinely hard problems.

Chat

curl -X POST "https://clusteragent.dev/api/chat" \
  -H "Content-Type: application/json" \
  -d '{
    "wallet": "0xUSER",
    "model": "openai/gpt-6-astra",
    "thinking": true,
    "messages": [{"role":"user","content":"Analyze NVDA momentum for a swing entry"}]
  }'

Response:

{ "reply": "…",
  "model": "openai/gpt-6-astra",
  "usage": { "prompt_tokens": 812, "completion_tokens": 640, "cost_usd": 0.0041 },
  "credit": { "remaining_usd": 4.9959 } }

Thinking Mode

"thinking": true inserts a rigor directive and doubles the token budget — the model works step-by-step, considers multiple approaches, self-checks before answering. Use for: valuation, route analysis, multi-constraint decisions, code that touches money. Skip for lookups and rewrites (2× cost, no benefit).

Auth: either a fresh wallet signature / 60-minute session token, or an API key (clst_...) via the api_key field for external callers. Rate limit 30/min.

Credits

curl "https://clusteragent.dev/api/chat/credits?wallet=0xUSER"

Reserve-then-true-up accounting: worst-case cost is committed before the gateway call so concurrent requests can't overdraw; actual usage reconciles after. Top-ups not open yet — the $5 grant is the only credit source.

Python SDK

pip install cluster-agent
from cluster import Cluster
c = Cluster(api_url="https://clusteragent.dev", api_key="clst_...")

r = c.chat(
    "Draft a one-page thesis on the PONS ecosystem",
    model="anthropic/…",
    thinking=True,
)
print(r["reply"], r["usage"]["cost_usd"])

Conversation Memory

Pass conversation_id to group turns server-side (each project = one id):

{ "wallet": "0x…", "conversation_id": "proj-1734", "messages": [...] }

Grouped turns are queryable via GET /api/chat/conversations?wallet=… (wallet-authenticated — titles are derived from user content, so it's private). For cross-session knowledge (not just transcripts), use the memory skill's memory_retain / memory_recall — or the Hindsight backend for learning memory.

Model Selection Guide

Task Model class
Quick lookups, formatting, rewrites glm/glm-5.3-flash (cheapest)
Code, structured extraction Terra / Kimi class
Financial analysis, multi-step reasoning Frontier + thinking: true
Long documents (100k+) models with 400k context

Metering is per-token against the wallet — the same credit powers chat in the app, MCP tool calls, and API-key integrations.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at be307d1. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 2 months ago
What it can do
Reads files Runs commands
metadata
{
  "author": "clusteragent",
  "version": "1.0.0"
}
All 3 allowed tools
ReadBash(curl:*)Bash(pip:*)

README badge

README badge for clusteragent/cluster/llm-gateway