Metadata-Version: 2.4
Name: loom-sdk
Version: 0.1.0
Summary: Official Python client for Loom — the memory layer for research intelligence, by MetaCognition.
Author: MetaCognition
License: MIT
Project-URL: Homepage, https://loom.getmetacognition.com
Project-URL: Documentation, https://loom.getmetacognition.com
Keywords: loom,memory,research,ai,agents,rag,embeddings,sdk
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.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.27
Dynamic: license-file

# loom-sdk

The official Python client for **Loom** — the memory layer for research intelligence,
by MetaCognition.

Give your research agents a persistent, temporal memory: add papers, notes, and data,
then recall exactly what matters — with provenance — across sessions.

## Install

```bash
pip install loom-sdk
```

## Quickstart

Get an API key from the [dashboard](https://loom.getmetacognition.com), then:

```python
from loom_sdk import Loom

mem = Loom(
    org_id="lab",
    user_id="alice",
    base_url="https://api.loom.getmetacognition.com",
    api_key="sk_live_...",
)

# add a paper to memory
mem.ingest_paper(
    "10.1/astro",
    title="Astrocytic calcium signalling",
    text="astrocyte calcium gliotransmission ...",
    oa=True,
)

# search it back — each result carries its source
for span in mem.recall("calcium signalling", budget_tokens=8000):
    print(span["text"], "->", span["provenance"]["paper_doi"])
```

## What you can do

```python
mem.ingest_document("paper.pdf", open("paper.pdf", "rb").read())  # PDF/Excel/Word/CSV/MD/text
mem.put_analysis("10.1/astro", analysis_markdown)                 # extract claims
mem.recall_papers("astrocyte calcium")                            # find papers
mem.graph.link("session_1", used_papers=["10.1/astro"])           # link a session
mem.insights.directions()                                         # novel directions
mem.account.get()                                                 # account + usage
```

The client is a thin wrapper over the Loom HTTP API — every method maps to one call.

## Documentation

Full docs: <https://loom.getmetacognition.com>

## License

MIT
