Metadata-Version: 2.4
Name: axim-memory-sdk
Version: 0.2.2
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Rust
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
License-File: LICENSE
Summary: Axim Memory SDK: Dual-layer AI memory and extreme vector compression engine for autonomous agents by Cognitus Lab.
Keywords: ai,agents,memory,embeddings,vector-store,quantization,axim,sdk,turboquant
Author: Cognitus Lab
License: Proprietary: Cognitus Lab End User License Agreement (EULA)
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/Cognitus-Lab/Axim-Memory-SDK
Project-URL: Issues, https://github.com/Cognitus-Lab/Axim-Memory-SDK/issues
Project-URL: Repository, https://github.com/Cognitus-Lab/Axim-Memory-SDK

# Axim Memory SDK

[![PyPI Version](https://img.shields.io/pypi/v/axim-memory-sdk.svg)](https://pypi.org/project/axim-memory-sdk/)
[![Python Versions](https://img.shields.io/pypi/pyversions/axim-memory-sdk.svg)](https://pypi.org/project/axim-memory-sdk/)
[![License: Proprietary](https://img.shields.io/badge/License-Cognitus%20Proprietary-red.svg)](./LICENSE)

**Axim Memory SDK™** is an enterprise-grade AI memory and extreme vector compression engine engineered by **Cognitus Lab**. Designed specifically for autonomous AI agents, multi-agent frameworks, and conversational pipelines, it provides instantaneous context recall and persistent local vector storage backed by a compiled, native Rust SIMD core.

---

> ### ⚠️ Proprietary Notice & License Terms
> **Axim Memory SDK™ is 100% Cognitus Lab Property.**
> This software is licensed for execution only under the terms of the **Cognitus Lab Proprietary End User License Agreement (EULA)**.
> - **Execution-Only License:** Conditioned upon compliance with the EULA, users are licensed to download and run compiled packages to power AI workloads.
> - **Strict Restrictions:** Resale, sublicensing, unauthorized mirroring, commercial redistribution, and decompilation/reverse-engineering are strictly prohibited.
> - See the full [LICENSE](./LICENSE) for legal terms.

---

## Key Features

- **⚡ Native Rust SIMD Acceleration:** Core quantization, bitwise Hamming distances, and vector projections are compiled directly into stripped native machine code via Maturin/PyO3.
- **🤖 Drop-in Agent Harness Connectors:** First-class support for autonomous agent loops, prompt synthesis, and tool-calling schemas (OpenAI, Anthropic, Gemini, LangChain, CrewAI, AutoGen).
- **🛡️ Strict User & Tenant Isolation:** Multi-tenant memory management ensures that queries and stored memories are strictly isolated by `user_id`.
- **📦 Zero External Runtime Python Dependencies:** Pure standard library Python with a compiled native engine — zero third-party pip dependencies required.
- **💾 Crash-Resilient Persistence:** Atomic disk-commit protocol guarantees zero file corruption during unexpected power loss or process termination.

---

## Installation

Install the official package directly from PyPI:

```bash
pip install axim-memory-sdk
```

---

## Agent Harness Integration (Quick Start)

Plug Axim Memory directly into any autonomous agent loop:

```python
from axim_memory import AgentMemory

# 1. Define any vector embedding provider (OpenAI, Ollama, Cohere, etc.)
def get_embedding(text: str):
    return [0.1, -0.2, 0.4, 0.8] * 256  # 1024-dimension vector

# 2. Initialize the agent memory harness
memory = AgentMemory(
    embedding_fn=get_embedding,
    storage_path="~/.agent_memory.json",
    original_dim=1024,
    target_dim=128,
)

# 3. Record interactions and episodic facts
memory.remember_interaction(
    user_prompt="I prefer dark mode and concise TypeScript code",
    agent_response="Preferences noted: dark mode and TypeScript.",
    user_id="dev_user",
)

# 4. Inject memory context directly into your LLM system prompt
prompt_context = memory.build_system_prompt_context(
    query="Write a button component",
    user_id="dev_user",
)
print("System Prompt Context:\n", prompt_context)
# Output:
# <user_memory>
# - User: I prefer dark mode and concise TypeScript code Agent: Preferences noted...
# </user_memory>

# 5. Export as an Agent Tool Schema (OpenAI / Anthropic / Gemini function calling)
tool_schema = memory.as_tool()
```

---

## Core Dual-Layer API (`MultiLayerMemory`)

For custom low-level retrieval architectures:

```python
from axim_memory import MultiLayerMemory

mem = MultiLayerMemory(
    embedding_fn=get_embedding,
    original_dim=1024,
    target_dim=128,
)

# Store memory
mem.add("Project deadline is next Friday", user_id="alice")

# Search dual tiers (fast cache + persistent store)
results = mem.search("When is the project due?", user_id="alice")
print(results)
```

---

## Support & Enterprise Licensing

For enterprise licensing inquiries, custom OEM runtime integration, or support:
- **Organization:** Cognitus Lab
- **Repository:** [https://github.com/Cognitus-Lab/Axim-Memory-SDK](https://github.com/Cognitus-Lab/Axim-Memory-SDK)

