Skip to main content

Python SDK for the Areev knowledge database — HTTP, gRPC, and MCP transports

Project description

Areev Python SDK

Python client library for the Areev knowledge database.

Installation

pip install areev

For gRPC transport:

pip install areev[grpc]

Quick Start

from areev import Areev

areev = Areev()  # reads AREEV_API_KEY, AREEV_URL from env
areev.remember("John likes coffee")

results = areev.recall("what does John like?")
for hit in results.results:
    print(f"  {hit.grain_type}: {hit.fields}")

Configuration

The client reads from environment variables by default:

Variable Default Description
AREEV_API_KEY API key (sent as X-API-Key header)
AREEV_URL https://app.areev.ai Server endpoint
AREEV_MEMORY_ID default Memory database ID

Or pass them explicitly:

areev = Areev(api_key="ar_...", url="https://dub.areev.ai", memory_id="my-memory")

Async

from areev import AsyncAreev

async with AsyncAreev() as areev:
    await areev.remember("John likes coffee")
    results = await areev.recall("what does John like?")

API

Method Description
remember(text) Store natural-language memory (LLM extracts structure)
recall(query) Search memories
forget(hash) Delete a memory by hash
add(grain_type, **fields) Add a typed grain (low-level)
get(hash) Get a grain by hash
supersede(old_hash, grain_type, **fields) Update a grain
health() Health check
stats() Database statistics
flush() Flush write buffer

Low-Level Client

For advanced use cases (custom request objects, full async control):

from areev import HttpClient, AreevConfig, AddRequest, GrainType

config = AreevConfig(url="http://localhost:4009", memory_id="default", api_key="your-key")
async with HttpClient(config) as client:
    resp = await client.add(AddRequest(
        grain_type=GrainType.BELIEF,
        fields={"subject": "john", "relation": "likes", "object": "coffee"},
    ))

Transports

Transport Extra Status
HTTP/REST (default) Available
gRPC areev[grpc] Available
MCP Planned

Code Generation

Generate gRPC stubs and Pydantic models from the Areev spec:

pip install areev[dev]
./scripts/generate.sh

License

BUSL-1.1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

areev-0.1.1.tar.gz (88.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

areev-0.1.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file areev-0.1.1.tar.gz.

File metadata

  • Download URL: areev-0.1.1.tar.gz
  • Upload date:
  • Size: 88.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for areev-0.1.1.tar.gz
Algorithm Hash digest
SHA256 406a4e644ffa9cf7bdc42268abfd55303618ca9357e326af004a50ed20d0426b
MD5 0b1094b11ef68fcfcd9c53237b7cf616
BLAKE2b-256 db316a3679d59e1409cc6f160c00b86c9afc3451e57456dcf5a8345418e9f331

See more details on using hashes here.

File details

Details for the file areev-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: areev-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for areev-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99c4df8ade3e66c6bfad60564697f99bb8612b267b199961df0093e99036f8ec
MD5 a02a5e4a81e7c3262e5e0e9d3bf3be97
BLAKE2b-256 665ec05b6c896471f324b7902d1a963366d6f5d9dfcb243a2cbd000aeb3b06a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page