Requirements
- Python 3.10+ — The SDK uses modern Python features including
asyncio, type hints, and structural pattern matching - pip 21.0+ or Poetry 1.2+ for package management
- An active Synap account — Sign up at synap.maximem.ai
Install the SDK
Synap provides two official SDKs. The Python SDK is the primary integration path. The JavaScript/TypeScript SDK is available for Node.js environments.Python SDK
- Standard
- With gRPC Streaming
The standard installation includes everything you need for REST-based ingestion and retrieval:This installs the core SDK with the following dependencies:
httpx— Async HTTP client for REST API callspydantic— Data validation and settings managementcryptography— Credential handling
JavaScript / TypeScript SDK
For Node.js environments, install the JavaScript SDK:The Python SDK is the recommended primary integration path. Use the JavaScript SDK when your application is Node.js-based and cannot run a Python subprocess.
Environment variables
The SDK reads configuration from environment variables. This is the recommended approach for production deployments.Your instance identifier, in the format
inst_<hex16>. Found in the Dashboard under your instance settings.Your API key for SDK authentication. Generated in the Dashboard — navigate to your instance and click Generate API Key. Starts with
synap_.Logging verbosity for the SDK. Accepts standard Python logging levels:
DEBUG, INFO, WARNING, ERROR, CRITICAL. Defaults to INFO.Credential storage
After the initial bootstrap, the SDK stores credentials locally for subsequent connections. You can choose between two storage strategies:- File-based (default)
- Environment-based
Credentials are stored in SDK-managed local secure storage on the host machine. This is the default behavior and works well for single-machine deployments.
Verify installation
Run this script to verify your installation and connectivity:verify_synap.py
Async-first design
The Synap SDK is async-first. All SDK methods that interact with Synap Cloud are For frameworks that already run an event loop (FastAPI, Sanic, aiohttp), use the SDK directly without wrapping.
async and must be called with await inside an async function.If you’re integrating with a synchronous codebase, use asyncio.run() to bridge the gap:Troubleshooting
ImportError: No module named 'maximem_synap'
ImportError: No module named 'maximem_synap'
Verify the package is installed in your active Python environment:If using a virtual environment, make sure it’s activated. If using Poetry, prefix commands with
poetry run.Connection refused or timeout during initialization
Connection refused or timeout during initialization
Check that:
- Your network allows outbound HTTPS connections on port 443
- If behind a corporate proxy, configure
HTTPS_PROXYin your environment - Your
SYNAP_INSTANCE_IDandSYNAP_API_KEYare correct and the key is active in the dashboard
API key rejected (CREDENTIAL_INVALID)
API key rejected (CREDENTIAL_INVALID)
The API key provided does not match any active credential for this instance.
- Confirm the key is still active: Dashboard > Instances > [instance] > API Keys
- Check that
SYNAP_API_KEY(orapi_key=) matches the key shown in the Dashboard exactly — no extra whitespace or truncation - If the key was revoked, generate a new one and update your environment
gRPC streaming not available
gRPC streaming not available
Make sure you installed with the gRPC extra:Verify gRPC is available:
Next steps
Authentication
Configure API key authentication, multiple keys per instance, and key rotation.
Integration
Connect Synap to your application framework and infrastructure.
SDK Initialization
Explore all SDK initialization options, including custom credential providers.