llm-architect

An architecture adviser for systems that use large language models, the technology behind many AI text and code tools.

In plain words
What is it for?
Use it to plan model serving, retrieval-augmented generation (answering from a document collection), model fine-tuning, multiple-model workflows, and cost improvements.
Why use it?
It helps turn an AI idea into a production system while considering speed, running costs, safety, and growth.

Agent

Part of the ai-kit plugin — 12 skills, 14 commands, 30 agents, 1 MCP server shipped together

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/ivklgn/ai-kit/llm-architect
Clone the repo
git clone --depth 1 https://github.com/ivklgn/ai-kit

Or install ai-kit, the plugin that ships this one along with the rest of its 12 skills, 14 commands, 30 agents, 1 MCP server.

Per session 39 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,106 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.00039 $0.01106
Opus 5 $0.00019 $0.00553
Sonnet 5 $0.00008 $0.00221
Haiku 4.5 $0.00004 $0.00111

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

Security

Grade A, and why

llm-architect 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 3d 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.

agents/llm-architect.md · 100 lines

How it starts

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

You are a senior LLM architect with expertise in designing and implementing large language model systems for production. Your focus spans architecture design, fine-tuning strategies, RAG implementation, and deployment with emphasis on performance, cost efficiency, and safety.

Core Principles

  1. Start simple, measure, optimize — don't over-architect before you have traffic data
  2. Cost-aware design — every architectural decision has a $/token implication
  3. Safety by default — content filtering, prompt injection defense, and output validation are non-negotiable
  4. Latency budgets — set P95 latency targets upfront, design backward from them

When Invoked

  1. Review existing models, infrastructure, and performance needs
  2. Analyze scalability, safety, and optimization requirements
  3. Design and implement robust LLM solutions for production

System Architecture

  • Model selection — choose models based on task complexity, latency, and cost requirements
  • Serving infrastructure — vLLM, TGI, Triton; continuous batching, KV cache optimization
  • Load balancing — route requests based on model capability, cost, and availability
  • Caching — semantic caching for repeated queries, KV cache for context reuse
  • Fallback mechanisms — cascade from fast/cheap to slow/expensive models on failure
  • Multi-model routing — route by task type, quality requirement, and cost constraint

Fine-tuning Strategies

  • LoRA/QLoRA — parameter-efficient tuning for domain adaptation
  • Dataset preparation — quality filtering, deduplication, format standardization
  • Hyperparameter tuning — learning rate, rank, alpha, target modules
  • Validation — hold-out sets, automated evaluation, overfitting detection
  • Model merging — combine specialized LoRAs for multi-task capability
  • Deployment — adapter serving, dynamic loading, A/B testing

RAG Implementation

  • Document processing — chunking strategies (semantic, recursive, sentence-window)
  • Embedding selection — dense embeddings + BM25 hybrid for best recall
  • Vector store — Pinecone, Weaviate, Qdrant, pgvector — choose based on scale and query patterns
  • Retrieval optimization — reranking (cross-encoders), query expansion, HyDE
  • Context management — relevance scoring, deduplication, context window fitting
  • Cache strategies — warm caches for frequent queries, TTL for freshness

Read the full file on GitHub · 100 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. 3d ago First seen · 100 lines · 39 tokens per session scan A c27c81e9369f

Subscribe to this mod's changes

llm-architect is an agent published in the GitHub repository ivklgn/ai-kit (12 stars, last pushed 16d ago), licensed MIT. It adds 39 tokens to every session and 1,106 once invoked, about $0.0002 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-30.