Skip to content

feat(sdk-cpp): complete C++ SDK feature parity with all memory API endpoints#33

Merged
Al629176 merged 8 commits intotinyhumansai:mainfrom
oxoxDev:feat/sdk-cpp-feature-parity
Mar 25, 2026
Merged

feat(sdk-cpp): complete C++ SDK feature parity with all memory API endpoints#33
Al629176 merged 8 commits intotinyhumansai:mainfrom
oxoxDev:feat/sdk-cpp-feature-parity

Conversation

@oxoxDev
Copy link
Contributor

@oxoxDev oxoxDev commented Mar 24, 2026

Overview

Brings the C++ SDK to full feature parity with the Python/TypeScript SDKs, adding 14 new endpoints, HTTP GET/DELETE support, X-Model-Id header, and migrating all paths from /v1/memory/... to /memory/....

Changes

Infrastructure

  • Migrated all 5 existing endpoint paths from /v1/memory/... to /memory/...
  • Added model_id field with X-Model-Id header on all requests (default: neocortex-mk1)
  • Added 3-arg constructor (token, model_id, base_url) (backward-compatible)
  • Added send_get() and send_delete() internal methods with query string URL encoding via curl_easy_escape()
  • Updated move constructor/assignment to include model_id_

New Endpoints (14)

  • Chat: chat_memory, chat_memory_context
  • Interactions: interact_memory, record_interactions
  • Advanced Recall: recall_thoughts, query_memory_context
  • Documents: insert_document, insert_documents_batch, list_documents, get_document, delete_document
  • Admin/Utility: get_graph_snapshot, get_ingestion_job, wait_for_ingestion_job

Types

  • Added param structs: ChatMemoryParams, InteractMemoryParams, RecallThoughtsParams, QueryMemoryContextParams, InsertDocumentParams, InsertDocumentsBatchParams, ListDocumentsParams, GetDocumentParams, GraphSnapshotParams, WaitForIngestionJobOptions
  • GET param structs use to_query_params() returning map<string,string> instead of to_json()

Tests

  • Added last_method() and last_path() helpers to MockHttpServer
  • Unit tests for all 14 new endpoints (path, body/query params, validation)
  • Updated integration test with all new endpoints

Testing

  • All unit tests pass (make test)
  • Integration tested against staging API
  • Verified: insert, recall, recall_memories, insert_document, insert_documents_batch, list_documents, interact_memory, record_interactions, recall_thoughts all return successful responses
  • Known staging issues (query_memory_context: permission error, delete_memory: 500) confirmed as server-side, not SDK

Notes

New endpoints return nlohmann::json (not typed response structs), matching the Go/Java SDK pattern for newer endpoints. Existing 5 methods retain their typed responses for backward compatibility.

oxoxDev and others added 8 commits March 24, 2026 15:08
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…HttpServer helpers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add chat_memory, chat_memory_context, interact_memory, record_interactions
methods with ChatMemoryParams and InteractMemoryParams types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add recall_thoughts and query_memory_context methods with
RecallThoughtsParams and QueryMemoryContextParams types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add insert_document, insert_documents_batch, list_documents, get_document,
delete_document, get_graph_snapshot, get_ingestion_job, and
wait_for_ingestion_job methods with all associated param types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…API parity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Server expects entityNames (not entities) for interact/record endpoints,
and items (not documents) for batch document insert.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Al629176 Al629176 merged commit 9425f44 into tinyhumansai:main Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants