Metadata-Version: 2.4
Name: fluxmem-sdk
Version: 0.2.0
Summary: Python SDK for FluxMem — dynamic memory + wiki layer for AI systems
Project-URL: Homepage, https://fluxmem.org
Project-URL: Documentation, https://docs.fluxmem.org
Project-URL: Repository, https://github.com/fluxmem/fluxmem
Project-URL: Changelog, https://github.com/fluxmem/fluxmem/blob/main/sdk/CHANGELOG.md
Project-URL: Issues, https://github.com/fluxmem/fluxmem/issues
Author-email: FluxMem <hello@fluxmem.org>
License: MIT
License-File: LICENSE
Keywords: agents,ai,anthropic,claude,knowledge-base,llm,memory,openai,rag,vector-search,wiki
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx>=0.28
Requires-Dist: pydantic>=2.10
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: respx>=0.22; extra == 'dev'
Description-Content-Type: text/markdown

# fluxmem-sdk

Python client for [FluxMem](https://fluxmem.org) — dynamic memory + wiki layer for AI systems.

```bash
pip install fluxmem-sdk
```

## Quickstart

```python
from fluxmem_sdk import FluxMem

fm = FluxMem(api_key="fxm_your_key", namespace="user:default")

# Memory
fm.add(content="User prefers Python", memory_type="procedural")
results = fm.search("preferences")
context = fm.get_context("Tell me about the user", max_tokens=2000)

# Wiki / Articles
article = fm.articles.create(
    title="Deploying to GCP",
    body="## Steps\n\n1. ...\n2. ...",
    article_type="procedure",
    tags=["deploy", "gcp"],
)
articles = fm.articles.search(query="how do we deploy?")
fm.articles.feedback(article["article"]["id"], signal="helpful")

# Unified search across memories + articles
mixed = fm.unified_search("what does the user prefer?")
```

## Async

```python
from fluxmem_sdk import AsyncFluxMem

async with AsyncFluxMem(api_key="fxm_...", namespace="user:default") as fm:
    await fm.add(content="...", memory_type="semantic")
    results = await fm.search("...")
    await fm.articles.create(title="...", body="...", article_type="fact")
```

## Features

- **Memory layer:** episodic / semantic / procedural / deductive with lifecycle (decay → archive → tombstone)
- **Wiki layer:** typed articles (fact / procedure / decision / playbook / anti-pattern / episode) with maturity transitions driven by feedback
- **Hybrid retrieval:** dense + sparse + graph + entity boost via RRF fusion
- **Unified search:** one query across memory + wiki corpora
- **Implicit feedback:** signed `context_token` per search hit — agents mark articles as used/unused to update ranking

## Docs

- Quickstart: <https://docs.fluxmem.org/quickstart>
- API reference: <https://docs.fluxmem.org/api>
- Architecture: <https://docs.fluxmem.org/architecture>

## License

MIT
