supermemory/apps/docs/docs.json
Dhravya 984297b62d
Add Supermemory integration for Microsoft Agent Framework (#775)
## Summary

This PR introduces comprehensive Supermemory integration for the Microsoft Agent Framework, providing three complementary approaches to add persistent memory capabilities to agents: middleware for automatic memory injection, context providers for session-based memory management, and tools for explicit memory operations.

## Key Changes

- **SupermemoryChatMiddleware**: Automatic memory injection middleware that fetches relevant memories from Supermemory before LLM calls and optionally saves conversations. Supports three modes:
  - `"profile"`: Injects all static and dynamic profile memories
  - `"query"`: Searches for memories relevant to the current user message
  - `"full"`: Combines both profile and query modes

- **SupermemoryContextProvider**: Idiomatic context provider following the Agent Framework pattern (similar to built-in Mem0 integration). Integrates with the session pipeline via `before_run()` and `after_run()` hooks for automatic memory retrieval and storage.

- **SupermemoryTools**: FunctionTool-compatible tools that agents can use for explicit memory operations:
  - `search_memories()`: Search for specific memories
  - `add_memory()`: Add new memories
  - `get_profile()`: Retrieve user profile

- **Utility Functions**: Helper functions for:
  - Memory deduplication across static, dynamic, and search result sources
  - Profile-to-markdown conversion for LLM consumption
  - Message extraction and conversation formatting
  - Logging with configurable verbosity

- **Exception Hierarchy**: Custom exceptions for better error handling:
  - `SupermemoryConfigurationError`: Missing/invalid configuration
  - `SupermemoryAPIError`: API request failures
  - `SupermemoryNetworkError`: Network connectivity issues
  - `SupermemoryMemoryOperationError`: Memory operation failures

- **Comprehensive Documentation**: README with quick start examples, configuration options, and API reference for all three integration approaches.

- **Test Suite**: Unit tests covering middleware, context provider, tools, and utility functions with proper mocking and error scenarios.

## Implementation Details

- Supports both async (aiohttp) and sync (requests) HTTP clients with automatic fallback
- Handles multiple message formats (dict, objects with attributes, content arrays)
- Configurable memory storage with optional conversation grouping via `conversation_id`
- Environment variable fallback for API key configuration (`SUPERMEMORY_API_KEY`)
- Background task management for non-blocking memory operations in middleware
- Proper async/sync compatibility for the Supermemory SDK

https://claude.ai/code/session_012idB5y6UGK3zmeFULgTc4z
2026-03-10 01:49:45 +00:00

493 lines
10 KiB
JSON

{
"$schema": "https://mintlify.com/docs.json",
"api": {
"examples": {
"defaults": "required",
"languages": ["javascript", "python", "curl"]
},
"openapi": "https://api.supermemory.ai/v3/openapi"
},
"colors": {
"dark": "#1E3A8A",
"light": "#3B82F6",
"primary": "#1E3A8A"
},
"contextual": {
"options": ["copy", "view", "chatgpt", "claude"]
},
"favicon": "/favicon.png",
"fonts": {
"body": {
"family": "Space Grotesk",
"format": "woff2"
},
"heading": {
"family": "Space Grotesk",
"format": "woff2"
}
},
"footer": {
"socials": {
"github": "https://github.com/supermemoryai",
"linkedin": "https://linkedin.com/company/supermemoryai",
"x": "https://x.com/supermemory"
}
},
"icons": {
"library": "lucide"
},
"logo": {
"dark": "/logo/dark.svg",
"light": "/logo/light.svg"
},
"name": "supermemory | Memory API for the AI era",
"navbar": {
"links": [
{
"href": "mailto:support@supermemory.com",
"label": "Support"
}
],
"primary": {
"href": "https://console.supermemory.ai",
"label": "Dashboard",
"type": "button"
}
},
"navigation": {
"tabs": [
{
"icon": "code",
"anchors": [
{
"anchor": "Your Dashboard",
"href": "https://console.supermemory.ai",
"icon": "play"
},
{
"anchor": "Developer Platform",
"pages": [
{
"group": "Getting Started",
"pages": ["intro", "quickstart", "vibe-coding"]
},
{
"group": "Concepts",
"pages": [
"concepts/how-it-works",
"concepts/graph-memory",
"concepts/content-types",
"concepts/super-rag",
"concepts/memory-vs-rag",
"concepts/filtering",
"concepts/user-profiles",
"concepts/customization",
"authentication"
]
},
{
"group": "Using supermemory",
"pages": [
"add-memories",
"search",
"user-profiles",
{
"group": "Manage Content",
"icon": "folder-cog",
"pages": ["document-operations", "memory-operations"]
},
"overview/use-cases"
]
},
{
"group": "Connectors and sync",
"pages": [
"connectors/overview",
{
"group": "Connectors",
"icon": "plug",
"pages": [
"connectors/notion",
"connectors/google-drive",
"connectors/gmail",
"connectors/onedrive",
"connectors/s3",
"connectors/github",
"connectors/web-crawler"
]
},
"connectors/troubleshooting",
"memory-api/connectors/managing-resources"
]
},
{
"group": "Migration Guides",
"pages": [
{
"group": "From another provider",
"icon": "truck",
"pages": ["migration/from-mem0", "migration/from-zep"]
}
]
}
]
},
{
"anchor": "Supermemory MCP",
"icon": "terminal",
"pages": ["supermemory-mcp/mcp", "supermemory-mcp/setup"]
}
],
"tab": "Developer Platform"
},
{
"icon": "plug",
"anchors": [
{
"anchor": "API Integrations",
"pages": [
"integrations/supermemory-sdk",
"integrations/ai-sdk",
"integrations/openai",
"integrations/langgraph",
"integrations/openai-agents-sdk",
"integrations/agent-framework",
"integrations/mastra",
"integrations/langchain",
"integrations/crewai",
"integrations/agno",
"integrations/memory-graph",
"integrations/claude-memory",
"integrations/pipecat",
"integrations/n8n",
"integrations/viasocket",
"integrations/zapier"
]
}
],
"tab": "API Integrations"
},
{
"icon": "puzzle",
"anchors": [
{
"anchor": "Plugins",
"pages": [
"integrations/openclaw",
"integrations/claude-code",
"integrations/opencode"
]
}
],
"tab": "Plugins"
},
{
"icon": "book-open",
"anchors": [
{
"anchor": "API Reference",
"icon": "unplug",
"openapi": "https://api.supermemory.ai/v3/openapi"
}
],
"tab": "API Reference"
},
{
"icon": "flask-conical",
"anchors": [
{
"anchor": "MemoryBench",
"icon": "flask-conical",
"pages": [
"memorybench/overview",
"memorybench/github",
{
"group": "Getting Started",
"pages": ["memorybench/installation", "memorybench/quickstart"]
},
{
"group": "Development",
"pages": [
"memorybench/architecture",
"memorybench/extend-provider",
"memorybench/extend-benchmark",
"memorybench/contributing"
]
},
{
"group": "Reference",
"pages": ["memorybench/cli", "memorybench/integrations"]
}
]
}
],
"tab": "MemoryBench"
},
{
"icon": "chef-hat",
"anchors": [
{
"anchor": "Cookbook",
"icon": "chef-hat",
"pages": [
"cookbook/overview",
{
"group": "Quick Start Recipes",
"pages": [
"cookbook/personal-assistant",
"cookbook/document-qa",
"cookbook/customer-support",
"cookbook/ai-sdk-integration",
"cookbook/perplexity-supermemory",
"cookbook/chat-with-gdrive"
]
}
]
}
],
"tab": "Cookbook"
},
{
"icon": "list-ordered",
"anchors": [
{
"anchor": "Changelog",
"pages": ["changelog/overview", "changelog/developer-platform"]
}
],
"tab": "Changelog"
}
]
},
"redirects": [
{
"destination": "/integrations/openclaw",
"permanent": true,
"source": "/integrations/clawdbot"
},
{
"destination": "/intro",
"permanent": false,
"source": "/"
},
{
"destination": "/concepts/how-it-works",
"permanent": true,
"source": "/how-it-works"
},
{
"destination": "/concepts/memory-vs-rag",
"permanent": true,
"source": "/memory-vs-rag"
},
{
"destination": "/integrations/supermemory-sdk",
"permanent": true,
"source": "/memory-api/sdks/overview"
},
{
"destination": "/integrations/supermemory-sdk",
"permanent": true,
"source": "/memory-api/sdks/native"
},
{
"destination": "/integrations/openai",
"permanent": true,
"source": "/memory-api/sdks/openai-plugins"
},
{
"destination": "/integrations/ai-sdk",
"permanent": true,
"source": "/ai-sdk/overview"
},
{
"destination": "/integrations/ai-sdk",
"permanent": true,
"source": "/ai-sdk/user-profiles"
},
{
"destination": "/integrations/ai-sdk",
"permanent": true,
"source": "/ai-sdk/memory-tools"
},
{
"destination": "/integrations/ai-sdk",
"permanent": true,
"source": "/ai-sdk/infinite-chat"
},
{
"destination": "/integrations/memory-graph",
"permanent": true,
"source": "/memory-graph/overview"
},
{
"destination": "/integrations/memory-graph",
"permanent": true,
"source": "/memory-graph/installation"
},
{
"destination": "/integrations/memory-graph",
"permanent": true,
"source": "/memory-graph/quickstart"
},
{
"destination": "/integrations/memory-graph",
"permanent": true,
"source": "/memory-graph/api-reference"
},
{
"destination": "/integrations/memory-graph",
"permanent": true,
"source": "/memory-graph/examples"
},
{
"destination": "/integrations/pipecat",
"permanent": true,
"source": "/voice-realtime/pipecat"
},
{
"destination": "/integrations/n8n",
"permanent": true,
"source": "/n8n"
},
{
"destination": "/integrations/zapier",
"permanent": true,
"source": "/zapier"
},
{
"destination": "/concepts/filtering",
"permanent": true,
"source": "/search/filtering"
},
{
"destination": "/add-memories",
"permanent": true,
"source": "/add-memories/overview"
},
{
"destination": "/add-memories",
"permanent": true,
"source": "/add-memories/parameters"
},
{
"destination": "/add-memories",
"permanent": true,
"source": "/memory-api/ingesting"
},
{
"destination": "/add-memories",
"permanent": true,
"source": "/add-memories/examples/basic"
},
{
"destination": "/add-memories",
"permanent": true,
"source": "/add-memories/examples/file-upload"
},
{
"destination": "/search",
"permanent": true,
"source": "/search/overview"
},
{
"destination": "/search",
"permanent": true,
"source": "/search/parameters"
},
{
"destination": "/search",
"permanent": true,
"source": "/search/response-schema"
},
{
"destination": "/search",
"permanent": true,
"source": "/search/query-rewriting"
},
{
"destination": "/search",
"permanent": true,
"source": "/search/reranking"
},
{
"destination": "/search",
"permanent": true,
"source": "/search/examples/document-search"
},
{
"destination": "/search",
"permanent": true,
"source": "/search/examples/memory-search"
},
{
"destination": "/concepts/user-profiles",
"permanent": true,
"source": "/user-profiles/overview"
},
{
"destination": "/user-profiles",
"permanent": true,
"source": "/user-profiles/api"
},
{
"destination": "/user-profiles",
"permanent": true,
"source": "/user-profiles/examples"
},
{
"destination": "/concepts/user-profiles",
"permanent": true,
"source": "/user-profiles/use-cases"
},
{
"destination": "/add-memories",
"permanent": true,
"source": "/update-delete-memories/overview"
},
{
"destination": "/document-operations",
"permanent": true,
"source": "/memory-api/track-progress"
},
{
"destination": "/document-operations",
"permanent": true,
"source": "/list-memories/overview"
},
{
"destination": "/document-operations",
"permanent": true,
"source": "/list-memories/examples/basic"
},
{
"destination": "/document-operations",
"permanent": true,
"source": "/list-memories/examples/filtering"
},
{
"destination": "/document-operations",
"permanent": true,
"source": "/list-memories/examples/pagination"
},
{
"destination": "/document-operations",
"permanent": true,
"source": "/list-memories/examples/monitoring"
},
{
"destination": "/concepts/customization",
"permanent": true,
"source": "/org-settings"
},
{
"destination": "/add-memories",
"permanent": true,
"source": "/memory-api/overview"
}
],
"styling": {
"eyebrows": "breadcrumbs"
},
"theme": "mint"
}