Areev Rust SDK
Rust client library for the Areev knowledge database.
A grain is one typed memory fact — the atomic unit Areev stores (e.g. the Fact "John likes coffee"). Everything in this SDK ultimately reads or writes grains.
Installation
[]
= "1"
For gRPC transport:
[]
= { = "1", = ["grpc"] }
Quick Start
use Areev;
async
Configuration
The client reads from environment variables by default:
| Variable | Default | Description |
|---|---|---|
AREEV_API_KEY |
— | API key (sent as Authorization: Bearer <key>) |
AREEV_URL |
https://app.areev.ai |
Server endpoint |
AREEV_MEMORY_ID |
default |
Memory database ID |
Or pass them explicitly:
let areev = new;
API
The top-level [Areev] client exposes two bare verbs (remember /
recall) plus a resource accessor for every domain. The namespaces split
into two groups.
Known limitation (v1.0). Most resource-layer methods return
serde_json::Valuerather than typed response structs — reach into theValuefor fields. A handful of surfaces are already typed (e.g.recall()results,connectors()). Typed response models for the remaining resources (recall/chat/harness → structs) land in v1.1.
Core — what most integrations use day to day:
| Entry point | What it's for |
|---|---|
remember(text) / recall(query) |
Store NL memory (LLM extracts structure) / search it |
grains() |
Typed grain CRUD: add, get, supersede, forget, recall, cal, … |
harness() |
Flow-A chat: chat, chat_resume, chat_cancel, chat_session/chat_interactive |
tools() |
v1 tools surface — bind/list/invoke tools on a harness |
connectors() |
Third-party connector catalog + OAuth (Axtion-backed): list, actions, authorize, poll_oauth, store_credentials |
memories() |
Memory-database lifecycle + stats |
system() |
health, stats, config, models |
Advanced / Compliance — governance, identity, and ingestion surfaces
you reach for as you scale: compliance() (GDPR/CCPA audit, export,
verify), consent(), scope(), policy(), authz(),
agent_identities(), sessions(), namespaces(), provenance(),
preferences(), hooks(), goals(), chat(), connections(),
knowledge_sources(), imports().
let areev = from_env;
// Typed grain ops via the grains resource.
let hash = areev.grains.add.await?;
let grain = areev.grains.get.await?;
// System ops.
let _health = areev.system.health.await?;
Full flow
connect → remember/recall → create a harness and chat → register a client-side tool → connect a third-party connector and bind one of its actions as a tool — without hand-writing a single JSON Schema:
use Pin;
use ;
use json;
async
Connectors
connectors() is the catalog + OAuth surface (backed by Axtion). All
methods return clean, parsed data — provider tokens never touch the SDK.
Naming, disambiguated.
connectors()is the third-party connector catalog + OAuth (Gmail, Slack, …);connections()manages a memory's live data-source connections (Knowledge Sources);chat()is the stateless completions endpoint; andharness()is the stateful LLM-plus-tools runtime you create, bind tools to, and converse with.
| Method | Returns |
|---|---|
connectors().list() |
Vec<ConnectorSpec> — {name, display_name, category, version} |
connectors().get(name) |
Raw connector detail (metadata + action descriptors) |
connectors().actions(name) |
Vec<ConnectorAction> — {name, display_name, description, param_schema, required} |
connectors().authorize(name, redirect_uri) |
AuthorizeResponse — {authorize_url, state, ..} |
connectors().poll_oauth(name, state) |
Raw {status: "pending"|"success"|"error"|"expired", ..} |
connectors().store_credentials(body) |
Store API-key credentials (non-OAuth connectors) |
let catalog = areev.connectors.list.await?;
// → [ConnectorSpec { name: "gmail", display_name: "Google Gmail",
// category: "Communication", version: "1.0.0" }, ...]
let actions = areev.connectors.actions.await?;
// → [ConnectorAction { name: "send-email", display_name: "Send Email",
// param_schema: {...}, required: ["to", "subject", "body"] }, ...]
Prerequisite — redirect-uri allowlist. The
redirect_uriyou pass toconnectors().authorize(...)must be pre-registered on your org by an admin. An unregistered URI is rejected before any provider redirect — the call raises [AreevError::Validation] (HTTP 400). Register your callback URL(s) in org settings before going live.
tools().bind_axtion(slug, connector, action) then looks up the action's
parameter schema from connectors().actions() and binds it for you — so
the agent gets a fully-typed tool without you writing any JSON Schema.
Harness Chat
Use harness().chat_session(slug) to drive a harness (Areev's
LLM-plus-tools runtime) with client-side tool executors. The builder runs
the pause/resume loop for you when the model calls a client:// tool, and
names each argument so the call site stays readable:
use Pin;
use ;
use json;
let areev = from_env;
let mut executors: ChatExecutors = new;
executors.insert;
let response = areev
.harness
.chat_session
.conversation_id // omit for a fresh single-shot turn
.message
.executors
.send
.await?;
println!;
harness().chat_interactive(slug, conversation_id, message, &executors)
is the equivalent positional form. harness().chat,
harness().chat_resume, and harness().chat_cancel are the low-level
primitives if you want to run the loop yourself.
Transports
| Transport | Feature | Default |
|---|---|---|
| HTTP/REST | http |
Yes |
| gRPC | grpc |
No |
License
BUSL-1.1