# Areev > Areev is open-source infrastructure for governed, self-improving AI agents. It turns an agent's production history into better context, better workflows, governed recommendations, and lineage-rich training data in changes a person can inspect, approve, undo, and re-measure. Canonical site: https://areev.ai/ Source: https://github.com/AreevAI/areev License: MIT OR Apache-2.0 Tagline: Agents that learn. Humans stay in control. ## What Areev Is Areev connects four systems in one content-addressed record: 1. **Governed learning loop** — deterministic analyzers read agent runs and propose evidence-cited changes. A named person reviews them. Applied changes store an inverse and are measured again after deployment. 2. **Context Graph** — typed knowledge, knowledge-graph relationships, semantic vector and lexical retrieval, keyed state, policies, and execution history are assembled through CAL (Context Assembly Language) under a deterministic token budget. 3. **Dynamic Processing Graph** — content-addressed workflow plans support branching, dynamic fan-out, typed reducers, subgraphs, human gates, budgets, retries, time-travel forks, and byte-comparable verification from the run journal. 4. **Governed corpus** — production trajectories can be exported as chat JSONL with step-level loss weights and lineage. Areev does not train models; it registers, evaluates, governs, and can roll back the adapter returned by the user's trainer. Memory is the substrate, not the differentiator. The differentiator is that agent knowledge, execution history, authority, and improvement live in one inspectable system. ## Honest Boundaries - Areev does not silently change itself. Recommendations pass explicit gates. - Areev does not ship a model trainer or autonomously change model weights. - Areev has no background daemon. Hooks, cron, CI, MCP, or the host run the loop and triggers. - Areev is local-first and collects no telemetry by default. ## Main Pages - [Homepage](https://areev.ai/): Product overview, benefits, architecture, governed learning, Context Graph, Processing Graph, corpus pipeline, benchmark, and quickstart. - [How To?](https://areev.ai/how-to/): Ten runnable, keyless reference agents. Each demonstrates one distinct production capability. - [Documentation](https://areev.ai/docs/): Guides, architecture, APIs, security, compliance, and console material. - [Quickstart](https://areev.ai/docs/getting-started/quickstart/): Installation and first agent context. - [Open source](https://areev.ai/open-source/): Areev and related open-source projects. ## How To Build Real Agents Each reference agent has two acts: `python/smoke.sh` proves the job under governance; `python/improve.sh` proves how recorded history becomes an evidence-cited improvement. They run from committed fixtures without credentials, network access, or a model key at their deterministic floor. - [Invoice to accounting](https://areev.ai/how-to/invoice-to-accounting/): Canonical adaptive-agent pattern. Email invoices, bounded correction cycles, named approvals, idempotent posting, and corrections that become future context. Implemented in Python, TypeScript, and Rust with one content-addressed plan. - [Sanctions screening](https://areev.ai/how-to/sanctions-screening/): Code-carrying tools. Exact rule bytes are linked to every decision; governed revisions move blob, tool, workflow, and trigger; stale host pins refuse safely. - [Incident response](https://areev.ai/how-to/incident-response/): Webhook triggers, deduplication, manual replay, remembered incident causes, and production actions that remain human-gated. - [Hiring screening](https://areev.ai/how-to/hiring-screening/): Human oversight measured from the execution journal. Every employment outcome belongs to a named recruiter and there is no automatic edge to a decision. - [Insurance documents](https://areev.ai/how-to/insurance-documents/): Bi-temporal context. World time and knowledge time answer what was true, what was known, and which coverage applied on the loss date. - [Revenue-cycle optimization](https://areev.ai/how-to/rcm-optimization/): Dynamic `$send` fan-out and typed reducers create one task per denial and join results deterministically. - [Trade surveillance](https://areev.ai/how-to/trade-surveillance/): Composite triggers correlate independent signals inside a time window before opening one analyst case. - [Due diligence](https://areev.ai/how-to/due-diligence/): Hard budgets become resumable states; authorized forks continue research while preserving the original journal. - [Clinical referrals](https://areev.ai/how-to/clinical-referrals/): Egress pseudonymization protects every model-facing read while authorized local output can be rehydrated. - [Data-subject requests](https://areev.ai/how-to/data-subject-requests/): Disclosure and erasure share one selector, identity is verified before reads, and irreversible operations require a named DPO. Upstream examples: https://github.com/AreevAI/areev/tree/main/examples/agents Agent assembly guide: https://github.com/AreevAI/areev/blob/main/examples/how-to-create-an-areev-agent.md ## Learning Loop Areev Loop turns the agent's own record into governed recommendations: `history → observe → propose → review → apply → verify → improve` Recommendations cite evidence by content hash. Separation of duties prevents the agent that made a proposal from supplying its own approval. A written reason is required. Applied changes retain their inverse. Measurements at later intervals can propose a revert if a regression appears. The deterministic floor uses no model calls. An optional LLM analyzer follows a discover → ground → verify path before a model-generated finding reaches the human queue. Reference: https://github.com/AreevAI/areev/blob/main/docs/loop.md ## Context Graph and CAL CAL is a context-assembly language, not only a retrieval API. It can combine typed facts, events, state, relationships, semantic and lexical matches, policies, live signals, tools, skills, and run outcomes. Budget-aware rendering allocates material as full, summarized, or omitted so a turn receives useful context rather than an unbounded dump. Useful site guides: - [CAL](https://areev.ai/docs/guides/cal/) - [Search and hybrid recall](https://areev.ai/docs/guides/search/) - [Knowledge Graph](https://areev.ai/docs/guides/graph/) - [Saved queries](https://areev.ai/docs/guides/saved-queries/) - [Supersession and current truth](https://areev.ai/docs/guides/supersede/) Upstream CAL reference: https://github.com/AreevAI/areev/blob/main/docs/cal-reference.md ## Processing Graph and Governed Runs Workflow plans are immutable, content-addressed grains. Runs are journals in the same record. Human approvals are graph nodes. Intent is written before an external effect; retries reuse the same idempotency key. Dynamic fan-out, conditional branches, typed reducers, budgets, cancel, resume, forks, shadow runs, and verification remain inspectable after execution. Reference: https://github.com/AreevAI/areev/blob/main/docs/run.md Triggers: https://github.com/AreevAI/areev/blob/main/docs/triggers.md ## Governed Corpus and Tuning Seam `areev corpus` exports on-policy trajectories with chat JSONL, step-level loss weights, and lineage to the source grains. The user's trainer consumes that corpus. `areev tune --cmd` registers the returned adapter, while Areev records the base model, corpus manifest, evaluation set, gating run, approval, and promotion. Erasure can identify corpora and adapters whose lineage became stale. Reference: https://github.com/AreevAI/areev/blob/main/docs/cookbook.md#14-capture-a-reproducible-run-and-export-a-governed-corpus ## Learning Benchmark The repository includes an A/B/A/B causal benchmark with one frozen model, 300 held-out tasks, three independent streams, and temperature zero. The only changed condition is whether learned lessons are present in the live prompt: - Before learning: 46.3% - Lessons applied: 68.7% - Lessons rolled back: 47.0% - Lessons re-applied: 67.0% Removing lessons removes the gain; restoring them restores it. Every transition is significant at p < 0.0001 in the reference run. This is one synthetic workload designed to make learning measurable, not a claim that the result generalizes to every production workload. Results and caveats: https://github.com/AreevAI/areev/blob/main/crates/areev-bench/RESULTS.md ## Install ```bash pip install areev npm install @areev/areev cargo install areev ``` The engine can run embedded in-process with SQLite or use PostgreSQL for a server tier. Interfaces include Rust, Python, Node, CLI, MCP, HTTP, A2A, and gRPC surfaces documented by the project. ## Security and Privacy - Content-addressed immutable grains and provenance chains - Optional AES-256-GCM encryption at rest - Namespace-scoped access and egress pseudonymization - Subject report, portable bundle, forgetting, tombstones, and crypto-erasure - Hash-chained audit records with actor and written reason - Local-first operation and no default telemetry Site security docs: https://areev.ai/docs/security/ Upstream threat model: https://github.com/AreevAI/areev/blob/main/docs/security-model.md