| Layer | Pick | License |
|---|---|---|
| Trace ingest | LangSmith SDK / Braintrust | MIT + SaaS |
| Normalization | OpenLLMetry + custom JSONL | Apache-2.0 |
| Task graph | inspect-ai / langgraph parser | MIT |
| Judge ensemble | Prometheus-Eval + GPT-5 mini + spot humans | mixed |
| Metric suite | swe-bench · τ-bench · GAIA · cost-tracer | MIT |
| CI alarm | GitHub Actions · Slack webhook | — |
| Storage | Postgres + pgvector | Postgres |
| Layer | Pick | License |
|---|---|---|
| Working mem | Redis 200-token sliding | BSD |
| Writer | Letta + Mem0 extractor | Apache-2.0 |
| Episodic | Postgres JSONB | Postgres |
| Semantic / vector | Qdrant + pgvector | Apache-2.0 |
| Graph | Neo4j · entity + edge | GPL-3.0 (community) |
| Procedural | skill-card store (custom JSON) | MIT |
| Consolidator | nightly cron · APScheduler | MIT |
| Reranker | cross-encoder/ms-marco-MiniLM | Apache-2.0 |
| PII | Presidio | MIT |
| Layer | Pick | License |
|---|---|---|
| Input guard | Llama Guard 4 + Prompt Armor | Llama-3 community |
| Intent / tool gate | NeMo Guardrails (Colang 2.0) + OPA Rego | Apache-2.0 |
| Side-effect gate | custom dry-run runner + 2nd-approval | MIT |
| Ask-human | Slack DM API · in-app modal | — |
| Output guard | Guardrails AI + Presidio | Apache-2.0 |
| Streaming reroute | custom SSE consumer + token-replacer | MIT |
| Observability | LangFuse · OpenLLMetry · Grafana | MIT |
| Audit | append-only Postgres · S3 Object Lock | — |
send_email with the wrong recipient and a credit card number." Your side-effect gate, your dry-run mode, and your ask-human hook are the entire product. Everything else is sugar. If you can't pause the agent between plan and act, you're shipping a chatbot, not an agent.spec → schema-validate → pii-scrub → auth-handler → retry/rate-limit → semantic description → runtime wrapper → eval harness. Include 1) a real OpenAPI spec I can paste in, 2) the tool definition that comes out, 3) a sample failure mode + recovery, 4) a comparison of three open tool-calling libraries side-by-side on the same API.| Layer | Pick | License |
|---|---|---|
| Spec parser | openapi-typescript · graphql-codegen | MIT |
| Doc ingest | Firecrawl + trafilatura | MIT |
| Auth handling | Auth0 · oauth2-cli | MIT |
| PII detection | Presidio + custom regex | MIT |
| Sem describer | GPT-5 mini few-shot | API |
| Wrapper gen | Stainless / Speakeasy / FastMCP | mixed |
| Runtime | MCP server · @modelcontextprotocol/sdk | MIT |
| Eval | inspect-ai tool-call suite | MIT |
capture failure → cluster & dedupe → synthesize preference pairs → train (LoRA + DPO) → eval on golden set → canary deploy → rollback on regression. Deliver 1) a real cluster→DPO converter script, 2) a sample eval gate that catches a known regression, 3) a comparison of online-RL vs offline-DPO on the same agent, 4) the *gotchas* in production (catastrophic forgetting, reward-hacking, eval overfit).| Layer | Pick | License |
|---|---|---|
| Capture | LangSmith traces → S3 | MIT + SaaS |
| Cluster | sentence-transformers + sklearn k-means | Apache-2.0 |
| Synth pair | GPT-5 mini fix-prompt + judge | API |
| Train | TRL · unsloth · OpenRLHF | Apache-2.0 |
| Eval | inspect-ai · lm-eval-harness | MIT |
| Canary | Argo Rollouts · flagger | Apache-2.0 |
| Store | MLflow registry | Apache-2.0 |
| Hard floor | golden-200 frozen eval set | — |
| Layer | Pick | License |
|---|---|---|
| Orchestration | LangGraph · AutoGen v0.4 | MIT |
| Blackboard | Postgres + Redis pub/sub | Postgres |
| Specialist heads | 4× GPT-5-mini (different system prompts) | API |
| Critic | Claude-Opus-4.5 (adversarial) | API |
| Tool registry | MCP server per role | MIT |
| Signing | ed25519 + RFC3161 timestamp | — |
| Provenance | append-only Postgres · S3 Object Lock | — |
| Eval | inspect-ai + custom rubric | MIT |
| Layer | Pick | License |
|---|---|---|
| Local model | Phi-3.5-mini · Llama-3-8B-Instruct | MIT |
| PII scrub | Presidio + custom regex | MIT |
| Vector store (local) | Chroma w/ AES-256 per-user key | Apache-2.0 |
| TEE | Apple Secure Enclave · Intel SGX · Azure Confidential | — |
| DP noise | Opacus · custom Laplace | Apache-2.0 |
| Cloud gateway | Cloudflare Workers AI · Azure Confidential | — |
| Audit log | append-only S3 Object Lock | — |
| Compliance | EU-AI-Act · GDPR Art. 22/30 · HIPAA | — |
step → estimate-difficulty → pick-model → fallback → cache → batch. Deliver 1) the routing decision tree, 2) a real cost-quality Pareto curve I can reproduce, 3) a sample routing policy that gets within 4% of GPT-5 quality at 22% of the cost, 4) caching strategy (semantic + exact + episodic), 5) a 30-day ship plan with a target $/task budget.| Layer | Pick | License |
|---|---|---|
| Router | LiteLLM · Portkey · NotDiamond | MIT |
| Difficulty model | calibrated logreg on 12 features | MIT |
| Cache | GPTCache · Redis vector · pgvector | Apache-2.0 |
| Batcher | custom queue · Celery w/ delay | BSD |
| Speculative | draft = GPT-5-nano · verify = GPT-5-mini | API |
| Cost ledger | Postgres · nightly job | — |
| Budget alarm | Grafana · Slack webhook | MIT |
| Eval | inspect-ai Pareto sweep | MIT |