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.
npx agentmods add skills/lgrappag/workflows-agents/ai-llm-runtime-integrationnpx skills add LgrappaG/Workflows-Agents --skill ai-llm-runtime-integrationgit clone --depth 1 https://github.com/LgrappaG/Workflows-AgentsWrote 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/skills/lgrappag/workflows-agents/ai-llm-runtime-integration)<a href="https://agentmods.dev/skills/lgrappag/workflows-agents/ai-llm-runtime-integration"><img src="https://agentmods.dev/badge/skills/lgrappag/workflows-agents/ai-llm-runtime-integration.svg" alt="Measured on agentmods" 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.00023 | $0.01079 |
| Opus 5 | $0.00012 | $0.00540 |
| Sonnet 5 | $0.00005 | $0.00216 |
| Haiku 4.5 | $0.00002 | $0.00108 |
Grade A, and why
ai-llm-runtime-integration 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 5d 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 — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ai-llm-runtime-integration
Overview
Orchestrate large language models at runtime for dynamic NPC dialogue, mission generation, and world-building while maintaining safety guardrails and performance budgets. This skill enables production-grade LLM integration in game engines with fallback strategies and measurable SLOs.
Key Capabilities
1. LLM Service Integration
- Remote APIs: OpenAI, Anthropic, Meta, Azure OpenAI with fallback chaining
- On-Device Models: ONNX Runtime, TensorFlow Lite for offline capability
- Streaming Responses: Token-by-token dialogue generation for real-time character interaction
- Batch Processing: Async mission generation with configurable QoS tiers
2. Safety & Guardrails
- Content Filtering: NSFW, violence, PII detection at ingestion and output
- Token Budget Enforcement: Hard limits on API spend per session/world
- Latency Budgets: Fail-open gracefully when responses exceed SLO (fallback to procedural)
- Rate Limiting: Per-player, per-NPC throttling with queue management
- Jailbreak Detection: Prompt injection mitigation via semantic anomaly scoring
3. Mission & Dialogue Generation
- Context Awareness: World state, player history, NPC personality injection
- Deterministic Seeding: Reproduce missions for testing/replay with fixed seeds
- Branching Narratives: Dynamic mission trees based on player choices
- Localization: Multi-language generation with style preservation
4. Performance & Observability
- Response Caching: LRU cache for repeated generation patterns
- Latency Tracing: End-to-end timing from request to gameplay integration
- Usage Analytics: Token counts, API costs, fallback rates per feature
- A/B Testing: Variant generation for NPC dialogue quality measurement
Implementation Pattern
// Pseudo-code: High-level orchestration
class NPCDialogueGenerator : MonoBehaviour {
public async Task<DialogueNode> GenerateResponse(
NPCContext context,
PlayerInput input,
CancellationToken ct = default)
{
// 1. Load player history + world state
var memoryContext = await LoadPlayerMemory(context.PlayerId);
// 2. Build prompt with safety constraints
var prompt = BuildPrompt(context, memoryContext, input);
// 3. Orchestrate across providers with fallback
var response = await LlmOrchestrator.GenerateWithFallback(
prompt: prompt,
maxTokens: context.TokenBudget,
timeout: TimeSpan.FromSeconds(5),
providers: new[] { "primary", "fallback", "procedural" }
);
// 4. Validate & cache result
if (!await ValidateContent(response)) {
response = await GenerateFallbackDialogue(context);
}
// 5. Record analytics
await RecordUsage(context, response);
return ParseDialogueNode(response);
}
}
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.
- 5d ago First seen · 118 lines · 23 tokens per session scan A 99e771008d1e
ai-llm-runtime-integration is a skill published in the GitHub repository LgrappaG/Workflows-Agents (2 stars, last pushed 4mo ago), licensed MIT. It adds 23 tokens to every session and 1,079 once invoked, about $0.0001 per session on Opus 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-08-31.
Other skills, from other repositories
unity-model-agnostic-inference
Use for on-device or server inference that is not tied to one vendor model: ONNX Runtime, Sentis, Barracuda legacy, custom .onnx/.tflite/.pb assets, and swapping models without rewriting gameplay code.
unity-ml-agents
Use when working on Unity ML-Agents: training configs, BehaviorParameters, sensors, actuators, inference in builds, or com.unity.ml-agents packages.
unity-llm-integration
Use when adding LLM/chat/RAG features to a Unity game or tool: API keys, prompt assets, safety, latency, and server-side vs client-side calls.
unity-sentis-inference
Use when integrating ONNX/Sentis/Unity Inference in Unity: model assets, IWorker, runtime performance, or com.unity.sentis packages.
iflytek-image-understanding
Use when user asks to analyze an image, describe image contents, or answer questions about a picture. iFlytek Image Understanding (图片理解) — analyze and answer questions about images using Spark Vision model. WebSocket API, pure Python stdlib, no pip dependencies.
skill-creator
Create or improve Zhin Agent skills (SKILL.md). Use when asked to add a skill, write SKILL.md, document a repeatable agent workflow, or refine skill frontmatter/keywords. Triggers: 创建技能, 写 SKILL, skill-creator, 加 skill.