Metadata-Version: 2.4
Name: openmemo-openclaw
Version: 0.1.0
Summary: OpenMemo Cognitive Memory Adapter for OpenClaw Agents
Author-email: OpenMemo <hello@openmemo.ai>
License: MIT
Project-URL: Homepage, https://github.com/openmemoai/openmemo-openclaw-adapter
Project-URL: Documentation, https://openmemo.ai
Project-URL: Repository, https://github.com/openmemoai/openmemo-openclaw-adapter
Keywords: openmemo,openclaw,agent,memory,cognitive
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: openmemo>=0.4.0
Requires-Dist: requests>=2.28
Provides-Extra: yaml
Requires-Dist: pyyaml>=6.0; extra == "yaml"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"

# OpenMemo × OpenClaw Adapter

Cognitive Memory Backend for OpenClaw Agents.

## Install

```bash
pip install openmemo-openclaw
```

## Quick Start

```python
from openmemo_openclaw import OpenClawMemoryPlugin

plugin = OpenClawMemoryPlugin(
    persona_id="python_architect",
    backend="library",  # or "local_api", "cloud_api"
)

# Hook lifecycle events
plugin.on_message("deploy my app")
plugin.on_response("Using Docker to deploy", tools=["docker"])
plugin.on_tool_call("docker", "build succeeded")
plugin.on_task_complete("Deployed app via Docker")

# Enhance prompts with memory
prompt = plugin.enhance_prompt("Which language should I use?")
# → includes: "User prefers Python backend"

# Direct recall
memories = plugin.recall("deployment tools")
```

## Configuration

```python
from openmemo_openclaw import AdapterConfig

config = AdapterConfig(
    backend="local_api",              # library | local_api | cloud_api
    endpoint="http://localhost:8765",  # Local API server
    persona_id="python_architect",
    injection_strategy="system",      # system | user_prefix
    conflict_policy="suppress",
    max_injected_items=5,
    max_memory_tokens=200,
)
```

## Architecture

```
OpenClaw Agent
│
▼
OpenClaw Plugin (lifecycle hooks)
│
▼
OpenMemo Adapter (orchestration)
│
▼
OpenMemo Memory Core (storage + recall)
```

## Features

- Scene-aware recall (coding, debug, deployment, research)
- Recency-aware ranking
- Conflict suppression
- Async memory writes with retry
- Cold start handling
- System / user_prefix prompt injection

## License

MIT
