Metadata-Version: 2.4
Name: engrami
Version: 0.3.0
Summary: Auditable, compression-driven memory infrastructure for AI agents
Project-URL: Homepage, https://engrami.dev
Project-URL: Documentation, https://engrami.dev/docs
Author: Engrami Contributors
License: ENGRAMI LLP — ENTERPRISE SOFTWARE LICENSE AGREEMENT
        
        Version 1.0 — Effective upon installation, access, or use of the Software.
        
        IMPORTANT — READ CAREFULLY. This Enterprise Software License Agreement (the
        "Agreement") is a legally binding contract between Engrami LLP ("Engrami", "we",
        "us", or "Licensor") and the entity or person that downloads, installs, accesses,
        activates, or uses the Software ("Licensee", "you", or "Customer"). By installing,
        activating (including by applying a License Key), accessing, or using the Software,
        you agree to be bound by this Agreement. If you do not agree, do not install,
        activate, access, or use the Software.
        
        This software is proprietary. It is licensed, not sold. All rights not expressly
        granted are reserved by Engrami LLP.
        
        -------------------------------------------------------------------------------
        1. DEFINITIONS
        -------------------------------------------------------------------------------
        1.1 "Software" means the Engrami memory-infrastructure software, including the
            server, command-line interface, SDKs, MCP server, APIs, container images,
            Helm charts, Terraform modules, source code, object code, configuration,
            and accompanying documentation, and any Updates provided by Engrami.
        1.2 "Documentation" means the user and technical documentation Engrami makes
            available for the Software.
        1.3 "License Key" means the credential (issued and managed via Engrami's
            licensing provider, currently Cryptlex) that authorizes and meters use of the
            Software in accordance with the applicable Subscription.
        1.4 "Subscription" means the plan, term, usage limits, deployment scope, and fees
            set out in an Order Form, quote, or online purchase accepted by both parties.
        1.5 "Order Form" means an ordering document or online checkout referencing this
            Agreement.
        1.6 "Authorized Users" means your employees and contractors who use the Software
            for your internal business purposes and on your behalf.
        1.7 "Deployment Environment" means infrastructure that you own or control
            (including your private cloud or VPC) on which you install the Software.
        1.8 "Usage Metrics" means the operational counters the Software records (such as
            counts of memory operations) used to administer the Subscription. Usage
            Metrics are counts and metadata only and do not include the content of your
            memories or observations.
        
        -------------------------------------------------------------------------------
        2. LICENSE GRANT
        -------------------------------------------------------------------------------
        2.1 Grant. Subject to your compliance with this Agreement and payment of
            applicable fees, Engrami grants you a limited, non-exclusive, non-transferable,
            non-sublicensable, revocable license, during the Subscription term, to:
            (a) install and run the Software within your Deployment Environment;
            (b) permit Authorized Users to use the Software for your internal business
                purposes; and
            (c) use the Documentation in support of such use,
            in each case solely up to the limits and scope of your Subscription and as
            enabled by a valid License Key.
        2.2 Self-Hosting. The Software is designed to run entirely within your Deployment
            Environment. Engrami does not require your memory content to leave your
            environment for the Software to function.
        2.3 Affiliates. You may permit your Affiliates to use the Software under this
            Agreement provided you remain responsible for their compliance.
        
        -------------------------------------------------------------------------------
        3. LICENSE KEYS, ACTIVATION, AND METERING
        -------------------------------------------------------------------------------
        3.1 Activation. The Software requires a valid License Key to operate in licensed
            mode. License Keys are issued, validated, and may be revoked through Engrami's
            licensing provider (Cryptlex) or by Engrami directly.
        3.2 Metering. The Software records Usage Metrics to administer your Subscription
            and enforce applicable limits. You agree not to interfere with, disable,
            circumvent, or falsify License Key validation or Usage Metrics.
        3.3 Limits. If your usage exceeds the limits of your Subscription, Engrami may
            (a) work with you to expand your Subscription, and/or (b) enforce the limits
            through the Software, as configured.
        3.4 Development Mode. Where no License Key is supplied, the Software may operate
            in a clearly identified, unlicensed "development mode" for evaluation only.
            Development mode is not licensed for production use.
        
        -------------------------------------------------------------------------------
        4. RESTRICTIONS
        -------------------------------------------------------------------------------
        You shall not, and shall not permit any third party to:
        4.1 sell, resell, rent, lease, lend, distribute, or offer the Software as a hosted
            or managed service to third parties (no service-bureau or SaaS resale) except
            as expressly authorized in an Order Form;
        4.2 copy the Software except as necessary for your authorized installation and
            for reasonable backup;
        4.3 modify, translate, or create derivative works of the Software except as
            expressly permitted in writing;
        4.4 reverse engineer, decompile, or disassemble the Software, or attempt to derive
            source code, except to the extent such restriction is prohibited by applicable
            law;
        4.5 remove, alter, or obscure any proprietary notices;
        4.6 circumvent or disable License Keys, metering, usage limits, security, or
            technical protection measures;
        4.7 use the Software to build or assist in building a competing product or service;
            or
        4.8 use the Software in violation of applicable law or beyond the scope of your
            Subscription.
        
        -------------------------------------------------------------------------------
        5. OWNERSHIP
        -------------------------------------------------------------------------------
        5.1 Engrami IP. Engrami and its licensors own all right, title, and interest in
            and to the Software, Documentation, and all related intellectual property.
            This Agreement grants only the limited license expressly stated; no other
            rights are granted by implication, estoppel, or otherwise.
        5.2 Customer Data. As between the parties, you own all data, memories,
            observations, and content you store using the Software ("Customer Data").
            Engrami claims no ownership of Customer Data.
        5.3 Feedback. If you provide feedback or suggestions, you grant Engrami a
            perpetual, irrevocable, royalty-free license to use them without restriction.
        
        -------------------------------------------------------------------------------
        6. THIRD-PARTY AND OPEN-SOURCE COMPONENTS
        -------------------------------------------------------------------------------
        The Software may include third-party or open-source components licensed under
        their own terms (for example, PostgreSQL, pgvector, Apache AGE, and others). Such
        components are provided subject to their respective licenses, which control as to
        those components. A list is available in the Documentation upon request.
        
        -------------------------------------------------------------------------------
        7. FEES AND TAXES
        -------------------------------------------------------------------------------
        7.1 You shall pay all fees set out in the applicable Order Form. Fees are
            non-cancelable and non-refundable except as expressly stated.
        7.2 Fees are exclusive of taxes; you are responsible for all applicable taxes
            other than taxes on Engrami's net income.
        
        -------------------------------------------------------------------------------
        8. TERM AND TERMINATION
        -------------------------------------------------------------------------------
        8.1 Term. This Agreement begins on first use and continues for the Subscription
            term, renewing as stated in the Order Form.
        8.2 Termination for Cause. Either party may terminate for the other's material
            breach not cured within thirty (30) days of written notice. Engrami may
            suspend or terminate the license immediately for breach of Sections 3 or 4.
        8.3 Effect of Termination. Upon termination or expiry, your license ends and you
            shall cease use of the Software and, at Engrami's request, delete or destroy
            all copies. You may export Customer Data prior to termination; Customer Data
            resides in your Deployment Environment.
        8.4 Survival. Sections 4, 5, 7, 9, 10, 11, 12, and 13 survive termination.
        
        -------------------------------------------------------------------------------
        9. CONFIDENTIALITY
        -------------------------------------------------------------------------------
        Each party shall protect the other's Confidential Information with at least
        reasonable care and use it only to perform under this Agreement. The Software and
        its non-public components are Engrami's Confidential Information.
        
        -------------------------------------------------------------------------------
        10. WARRANTY DISCLAIMER
        -------------------------------------------------------------------------------
        EXCEPT AS EXPRESSLY STATED IN AN ORDER FORM, THE SOFTWARE AND DOCUMENTATION ARE
        PROVIDED "AS IS" AND "AS AVAILABLE", WITHOUT WARRANTIES OF ANY KIND, WHETHER
        EXPRESS, IMPLIED, OR STATUTORY, INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF
        MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT.
        ENGRAMI DOES NOT WARRANT THAT THE SOFTWARE WILL BE ERROR-FREE OR UNINTERRUPTED.
        THE SOFTWARE IS NOT DESIGNED FOR HIGH-RISK USES (E.G., LIFE SUPPORT, NUCLEAR, OR
        AIR-TRAFFIC CONTROL) AND IS NOT LICENSED FOR SUCH USES.
        
        -------------------------------------------------------------------------------
        11. LIMITATION OF LIABILITY
        -------------------------------------------------------------------------------
        11.1 TO THE MAXIMUM EXTENT PERMITTED BY LAW, NEITHER PARTY WILL BE LIABLE FOR ANY
             INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR FOR LOST
             PROFITS, REVENUE, DATA, OR GOODWILL, ARISING OUT OF OR RELATED TO THIS
             AGREEMENT, EVEN IF ADVISED OF THE POSSIBILITY.
        11.2 EACH PARTY'S TOTAL AGGREGATE LIABILITY ARISING OUT OF OR RELATED TO THIS
             AGREEMENT WILL NOT EXCEED THE FEES PAID OR PAYABLE BY YOU TO ENGRAMI IN THE
             TWELVE (12) MONTHS PRECEDING THE EVENT GIVING RISE TO THE CLAIM.
        11.3 The limitations in this Section do not apply to a party's liability for fraud,
             willful misconduct, breach of Section 4 (Restrictions), or amounts owed under
             Section 7 (Fees).
        
        -------------------------------------------------------------------------------
        12. INDEMNIFICATION
        -------------------------------------------------------------------------------
        12.1 By Engrami. Engrami will defend you against third-party claims that the
             unmodified Software, used as permitted, infringes such third party's
             intellectual property rights, and will pay resulting costs finally awarded,
             subject to the limitations herein. Engrami may, at its option, modify or
             replace the Software, procure rights, or terminate the affected license and
             refund pre-paid, unused fees.
        12.2 By Customer. You will defend Engrami against third-party claims arising from
             your Customer Data or your use of the Software in breach of this Agreement.
        12.3 Process. The indemnified party shall give prompt notice, reasonable
             cooperation, and control of the defense to the indemnifying party.
        
        -------------------------------------------------------------------------------
        13. GENERAL
        -------------------------------------------------------------------------------
        13.1 Support & SLA. Support and any service levels are as stated in the applicable
             Order Form or support policy.
        13.2 Audit. Upon reasonable notice and no more than once per year, Engrami may
             verify your compliance with the Subscription scope through License Key and
             Usage Metrics records.
        13.3 Export & Sanctions. You shall comply with applicable export control and
             sanctions laws and shall not use or export the Software in violation thereof.
        13.4 Data Protection. Each party shall comply with applicable data-protection laws.
             Because the Software is self-hosted in your Deployment Environment, you are the
             controller of Customer Data and responsible for its lawful processing.
        13.5 Assignment. You may not assign this Agreement without Engrami's prior written
             consent, except to a successor in a merger or sale of substantially all assets.
        13.6 Governing Law; Venue. This Agreement is governed by the laws of the
             jurisdiction in which Engrami LLP is registered, excluding its conflict-of-laws
             rules, and the parties submit to the exclusive jurisdiction of its courts,
             unless otherwise stated in an Order Form.
        13.7 Entire Agreement. This Agreement, together with any Order Form, is the entire
             agreement and supersedes all prior understandings. Order Form terms control
             over conflicting terms in this Agreement.
        13.8 Severability; Waiver. If any provision is unenforceable, the remainder remains
             in effect. No waiver is effective unless in writing.
        13.9 Notices. Notices to Engrami shall be sent to the contact address Engrami
             designates; notices to you may be sent to your account contact.
        
        -------------------------------------------------------------------------------
        CONTACT
        -------------------------------------------------------------------------------
        Engrami LLP
        Licensing & Sales: legal@engrami.ai
        For License Keys, Subscriptions, and Order Forms, contact your Engrami account team.
        
        © Engrami LLP. All rights reserved. "Engrami" and the Engrami logo are trademarks
        of Engrami LLP.
        
        NOTE: This Agreement is a commercial license template provided for the Engrami
        distribution. It should be reviewed and finalized by qualified legal counsel and
        paired with an Order Form before execution.
License-File: LICENSE
Keywords: agent,bi-temporal,graph,llm,mcp,memory,neo4j
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Requires-Dist: aiosqlite>=0.20.0
Requires-Dist: anthropic>=0.40.0
Requires-Dist: anyio>=4.5.0
Requires-Dist: blake3>=0.4.0
Requires-Dist: fastapi>=0.115.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: jinja2>=3.1.0
Requires-Dist: litellm>=1.50.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: neo4j>=5.20.0
Requires-Dist: numpy>=1.26.0
Requires-Dist: openai>=1.50.0
Requires-Dist: opentelemetry-api>=1.27.0
Requires-Dist: opentelemetry-sdk>=1.27.0
Requires-Dist: orjson>=3.10.0
Requires-Dist: pgvector>=0.3.0
Requires-Dist: prometheus-client>=0.21.0
Requires-Dist: psycopg[binary,pool]>=3.2.0
Requires-Dist: pydantic-settings>=2.5.0
Requires-Dist: pydantic>=2.9.0
Requires-Dist: pypdf>=4.0.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: redis>=5.0.0
Requires-Dist: rich>=13.9.0
Requires-Dist: sentence-transformers>=3.0.0
Requires-Dist: sqlalchemy>=2.0.0
Requires-Dist: structlog>=24.4.0
Requires-Dist: tantivy>=0.22.0
Requires-Dist: typer>=0.12.0
Requires-Dist: uvicorn[standard]>=0.32.0
Provides-Extra: cryptlex
Requires-Dist: lexactivator>=3.30.0; extra == 'cryptlex'
Provides-Extra: dev
Requires-Dist: build>=1.2.0; extra == 'dev'
Requires-Dist: mypy>=1.13.0; extra == 'dev'
Requires-Dist: pre-commit>=3.8.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
Requires-Dist: pytest>=8.3.0; extra == 'dev'
Requires-Dist: ruff>=0.7.0; extra == 'dev'
Requires-Dist: twine>=5.1.0; extra == 'dev'
Provides-Extra: neo4j
Requires-Dist: neo4j>=5.20.0; extra == 'neo4j'
Provides-Extra: otel
Requires-Dist: opentelemetry-exporter-otlp>=1.27.0; extra == 'otel'
Provides-Extra: verification
Requires-Dist: z3-solver>=4.13.0; extra == 'verification'
Description-Content-Type: text/markdown

<div align="center">

# Engrami

**The transparent, verifiable memory layer for AI agents.**

Graph + vector + relational memory in one self-hostable datastore — that your team can
*see, search, and trust*. Plug it into any agent as an **MCP server** or call it from the
**SDK**.

</div>

---

## Why Engrami

Agents forget everything between sessions. Bolt-on memory tools (mem0, supermemory) fix
recall — but they're black boxes: you can't see what's stored, why a fact changed, or what
a change might break. For teams shipping real agents, that's a non-starter.

Engrami is built around a different promise: **memory as a glass box.**

| | Engrami |
|---|---|
| **One datastore** | PostgreSQL + **pgvector** (vectors) + **Apache AGE** (native openCypher graph) + relational + a hash-chained journal. Neo4j optional. No separate vector DB. |
| **Transparent** | A live graph UI with search + filters; full provenance + journal timeline per fact; a plain-language **change-log** of every consolidation and forgetting decision. |
| **Verifiable & deterministic** | BLAKE3 hash-chained audit log, per-retrieval verification certificate, an input-hashed extraction cache (same input → same memory). |
| **Active, not passive** | A KG **intelligence layer** warns about cross-domain impacts at memory-time ("this fix touches a node on the checkout-latency path"). |
| **Self-hosted** | Runs entirely in your VPC. Nothing leaves. Licensed via Cryptlex. |

## 60-second quickstart

```bash
# 1. Start the stack (Postgres + pgvector + Apache AGE, and the API)
docker compose -f docker/docker-compose.yml up -d

# 2. Install the SDK/CLI
pip install -e .                 # or: pip install engrami

# 3. Initialize + store + recall
engrami init --tenant demo
engrami observe "Billing uses Postgres for ACID; the pricing call has a 200ms budget." \
  --tenant demo --source user_direct
engrami query "why postgres for billing?" --tenant demo

# 4. See it — the glass box
open http://localhost:8000/viz?tenant=demo
```

**SDK:**
```python
from engrami import EngramiClient

async with EngramiClient(tenant="demo") as mem:
    await mem.add("We tried Redis price caching; it caused stale-price incidents.")
    ctx = await mem.search("can we cache prices?")
    print(ctx["context"])        # LLM-ready facts
    print(ctx["advisories"])     # proactive impact/contradiction warnings
    print(ctx["certificate"])    # audit receipt
```

**MCP (shared in-cluster server):**
```bash
engrami-mcp --transport http --port 8765      # agents connect to http://host:8765/mcp
```

## What's inside

- **Storage** — `GraphStore` interface; default `PostgresStore` (pgvector + tsvector +
  recursive-CTE) or `AgeStore` (native openCypher via Apache AGE); `Neo4jStore` optional.
- **Memory pipeline** — security gate → multi-pass KG extraction (facts → entities/typed
  relations) → embeddings → bi-temporal nodes + edges, all journaled.
- **Retrieval** — hybrid vector + BM25 + RRF + multi-hop graph expansion, with a
  verification certificate and decompression-depth control.
- **Compression** — MERGE / ABSTRACT / PRUNE / ENCODE with pack guardrails, every action
  in the change-log.
- **Intelligence** — impact / dependency / contradiction advisories from the KG.
- **Surfaces** — CLI (`engrami`), MCP server (`engrami-mcp`, stdio or Streamable HTTP),
  HTTP API (`engrami-api`), Python SDK (`EngramiClient`).

## Documentation

- **[MCP connector guide](docs/MCP.md)** — connect an agent (HTTP or stdio), config, tools, the loop.
- **[Python SDK guide](docs/SDK.md)** — install, quickstart, every method with examples + return shapes.
- **[Getting started (engineers)](docs/ONBOARDING_ENGINEERS.md)** — install + an example for
  **every** CLI command, MCP tool, and SDK method.
- **[For executives](docs/ONBOARDING_EXECUTIVES.md)** — value, differentiators, compliance.
- **[Deploy in your VPC](docs/DEPLOYMENT_VPC.md)** — step-by-step, with Helm + Terraform.
- **[Architecture](docs/ARCHITECTURE.md)** · **[MCP tool reference](docs/MCP_COMMANDS.md)** ·
  **[Domain packs](docs/DOMAIN_PACKS.md)**

## License

Engrami is proprietary software © **Engrami LLP**, licensed under the **Engrami LLP
Enterprise Software License Agreement** (see [LICENSE](LICENSE)). It is licensed, not sold;
production use requires a valid License Key issued via Cryptlex. Contact your Engrami
account team for a Subscription. See [DEPLOYMENT_VPC.md](docs/DEPLOYMENT_VPC.md) for
activation in your VPC.
