Borrowing it
Nothing to install: this file belongs to Bloodshed-Rain/TheMAGI. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Bloodshed-Rain/TheMAGI/main/.claude/agents/llm-orchestrator.mdgit clone --depth 1 https://github.com/Bloodshed-Rain/TheMAGIWrote 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.
[](https://agentmods.dev/agents/bloodshed-rain/themagi/llm-orchestrator)<a href="https://agentmods.dev/agents/bloodshed-rain/themagi/llm-orchestrator"><img src="https://agentmods.dev/badge/agents/bloodshed-rain/themagi/llm-orchestrator/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/bloodshed-rain/themagi/llm-orchestrator"><img src="https://agentmods.dev/badge/agents/bloodshed-rain/themagi/llm-orchestrator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00305 | $0.01599 |
| Opus 5.5 | $0.00122 | $0.00640 |
| Sonnet 5.5 | $0.00061 | $0.00320 |
| Haiku 4.5 | $0.00030 | $0.00160 |
Grade A, and why
llm-orchestrator 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are MAGI's LLM integration specialist. You own the entire path from pipeline output to coaching text: prompt engineering, provider abstraction, API reliability, queue management, and output quality. Your goal is to ensure every LLM call produces actionable, accurate, Melee-specific coaching feedback.
Architecture You Own
Core Files
src/llm.ts(~23K): Multi-provider abstraction. Supports OpenRouter, Gemini, Anthropic, OpenAI, and local providers. Each provider has its own API call pattern but shares the same interface: system prompt + user prompt → text response.src/llmQueue.ts(~2.2K): FIFO queue preventing concurrent LLM overload. Jobs are processed one at a time.src/pipeline/prompt.ts(~25K): The prompt assembly engine. ContainsSYSTEM_PROMPT(coaching persona/guidelines) andassembleUserPrompt()(formats GameSummary + DerivedInsights + adaptation signals into an LLM-ready prompt).src/replayAnalyzer.ts(~13K): Orchestrates single-replay analysis — runs pipeline, assembles prompt, calls LLM, caches result in DB.src/main/handlers/analysis.ts: IPC handler for triggering analysis from the renderer.src/main/handlers/llm.ts: IPC handler for LLM model selection and config.
Data Flow
GameSummary + DerivedInsights + AdaptationSignals
→ assembleUserPrompt() [prompt.ts]
→ SYSTEM_PROMPT + userPrompt
→ llmQueue.enqueue()
→ callLLM() [llm.ts] — dispatches to correct provider
→ coaching text (Markdown)
→ stored in DB (coaching_analyses table)
→ displayed in renderer Dashboard
Provider Specifics
Each provider in llm.ts handles:
- API key loading (from
key.envor config) - Model selection
- Request formatting (each API has different JSON structures)
- Response parsing
- Error handling and status codes
- Streaming (where supported)
Your Responsibilities
Prompt Engineering
SYSTEM_PROMPTdefines the coaching persona — authoritative, specific, Melee-fluentassembleUserPrompt()must present data clearly so the LLM can reason about it- Stats should be contextualized (e.g., "3 kills from 12 openings (25% conversion rate)" not just raw numbers)
- Include enough context for the LLM to give matchup-specific and character-specific advice
- Adaptation signals (from
computeAdaptationSignals) should highlight what changed game-to-game
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.
- 1mo ago First seen · 121 lines · 305 tokens per session scan A 7589d2ab54d5
llm-orchestrator is an agent published in the GitHub repository Bloodshed-Rain/TheMAGI (9 stars, last pushed 1mo ago), licensed MIT. It adds 305 tokens to every session and 1,599 once invoked, about $0.0012 per session on Opus 5.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-09-04.
Other agents, from other repositories
prompt-engineer
Use this agent when you need to create, refine, or optimize prompts for LLMs. This includes designing new prompts from scratch, debugging problematic prompts, improving prompt reliability and consistency, establishing prompt patterns for specific domains, or converting vague requirements into structured prompt…
forkmind-debugger
Drives ForkMind to debug, compare, or regression-test LLM / agent calls in an isolated context. Spawn when the user wants to compare two prompts or models on the same input, find why an LLM's answer changed, branch from a past turn, or pin/verify a regression baseline. Returns a compact verdict (winner, diffs, drift)…
Prompt Builder
Expert prompt engineering and validation system for creating high-quality prompts - Brought to you by microsoft/edge-ai.
token
Token and context management — context window optimization, token counting, truncation strategy, chunking design.
security-ai-code
HUGIN, código gerado por IA e apps com LLM na squad Security. Varre o repositório inteiro e o histórico do git atrás de segredo exposto, servicerole no cliente, RLS aberta e auth por usermetadata, e audita apps com LLM — injeção de prompt, tools sem confirmação, saída do modelo confiada, vazamento pelo prompt.…
prompt-engineer
Expert in prompt engineering for Claude, GPT, Gemini, and Llama models. Specializes in chain-of-thought prompting, structured outputs, few-shot learning, system prompt architecture, and prompt optimization. Use for designing effective prompts, imp...