Skip to content

Support managed and self-hosted Cognee and Supermemory - #17

Merged
senamakel merged 2 commits into
mainfrom
cognee-supermemory
Aug 16, 2026
Merged

Support managed and self-hosted Cognee and Supermemory#17
senamakel merged 2 commits into
mainfrom
cognee-supermemory

Conversation

@senamakel

Copy link
Copy Markdown
Member

Summary

Add production-ready Cognee and Supermemory adapters that conform to the standard Memory interface. Both adapters now support managed APIs with credentials and self-hosted endpoints, translate arbitrary TinyMemory namespaces into provider-safe identifiers, and use each provider’s documented create, search, update, list, and delete behavior.

Related issue

None.

API or behavior changes

Additive public API changes:

  • Cognee adds api, cloud, and self_hosted constructors plus COGNEE_API_ENDPOINT; managed authentication uses X-Api-Key and self-hosted authentication supports an optional bearer token.
  • Supermemory adds api, cloud, and self_hosted constructors plus SUPERMEMORY_API_ENDPOINT; both deployment modes support bearer credentials.
  • Existing new constructors remain available as self-hosted aliases.
  • Cognee upserts now use the documented atomic update endpoint instead of delete-then-create.

No breaking changes.

Validation

Commands actually run, with their outcome:

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo build --all-targets --all-features
  • cargo test --all-features

All passed locally.

Tests

Expanded deterministic mock-server coverage for both adapters, including managed and self-hosted authentication, credential redaction, blank-key rejection, arbitrary Unicode and long namespace/key mapping, update/upsert behavior, search translation, interface conformance, and full memory round trips. Live provider calls remain intentionally outside the default test suite because repository tests must be network-independent.

Documentation

Updated the root README, remote-engine integration guide, and conformance example with managed and self-hosted setup for both providers.

Checklist

  • The change is focused on one logical change
  • No new #[allow(...)], #[ignore], or relaxed lints
  • No secrets, tokens, or .env contents in the diff or the description

senamakel and others added 2 commits August 16, 2026 18:04
The tinycortex vendored dependency is advanced to commit be7b395, incorporating upstream fixes and improvements. No local changes are required.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@senamakel, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 44 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7205b92e-442c-4c4a-9513-1a3243d60523

📥 Commits

Reviewing files that changed from the base of the PR and between b7f2d6a and ad4cd1b.

📒 Files selected for processing (9)
  • README.md
  • adapters/remote/examples/conformance.rs
  • adapters/remote/src/cognee.rs
  • adapters/remote/src/cognee_test.rs
  • adapters/remote/src/common.rs
  • adapters/remote/src/lib.rs
  • adapters/remote/src/supermemory.rs
  • adapters/remote/src/supermemory_test.rs
  • integration/remote-engines/README.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.1392 · 238,420 in / 50,770 out · 20,224 cached (8%) · openrouter/openai/text-embedding-3-small, deepseek/deepseek-v4-pro-0813 · 738 embedded
critique:    $0.0729 · 119,035 in / 29,569 out · 10,624 cached (9%) · deepseek/deepseek-v4-pro-0813
security:    $0.0433 · 87,763 in  / 8,961 out  · 6,272 cached (7%)  · deepseek/deepseek-v4-pro-0813
tests:       $0.0122 · 20,067 in  / 4,779 out  · 1,664 cached (8%)  · deepseek/deepseek-v4-pro-0813
description: $0.0108 · 11,555 in  / 7,461 out  · 1,664 cached (14%) · deepseek/deepseek-v4-pro-0813

supermemory https://api.supermemory.ai "$SUPERMEMORY_API_KEY"

cargo run -p tinymemory-remote --example conformance -- \
cognee-api https://api.cognee.ai "$COGNEE_API_KEY"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

priority medium critique confident

Use the correct cognee driver identifier, not cognee-api

The earlier self-hosted example on line 24 invokes -- cognee http://localhost:8001. The managed-service example uses cognee-api, which is a different driver identifier and will cause the conformance command to reject the unknown driver. The Cognée adapter exposes a single driver (cognee); there is no separate cognee-api variant. Change cognee-api to cognee so the command works.

[RULE] incorrect-driver-identifier ·

Comment thread README.md
use tinymemory_remote::{SupermemoryMemory, supermemory_provider};

let memory = SupermemoryMemory::new("http://localhost:6767", Some("sm_..."))?;
let memory = SupermemoryMemory::self_hosted("http://localhost:6767", "sm_...")?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

priority medium critique uncertain

Restore new or add the new constructors before documenting them

The README example changes the constructor from SupermemoryMemory::new to SupermemoryMemory::self_hosted, and adds cloud and api constructors for both adapters. However, the repository context shows existing code calling SupermemoryMemory::new and CogneeMemory::new, and no evidence of self_hosted, cloud, or api methods. These examples will not compile for users following them. Update the README after the corresponding Rust code is added or revert the example to use the existing new constructor.

[RULE] doc-example-mismatch ·

/// Encodes a TinyMemory namespace as a collision-free Cognee dataset name.
fn dataset_name(namespace: &str) -> String {
format!("tinymemory__{}", encode(namespace))
format!("tinymemory__{}", stable_id("dataset", namespace))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

priority medium critique uncertain

Preserve existing dataset names when switching ID encoding

Changing the dataset name from format!("tinymemory__{}", encode(namespace)) to format!("tinymemory__{}", stable_id("dataset", namespace)) alters the generated dataset identifiers. Existing Cognee deployments that stored data under the old naming scheme will no longer match datasets, causing stored records to be invisible and possibly duplicated on re-upload. Consider a migration strategy or keep the previous encoding for existing namespaces.

[RULE] backward-compat ·

@tinysweeper

tinysweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown

How this change flows

5 changed behaviours across 14 relationships. 6 surrounding behaviours are shown (60 graph nodes walked). 45 further behaviours left out to keep the diagram readable.

flowchart LR
  n0["main<br/>changed"]:::changed
  n1["CogneeDialect<br/>changed<br/>1 finding"]:::flagged
  n2["CogneeMemory<br/>changed<br/>1 finding"]:::flagged
  n3["Dataset<br/>changed<br/>1 finding"]:::flagged
  n4["...ognee_round_trips_the_tinymemory_contract<br/>changed"]:::changed
  n5["json"]:::impacted
  n6["audit_provider"]:::impacted
  n7["Memory"]:::impacted
  n8["..._mem0_round_trips_the_tinymemory_contract"]:::impacted
  n9["serve"]:::impacted
  n10["dataset_entries"]:::impacted
  n0 -->|calls| n6
  n2 -->|uses| n1
  n2 -->|implements| n7
  n4 -->|uses| n2
  n4 -->|calls| n6
  n4 -->|tests| n6
  n4 -->|calls| n9
  n4 -->|tests| n9
  n8 -->|calls| n6
  n8 -->|tests| n6
  n8 -->|calls| n9
  n8 -->|tests| n9
  n10 -->|uses| n3
  n10 -->|calls| n5
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading

Green: changed behaviour. Grey: surrounding behaviour. Arrows name the call, use, implementation, or test relationship. Orange: has findings. Red: has a finding that blocks the merge.

tinysweeper 0.1.0

@tinysweeper tinysweeper Bot added the priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later. label Aug 16, 2026
@senamakel
senamakel merged commit cfb4d08 into main Aug 16, 2026
17 checks passed
@senamakel
senamakel deleted the cognee-supermemory branch August 20, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant