# ACIS SDK

> AI Context & Intelligent System — Memory for LLM Applications

## Installation

```bash
pip install acis-memory
```

## Quick Start

```python
from acis import MemoryClient

# Point to your ACIS deployment
client = MemoryClient(
    tenant_id="your-tenant-uuid",
    base_url="https://your-acis-server.com/acis",
)

# Create session
session = client.create_session(user_id="user-123")

# Every turn:
client.add_event(session_id=session.session_id, role="user", content="Hello")
ctx = client.get_context(session_id=session.session_id, query="Hello")

# ctx.messages → pass directly to any LLM (OpenAI, Azure, Anthropic, etc.)
response = your_llm(messages=ctx.messages)

client.add_event(session_id=session.session_id, role="assistant", content=response)

# End conversation
client.close_session(session_id=session.session_id)
```

## What is ACIS?

ACIS provides **persistent memory** for AI assistants. It automatically:
- Stores conversation history (Short-Term Memory)
- Extracts facts, preferences, and constraints (Long-Term Memory)
- Assembles relevant context for every LLM call (token-budgeted)
- Handles memory decay, contradiction detection, and entity graphs

## Requirements

- Python 3.9+
- An ACIS server deployment (contact your admin for `base_url` and `tenant_id`)

## Only Dependency

- `httpx` (HTTP client)

That's it. No PostgreSQL, Redis, Celery, or Django needed on the app side.
