{"id":49086768,"url":"https://github.com/metronis-space/aegis","last_synced_at":"2026-04-20T16:05:50.613Z","repository":{"id":340324215,"uuid":"1163769055","full_name":"metronis-space/aegis","owner":"metronis-space","description":"The Adaptive Intelligence Layer for AI Agents — eval, train, and memory on one platform.","archived":false,"fork":false,"pushed_at":"2026-04-19T10:22:15.000Z","size":8389,"stargazers_count":1,"open_issues_count":27,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-19T11:27:13.773Z","etag":null,"topics":["agent-eval","ai-agents","benchmarks","evaluation","grpo","llm","memory","reinforcement-learning"],"latest_commit_sha":null,"homepage":"https://metronis.space/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metronis-space.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"metronis-space"}},"created_at":"2026-02-22T05:34:48.000Z","updated_at":"2026-04-19T09:29:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/metronis-space/aegis","commit_stats":null,"previous_names":["metronis-space/aegis"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/metronis-space/aegis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metronis-space%2Faegis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metronis-space%2Faegis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metronis-space%2Faegis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metronis-space%2Faegis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metronis-space","download_url":"https://codeload.github.com/metronis-space/aegis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metronis-space%2Faegis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32054613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-eval","ai-agents","benchmarks","evaluation","grpo","llm","memory","reinforcement-learning"],"created_at":"2026-04-20T16:05:49.583Z","updated_at":"2026-04-20T16:05:50.608Z","avatar_url":"https://github.com/metronis-space.png","language":"Python","funding_links":["https://github.com/sponsors/metronis-space"],"categories":[],"sub_categories":[],"readme":"# Aegis\n\n[![CI](https://github.com/metronis-space/aegis/actions/workflows/ci.yml/badge.svg)](https://github.com/metronis-space/aegis/actions/workflows/ci.yml)\n[![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-green.svg)](https://opensource.org/licenses/Apache-2.0)\n\n**The Closed-Loop Intelligence Engine for AI Agents** — eval, train, and deploy smarter agents.\n\nAegis by [Metronis, Inc.](https://metronis.space/) is an open-source framework that evaluates AI agents across 125 dimensions, identifies weaknesses, trains improved models via RL, and proves the improvement with rigorous before/after evaluation.\n\n## Benchmark Evidence Tiers\n\nAegis exposes three different benchmark evidence modes and they are not interchangeable:\n\n- `internal proxy`: built-in `*-proxy` suites are for internal regression tracking and ablations.\n- `public proxy`: built-in `*-heldout` suites use held-out slices and benchmark-native metrics, but they are still not official leaderboard-grade evidence.\n- `claim-grade`: only manifest-backed claim suites are intended for externally claimable benchmark results.\n\nThe built-in `legal` alias currently resolves to `legal-heldout`, which is a held-out proxy suite, not an official claim-grade legal benchmark. Treat strict built-in runs as honest proxy evidence unless the suite contract explicitly reports claim eligibility.\nThe repo does not bundle claim-grade legal suite JSON by default; install real\nmanifests under `benchmarks/claim_suites/` or set `AEGIS_BENCHMARK_SUITE_DIR`\nto an external manifest directory.\n\n## The Pipeline\n\n```\nTraces In → Eval → Diagnose Weaknesses → Spin RL Environments →\nTrain (GRPO + Continuous Rewards) → Store Results to Memory →\nTrain with Tools + Self-Managed Memory → Final Eval (Prove Improvement)\n```\n\n```mermaid\nflowchart LR\n    A[\"Agent Traces\"] --\u003e B[\"Aegis Eval\\n125 dimensions\"]\n    B --\u003e C[\"Weakness\\nDiagnosis\"]\n    C --\u003e D[\"RL Environments\\nauto-generated\"]\n    D --\u003e E[\"GRPO Training\\ncontinuous rewards\"]\n    E --\u003e F[\"Aegis Memory\\nextract strategies\"]\n    F --\u003e G[\"Tool + Memory\\nTraining\"]\n    G --\u003e H[\"Final Eval\\nprove improvement\"]\n    H --\u003e A\n```\n\n## Three Products\n\n| Product | What it does | Status |\n|---------|-------------|--------|\n| **Aegis Eval** | 125 dimensions across 7 tiers, triangulated scoring (rule + semantic + LLM judge), legal \u0026 finance domain plugins | Working |\n| **Aegis Train** | GRPO-based RL with continuous reward functions, environment factory, Observatory monitoring | Building |\n| **Aegis Memory** | 12 operations, knowledge graph, vector store, provenance tracking, 7 time horizons | Working |\n\n## Installation\n\n```bash\npip install -e \".[dev,all]\"\n```\n\n## Quick Start\n\n### Evaluate an agent\n\n```python\nfrom aegis import Evaluator, EvalConfig\n\nevaluator = Evaluator(config=EvalConfig(dimensions=\"all\"))\nresult = evaluator.run()\n\nprint(f\"Overall score: {result.overall_score:.2%}\")\nfor tier_name, tier_score in result.tier_scores.items():\n    print(f\"  {tier_name}: {tier_score:.2%}\")\n```\n\n### CLI\n\n```bash\naegis eval run --config eval.yaml     # Run evaluation\naegis eval dimensions                 # List all 125 dimensions\naegis eval benchmark-list             # Inspect proxy vs claim-grade suite status\naegis train start --model Qwen/Qwen2.5-7B --optimizer dr_grpo\n```\n\n### Toolathlon SOTA on OVHcloud\n\n```bash\ncp .env.ovhcloud.example .env\naegis train ovhcloud-doctor\naegis pipeline toolathlon-sota \\\n  --baseline-dir results/toolathlon_full \\\n  --output results/toolathlon_sota_run.json\n```\n\n## Architecture\n\n```\nsrc/aegis/\n├── core/           # Types, config, settings (5 files)\n├── cli/            # Typer CLI (1 file)\n├── adapters/       # OpenAI, Anthropic, LangChain, REST (6 files)\n├── api/            # FastAPI + eval/training/memory routes (9 files)\n├── data/           # CUAD, LegalBench, FinanceBench loaders (5 files)\n├── ingestion/      # Document parsing pipeline (6 files)\n├── eval/           # Engine, 7-tier dimensions, scorers, judges (27 files)\n├── environments/   # Legal \u0026 finance tool-use RL environments (4 files)\n├── training/       # GRPO engine, rewards, rollouts, optimizers (16 files)\n├── memory/         # 12 ops, graph, vectors, provenance (16 files)\n├── plugins/        # Legal (18 dims) + Finance (20 dims) (5 files)\n├── observatory/    # Goodhart detection, efficiency tracking (4 files)\n├── security/       # RBAC (2 files)\n└── store/          # SQLite, Postgres, Neo4j (5 files)\n```\n\n~100 source files. One pipeline. No bloat.\n\n## Adapters\n\n| Adapter | Framework |\n|---------|-----------|\n| `OpenAIAdapter` | OpenAI Assistants + Chat Completions |\n| `AnthropicAdapter` | Anthropic Messages API |\n| `LangChainAdapter` | LangChain agents |\n| `RESTAdapter` | Any REST API |\n\n## Domain Plugins\n\n- **Legal**: 18 dimensions, CUAD dataset, contract clause extraction, citation verification\n- **Finance**: 20 dimensions, FinanceBench + SEC EDGAR, numerical accuracy, formula validation\n\n## Documentation\n\n| Topic | Link |\n|-------|------|\n| Quick Start | [`docs/quickstart.md`](docs/quickstart.md) |\n| Architecture | [`docs/architecture.md`](docs/architecture.md) |\n| Master Implementation Plan | [`docs/master-implementation-plan.md`](docs/master-implementation-plan.md) |\n| CLI Reference | [`docs/cli-reference.md`](docs/cli-reference.md) |\n| API Reference | [`docs/api-reference.md`](docs/api-reference.md) |\n| Dimensions | [`docs/dimensions.md`](docs/dimensions.md) |\n| Scoring | [`docs/scoring.md`](docs/scoring.md) |\n| Adapters | [`docs/adapters.md`](docs/adapters.md) |\n| Plugins | [`docs/plugins.md`](docs/plugins.md) |\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nApache License 2.0. See [LICENSE](LICENSE).\n\nBuilt by [Metronis, Inc.](https://metronis.space/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetronis-space%2Faegis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetronis-space%2Faegis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetronis-space%2Faegis/lists"}