Rene Fichtmueller 282403d34b feat: Implement Phase 2G.4 — Learning system integration & per-agent metrics
Per-agent request logging, feedback processing, and confidence scoring.

- Per-agent metric collection: request_id, model, latency_ms, tokens_in/out, confidence, fallback_used, success
- Agent feedback loop: outcome tracking (success/fallback/timeout/error/user_rejected)
- Confidence scoring: 50% success + 25% quality + 25% satisfaction (per-agent independent of global)
- Cost attribution: Monthly cost report per agent (tokens × model rate)
- SLO monitoring: p50/p95/p99 latencies vs per-agent targets
- Anomaly detection: σ-based latency spikes, success rate drops, confidence degradation
- Full TypeScript types, database schema initialization, comprehensive documentation
2026-04-19 22:22:17 +02:00

38 lines
827 B
JSON

{
"name": "@llm-gateway/learning-integration",
"version": "1.0.0",
"description": "Per-agent learning metrics and feedback integration for LLM Gateway",
"type": "module",
"main": "dist/index.js",
"exports": {
".": "./dist/index.js",
"./metrics": "./dist/metrics.js",
"./feedback": "./dist/feedback.js"
},
"scripts": {
"build": "tsc",
"dev": "tsc --watch",
"test": "vitest"
},
"dependencies": {
"@llm-gateway/client": "workspace:*",
"@llm-gateway/learning": "workspace:*",
"postgres": "^3.0.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"typescript": "^5.0.0",
"vitest": "^1.0.0"
},
"keywords": [
"learning",
"metrics",
"feedback",
"per-agent",
"llm",
"gateway"
],
"license": "MIT",
"author": "Rene Fichtmueller"
}