Skip to content
Dakera-AIPublic

About

Rust SDK for Dakera AI agent memory — self-hosted, 88.2% LoCoMo. HTTP/gRPC, vectors, hybrid search, knowledge graphs, sessions.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

Dakera AI

dakera-rs

Rust client for Dakera AI — the memory engine for AI agents

CI Crate Downloads License: MIT docs.rs LoCoMo 88.2% Playground


Why Dakera?

Dakera Others
LoCoMo Recall@20 88.2% (1,536 Q · LLM-judged retrieval recall) not directly comparable
Deployment Single binary, Docker one-liner External vector DB + embedding service required
Embeddings Built-in — no OpenAI key needed Requires external embedding API
Search modes Vector · BM25 · Hybrid · Knowledge Graph Usually one or two
Transport HTTP (reqwest) + gRPC (tonic), zero-copy HTTP only

→ Try the playground · Full benchmark results · dakera.ai


Run Dakera

docker run -d \
  --name dakera \
  -p 3000:3000 \
  -e DAKERA_ROOT_API_KEY=dk-mykey \
  ghcr.io/dakera-ai/dakera:latest

curl http://localhost:3000/health  # → {"status":"ok"}

For persistent storage with Docker Compose:

curl -sSfL https://raw.githubusercontent.com/Dakera-AI/dakera-deploy/main/docker/docker-compose.yml \
  -o docker-compose.yml
DAKERA_API_KEY=dk-mykey docker compose up -d

Full deployment guide (Docker Compose, Kubernetes, Helm): dakera-deploy


Install

# Cargo.toml
[dependencies]
dakera-client = "0.12"
tokio = { version = "1", features = ["full"] }
serde_json = "1"

Feature flags:

Feature Default Description
http-client ✅ Async HTTP via reqwest
grpc — gRPC transport with connection pooling via tonic
full — Both HTTP and gRPC

For gRPC (lower latency in high-throughput workloads):

dakera-client = { version = "0.12", features = ["grpc"] }

Quick Start

// Cargo.toml: dakera-client = "0.12"
use dakera_client::{DakeraClient, StoreMemoryRequest};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = DakeraClient::builder("http://localhost:3000").api_key("dk-mykey").build()?;
    client.store_memory(StoreMemoryRequest::new("my-agent", "User prefers brevity")).await?;
    Ok(())
}

Full example — store, recall, upsert, and hybrid search:

use dakera_client::{DakeraClient, HybridSearchRequest, RecallRequest, StoreMemoryRequest};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = DakeraClient::builder("http://localhost:3000")
        .api_key("dk-mykey")
        .build()?;

    // Store an agent memory
    let mem = client
        .store_memory(
            StoreMemoryRequest::new("my-agent", "User prefers concise responses with code examples")
                .with_importance(0.9),
        )
        .await?;
    println!("Stored: {}", mem.memory_id);

    // Recall memories (semantic search)
    let response = client
        .recall(RecallRequest::new("my-agent", "what does the user prefer?").with_top_k(5))
        .await?;
    for m in &response.memories {
        println!("[{:.2}] {}", m.importance, m.content);
    }

    // Upsert vectors
    client.upsert("my-namespace", dakera_client::UpsertRequest {
        vectors: vec![dakera_client::Vector {
            id: "vec1".to_string(),
            values: vec![0.1, 0.2, 0.3],
            metadata: None,
        }],
    }).await?;

    // Hybrid search (vector + BM25)
    let results = client
        .hybrid_search(
            "my-namespace",
            HybridSearchRequest::new(vec![0.1, 0.2, 0.3], "completed task", 5),
        )
        .await?;
    for r in &results.results {
        println!("{}: {:.3}", r.id, r.score);
    }

    Ok(())
}

What's new in v0.12.3

dakera-client 0.12.3 supports the Dakera server v0.12.3 (Dakera-AI/dakera#917, #920, #921, #926, #930, #932, #933, #938, #940) and keeps working against v0.12.0 – v0.12.2: every new request field is omitted unless set and every new response field is optional (None / empty from an older server). The neighbourhood modes, include_summaries, matched_text / matched_ids, retrieval, context_of and context_memories need server >= 0.12.3 (an older server ignores the new request fields and answers inline). The super_admin requirement of ops_shutdown and the 422 on unknown admin-request fields are server 0.12.3 behaviour, as are event_time, the truncation report, warnings, the deduplication trash, the autopilot dedup modes and get_memory_by_id.

Recall: at most top_k results, context apart

A recall also returns neighbourhood context: memories written in the same session within a few minutes of the top results. By default (server DAKERA_NEIGHBORHOOD_MODE=inline) they follow the ranked results in memories, so memories.len() can exceed top_k; each has is_neighborhood() true and a score that is not comparable with the ranked results'. Ask for NeighborhoodMode::Separate to keep memories to at most top_k ranked results and get the context in context_memories (each with context_of, the id of the ranked memory it belongs to):

use dakera_client::{DakeraClient, NeighborhoodMode, RecallRequest};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = DakeraClient::new("http://localhost:3000")?;
    let resp = client
        .recall(
            RecallRequest::new("my-agent", "where does Alice live?")
                .with_top_k(3)
                .with_neighborhood_mode(NeighborhoodMode::Separate),
        )
        .await?;
    for m in &resp.memories {
        // at most 3; matched_text / matched_ids: see below
        println!("{} {} {:?}", m.id, m.score, m.matched_text);
    }
    for c in resp.context_memories.iter().flatten() {
        println!("context of {:?}: {}", c.context_of, c.content);
    }
    Ok(())
}

with_include_summaries(bool) says whether session summaries may be recalled (unset: the server's choice). When the server collapses derived sentence sub-memories into their source (DAKERA_RECALL_COLLAPSE_DERIVED), a result is the source memory with matched_ids (the sentences that matched, best first) and matched_text (the best sentence, when it outranked the source's own text); search results carry the same fields. Every new field is omitted from requests unless set and optional in answers, so older servers keep working (they ignore neighborhood_mode and answer inline).

Document import (server v0.12.3+)

A PDF, DOCX, HTML, Markdown or text document becomes a set of chunk memories of an agent: ordinary memories, each sized for the embedding model, with its heading breadcrumb and its provenance (_dakera_document: document id, title, pages, heading path). Recall, search and filters treat them as memories; a result can cite the document, page and section.

use dakera_client::{
    ChunkStrategy, ChunkingOptions, DakeraClient, DocumentImportOptions,
    ImportAttachmentDocumentRequest, ImportDocumentRequest, RecallRequest,
};
use std::time::Duration;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = DakeraClient::new("http://localhost:3000")?;

    // Text, Markdown or HTML given inline
    let accepted = client
        .import_document(
            ImportDocumentRequest::new("docs-bot", "# Manual\n\nInstall it.")
                .with_media_type("text/markdown")
                .with_options(DocumentImportOptions {
                    tags: vec!["manual".into()],
                    chunking: Some(ChunkingOptions {
                        strategy: Some(ChunkStrategy::Structure),
                        ..Default::default()
                    }),
                    ..Default::default()
                }),
        )
        .await?;
    let job = client
        .wait_for_document_job("docs-bot", &accepted.job_id, Duration::from_secs(300))
        .await?;
    assert!(job.is_completed(), "{:?}", job.error);

    // A PDF / DOCX: upload it as an attachment, then import it
    let pdf = std::fs::read("manual.pdf")?;
    let up = client.upload_attachment("library", pdf, "application/pdf").await?;
    client
        .import_attachment_document(
            "library",
            &up.attachment_ref,
            ImportAttachmentDocumentRequest::new("docs-bot").with_document_id("manual-v3"),
        )
        .await?;

    // Cite where a recalled chunk comes from
    let resp = client.recall(RecallRequest::new("docs-bot", "how do I install it?")).await?;
    for m in &resp.memories {
        if let Some(doc) = m.document_chunk() {
            println!("{:?} {:?} p.{:?}", doc.title, doc.heading_path, doc.page_start);
        }
    }
    Ok(())
}

list_documents (cursor paging), get_document (a document and its chunks) and delete_document complete the surface; capabilities().await?.supports_documents() and .documents report whether it is on and its limits. A server with DAKERA_DOCUMENTS off answers 501 (ClientError::FeatureDisabled); a server older than v0.12.3 answers 404, whose message says so. A failed job is Ok with is_failed() and error (413, 422 UNPROCESSABLE_CONTENT, 504 EXTRACTION_TIMEOUT).

Event time, truncation report and ignored fields (server v0.12.3+)

with_event_time says when a memory's event happened — for imports, backfills and replayed conversations — as Unix seconds (i64) or an RFC 3339 string (EventTime). The server records it as metadata _dakera_event_time (EVENT_TIME_META_KEY), and recency, since / until and the time range a query implies then use it instead of the ingest time; created_at stays the ingest time. The single store and each batch item take it; the server refuses a time before 1970 or more than a day in the future with a 400.

A store whose content is longer than the embedding model reads answers truncation (EmbedTruncation: content_tokens, embedded_tokens, max_tokens, windows, tokens_estimated) — the vector covers the first embedded_tokens only. update_memory reports the same for new content, and a batch store lists the cut memories in truncated (TruncatedMemory). Store, batch store, recall and batch recall answers carry warnings: the request fields the server ignored (a misspelt field no longer passes silently).

use dakera_client::memory::{BatchStoreMemoryItem, BatchStoreMemoryRequest};
use dakera_client::{DakeraClient, StoreMemoryRequest};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = DakeraClient::new("http://localhost:3000")?;
    let stored = client
        .store_memory(
            StoreMemoryRequest::new("my-agent", "Met Alice in Lisbon")
                .with_event_time("2023-05-20T02:21:00Z"),
        )
        .await?;
    if let Some(cut) = stored.truncation {
        println!("only {} of {} tokens embedded", cut.embedded_tokens, cut.content_tokens);
    }
    assert!(stored.warnings.is_empty(), "{:?}", stored.warnings);

    let batch = client
        .store_memories_batch(BatchStoreMemoryRequest::new(
            "my-agent",
            vec![BatchStoreMemoryItem::new("Flew back").with_event_time(1_684_663_200i64)],
        ))
        .await?;
    for t in &batch.truncated {
        println!("{} was cut at {} tokens", t.id, t.truncation.embedded_tokens);
    }
    Ok(())
}

with_valid_from (the bi-temporal validity start) is now sent as metadata.valid_from, where the server reads it; a top-level valid_from was ignored. A valid_from already in the metadata wins.

Deduplication trash and autopilot dedup modes (server v0.12.3+)

The autopilot's dedup can run in report mode (find duplicates, delete none) or merge mode, across sessions or not (AutoPilotConfigRequest::dedup_mode, dedup_cross_session, consolidate_cross_session, trash_retention_hours; DEDUP_MODE_OFF / _REPORT / _MERGE). A memory that deduplication or consolidation deleted stays restorable for trash_retention_hours:

use dakera_client::{AutoPilotConfigRequest, DakeraClient, DEDUP_MODE_MERGE};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = DakeraClient::new("http://localhost:3000")?;
    client
        .autopilot_update_config(AutoPilotConfigRequest {
            dedup_mode: Some(DEDUP_MODE_MERGE.to_string()),
            trash_retention_hours: Some(72),
            ..Default::default()
        })
        .await?;
    let trash = client.list_deduplicated("my-agent").await?;
    for m in &trash.memories {
        println!("{} folded into {} ({:?})", m.id, m.survivor_id, m.kind);
    }
    if let Some(m) = trash.memories.first() {
        let restored = client.restore_deduplicated("my-agent", &m.id).await?;
        println!("restored {}", restored.id);
    }
    Ok(())
}

The trigger and status answers report duplicates_found (and the trigger the mode); RuntimeConfig carries the autopilot_* overrides set at runtime. Audit and memory events of type deduplicated (reason names the survivor), consolidated and restored record each step.

Smaller changes (server v0.12.3+)

  • get_memory_by_id(id) finds a memory without its agent (one agent holds it: the memory; none: 404; several: 400 naming them). get_memory with an empty agent id does the same.
  • Recall, search and batch recall for an agent that has stored nothing answer 200 with no memories (older servers answered 404 NAMESPACE_NOT_FOUND).
  • Session ids may contain :; capabilities().naming reports session_id_pattern and session_id_max_bytes.
  • rerank_report.capped: the server's candidate cap left part of the pool unscored.
  • ServerErrorCode::HostNotAllowed (421): with authentication off the server answers only for local and allowed host names; the error keeps the server's message and code.

What's new in v0.12.2

dakera-client 0.12.2 supports the Dakera server v0.12.2 (Dakera-AI/dakera#916) and keeps working against v0.12.0 / v0.12.1: every new request field is omitted unless set, and every new response field is optional (None / empty from an older server). The new routes answer 404 on an older server.

  • Agents — create_agent(agent_id) (POST /v1/agents) creates an agent before its first memory; idempotent (created: false for an existing one).
  • Keys — update_key / update_namespace_key (PATCH) rename a key or replace its namespaces; UpdateKeyRequest tells "unchanged" (field absent), "every namespace" (null) and a list apart. rotate_key_with_grace(key_id, secs) keeps the old key working up to 7 days (old_key_id, old_key_expires_at). whoami() (GET /v1/auth/whoami). KeyInfo gains grants_version and inert_namespaces (grants may now be p* prefix patterns).
  • Sessions — the server ends a session after 4 h without activity by default. SessionStartRequest::with_idle_timeout_secs + start_session_with, touch_session, and Session::{last_activity_at, ended_reason, idle_since, idle_timeout_secs}; store answers carry session_state, batch answers ended_sessions.
  • Listings — agent_memories_with / session_memories_with / wake_up_with: include_derived (derived sentence sub-memories are now left out by default) and content_preview_chars (content_len, content_truncated on each memory). The same preview on FullKnowledgeGraphRequest and CrossAgentNetworkRequest.
  • Admin — derivations_status(), drain_derivations(timeout), set_session_idle_timeout(secs) and RuntimeConfig::session_idle_timeout_secs; node-wide answers list the namespaces they could not include in unavailable.
  • Also — capabilities() reads the v2 auth, naming and sessions blocks; NamespaceKind on namespaces (list_namespaces_with_kinds); duplicates_skipped_changed on deduplication; summaries_skipped on compression.

Behaviour changes of the v0.12.2 server you may hit: sessions are authorized by their agent (no _dakera_sessions grant; end_session with a Read key is 403); stricter validation (400 with the field named); the memory content limit is in bytes; listings leave derived records out unless include_derived=true; idle sessions end after 4 h. See the CHANGELOG.

use dakera_client::{AgentMemoriesOptions, DakeraClient, UpdateKeyRequest};
use dakera_client::memory::SessionStartRequest;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = DakeraClient::builder("http://localhost:3000").api_key("dk-mykey").build()?;

    println!("{} ({})", client.whoami().await?.key_id, client.create_agent("mlx-dev").await?.namespace);

    let session = client
        .start_session_with(&SessionStartRequest::new("mlx-dev").with_idle_timeout_secs(8 * 3600))
        .await?;
    client.touch_session(&session.id).await?;

    let opts = AgentMemoriesOptions { content_preview_chars: Some(200), ..Default::default() };
    for m in client.agent_memories_with("mlx-dev", &opts).await? {
        println!("{} {}{}", m.id, m.content, if m.content_truncated == Some(true) { "…" } else { "" });
    }

    client
        .update_key("dk_key_1a2b3c4d", &UpdateKeyRequest::new().with_namespaces(vec!["_dakera_agent_mlx-*".into()]))
        .await?;
    Ok(())
}

What's new in v0.12.0

dakera-client 0.12.0 supports the Dakera server v0.12.0 and keeps working against v0.11.108 servers. Every v0.12 feature is additive; the routes that need a v0.12 server answer 404 on v0.11.108 and the v0.12-only opt-in features answer 501 FEATURE_DISABLED on a v0.12 server that did not switch them on. The server-side upgrade guide is docs/v0.12/UPGRADE.md in the server release (release notes: the Dakera changelog).

  • Health that tells the truth — health() is healthy only for a 2xx answer with status healthy (v0.11 of this crate reported a starting server's 503 as healthy). ready() parses the 503 body of a starting server instead of failing, live() is the process probe, and wait_until_ready(timeout) waits on GET /health/ready honouring Retry-After. A v0.12 server binds its port while models load, so point readiness at /health/ready.
  • Retry-After — every v0.12 503 carries it. ClientError::ServiceUnavailable { retry_after, .. } and RateLimitExceeded expose it (ClientError::retry_after()), and execute_with_retry waits the advertised time (capped at RetryConfig::max_delay) instead of its own backoff.
  • Clean error mapping — every v0.12 error body is JSON. 413 is QuotaExceeded (a hard namespace quota, now enforced) or PayloadTooLarge (an over-size attachment, record or body); 501 is FeatureDisabled (the message names the variable, for example DAKERA_ATTACHMENTS) or NotImplemented; the new codes are in ServerErrorCode (now exported).
  • capabilities() — GET /v1/capabilities, now with the scoring, attachments, vision and unreadable_records sections next to models, index kinds (ivfpq), search modes (rabitq, search_modes_accepted prose parsed), record kinds and dtypes and query_languages.
  • Attachments — upload_attachment, list_attachments, download_attachment, delete_attachment, speech-to-text jobs (transcribe_attachment, transcription_status), image indexing jobs (index_image_attachment, index_image_status) and wait_for_attachment_job. StoreMemoryRequest::with_attachment_ref points a memory at an upload.
  • Records with named representations — upsert_records and get_record (RecordInput, RepresentationInput with kinds dense / token_multivector / patch_multivector and dtypes f32 / f16 / i8).
  • Per-request lang — with_lang on StoreMemoryRequest, BatchStoreMemoryRequest, RecallRequest (also used for search), UpdateMemoryRequest::lang, extract_entities_with_lang, extract_text_with_lang. Supported languages: capabilities().query_languages.
  • Models — EmbeddingModel::BgeM3 and ColbertSmall; unknown strings from newer servers are kept as Unknown(String) instead of failing.
  • Namespace config — put_namespace_entity_config (PUT, replaces: an omitted entity_types clears the list). PATCH (configure_namespace_ner) merges and refuses unknown fields on v0.12.
  • gRPC — v0.12 requires an API key on every call but Health. GrpcClientConfig::with_api_key (or DAKERA_API_KEY) sends it as x-api-key; gRPC status errors are mapped (UNAUTHENTICATED is an auth error). The RPC paths are now /dakera.v1.VectorService/..., the server's actual proto package.

v0.12.0 in code

use std::time::Duration;

use dakera_client::{
    ClientError, DakeraClient, RecordInput, RecallRequest, RepresentationInput, StoreMemoryRequest,
    TranscribeRequest,
};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = DakeraClient::builder("http://localhost:3000").api_key("dk-mykey").build()?;

    // Wait on /health/ready (a v0.12 server binds its port while models load).
    client.wait_until_ready(Duration::from_secs(120)).await?;

    // Check what this server has switched on.
    let caps = client.capabilities().await?;
    println!("v{} attachments={} records={}", caps.server_version,
        caps.attachments.enabled, caps.supports_records());

    // Per-request language.
    client.store_memory(StoreMemoryRequest::new("my-agent", "Treffen morgen um drei").with_lang("de")).await?;
    client.recall(RecallRequest::new("my-agent", "wann ist das Treffen").with_lang("de")).await?;

    // Attachments: upload a WAV, transcribe it into a memory.
    let up = client.upload_attachment("uploads", std::fs::read("note.wav")?, "audio/wav").await?;
    let job = client
        .transcribe_attachment("uploads", &up.attachment_ref, TranscribeRequest::new("my-agent"))
        .await?;
    let done = client.wait_for_attachment_job(&job.status_url, Duration::from_secs(300)).await?;
    println!("{} -> memory {}", done.status, job.memory_id);

    // Records with a named representation.
    let record = RecordInput::new("r1", vec![0.1, 0.2, 0.3, 0.4]).with_representation(
        RepresentationInput::token_multivector("tokens", vec![vec![0.1, 0.2], vec![0.3, 0.4]]),
    );
    match client.upsert_records("docs", vec![record]).await {
        Err(ClientError::FeatureDisabled { message, .. }) => println!("{message}"),
        other => {
            other?;
        }
    }
    Ok(())
}

Compatibility

Server Works Notes
v0.11.108 yes v0.12-only calls return 404 (capabilities, records, attachments); everything else is unchanged
v0.12.0 yes opt-in features answer 501 FEATURE_DISABLED until the operator enables them
v0.12.1 yes as v0.12.0; the v0.12.2 calls answer 404 and the new fields are None / empty
v0.12.2 yes as v0.12.1 plus the v0.12.2 calls; the v0.12.3 recall fields are ignored / None and the document routes answer 404
v0.12.3 yes everything above

Features

  • Agent Memory — store, recall, search, and forget memories with importance scoring
  • Sessions — group memories by conversation with auto-consolidation on session end
  • Knowledge Graph — traverse memory relationships, find paths, export graphs
  • Vector Search — ANN queries with metadata filters and batch operations
  • Full-Text Search — BM25 ranking with stemming and stop-word filtering
  • Hybrid Search — combine vector similarity with keyword matching
  • Text Auto-Embedding — server-side embedding generation (no local model needed)
  • Namespaces — isolated vector stores per project, tenant, or use case
  • Feedback Loop — upvote/downvote/flag memories to improve recall quality
  • T-I-F Reliability — TifScore struct and evaluate_tif() for Truth-Indeterminacy-Falsity scoring of memory reliability
  • Entity Extraction — GLiNER NER for automatic entity detection
  • SSE Streaming — Server-sent event subscriptions with auto-reconnect
  • Dual Transport — HTTP (default) and gRPC with connection pooling
  • Typed Filters — filter::eq(), filter::gt(), filter::contains() DSL
  • From<T> for FusionStrategy — ergonomic enum conversions, idiomatic Rust API
  • Retry & Rate Limiting — built-in exponential backoff and rate-limit header tracking
  • Builder Pattern — fluent DakeraClientBuilder for configuration

Connect to Dakera

use dakera_client::DakeraClient;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Self-hosted
    let client = DakeraClient::builder("http://your-server:3000")
        .api_key("your-key")
        .build()?;

    // With custom timeouts
    let client = DakeraClient::builder("http://localhost:3000")
        .api_key("your-key")
        .timeout_secs(60)
        .max_retries(5)
        .build()?;
    Ok(())
}

Defaults: a 30 s request timeout (also the connect timeout unless connect_timeout is set), TLS through rustls with the platform verifier and the OS root store (no OpenSSL; certificate and hostname verification always on). Event streams have no overall timeout; they end when the server closes them or the receiver is dropped. The client's methods make one attempt; retrying is opt-in with execute_with_retry (429 / 503 honour Retry-After; max_retries is the number of attempts). Wrap reads and idempotent writes in it: a non-idempotent write such as store_memory can be applied twice when a 5xx or a dropped connection hides that the first attempt succeeded. The API key never appears in Debug output (DakeraClientBuilder, DakeraClient, and RotateEncryptionKeyRequest's new_key are redacted). Requests to the ODE sidecar (ode_url, extract_entities) currently carry the Dakera API key; tracked in Dakera-AI/dakera#924.

ops_shutdown (POST /ops/shutdown) needs a global super_admin key; an admin key gets 403 (ClientError::Authorization) from servers v0.12.3 and later.


Examples

See the examples/ directory:

  • basic.rs — vectors, namespaces, queries, filters
  • memory.rs — store/recall memories, sessions, agent stats
  • advanced.rs — text embedding, full-text, hybrid search, filter DSL

Run examples with:

cargo run --example basic
cargo run --example memory
cargo run --example advanced

Resources

Documentation Full API reference and guides
Rust SDK docs docs.rs API reference
Benchmark LoCoMo evaluation results
dakera.ai Website and early access
GitHub Org All public repos
dakera-deploy Self-hosting guide

Other SDKs

SDK Package
dakera-py dakera (PyPI)
dakera-js @dakera-ai/dakera (npm)
dakera-go github.com/dakera-ai/dakera-go
dakera-cli CLI tool
dakera-mcp MCP server for Claude/Cursor

dakera.ai · Docs · Benchmark · Request Early Access

Built with Rust. Single binary. Zero external dependencies.

About

Rust SDK for Dakera AI agent memory — self-hosted, 88.2% LoCoMo. HTTP/gRPC, vectors, hybrid search, knowledge graphs, sessions.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages