Metadata-Version: 2.4
Name: echograph-rag
Version: 0.2.1
Summary: Official Python SDK & Local-First RAG Memory Engine for AI Agents
Author-email: EchoGraph Team <support@echograph.ai>
Project-URL: Homepage, http://localhost:5173
Project-URL: Documentation, http://localhost:5173/docs
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.25.0
Requires-Dist: sentence-transformers>=2.2.0
Requires-Dist: mcp>=1.0.0

# EchoGraph Python SDK

Official Python Client for the **EchoGraph Cognitive Memory Engine**. Easily connect long-term episodic memory to your LLMs (OpenAI, Gemini, Claude, LangChain, or custom agents).

# 🚀 1-Step Zero-Config Setup

Users can set up everything with **two simple commands**:

```bash
pip install echograph
echograph setup
```

That's it! `echograph setup` automatically detects the operating system (macOS, Windows, or Linux), locates Claude Desktop's configuration file, and registers the **EchoGraph Local SQLite RAG MCP Server**.

---

# 🛠️ CLI Commands

| Command | Description |
|---|---|
| `echograph setup` | Automatically configures Claude Desktop MCP server (zero manual JSON editing) |
| `echograph list` | Lists all local SQLite RAG memories |
| `echograph store "text"` | Stores a new memory into local SQLite DB |
| `echograph search "query"` | Performs semantic RAG vector search locally |
| `echograph sync` | Uploads local SQLite data to cloud server |
| `echograph pull` | Downloads cloud memories onto local device |

---


### 1. Local-First Mode (Offline SQLite Database)

Stores and retrieves RAG memories locally at `~/.echograph/echograph_local.db` with sub-millisecond response times. Zero server required!

```python
from echograph import EchoGraphClient

# Initialize local-first client (default)
client = EchoGraphClient(local_first=True)

# Store memory locally in SQLite
client.store("User prefers dark mode UI and SQLite database", type="preference")

# Search local RAG context
context = client.format_context("database preferences")
print(context)
```

### 2. On-Demand Cloud Sync ("Upload to Cloud")

Uploads all local SQLite memories to the EchoGraph cloud server when requested by user or sync routine:

```python
client.authenticate("user@example.com", "your_password")

# Upload all un-synced local memories to cloud
sync_res = client.upload_to_cloud()
print(sync_res)

# Pull synced cloud memories onto a new device
pull_res = client.pull_from_cloud()
print(pull_res)
```

