Installation
scalekit-sdk-python and actian-vectorai-client pin overlapping dependencies, so install both from a requirements.txt to let pip resolve them together instead of installing separately.
Create a requirements.txt with:
Requirements
Before using this integration, make sure your environment meets the following prerequisites:- Python 3.10 or later
- A running Actian VectorAI DB instance (default endpoint:
localhost:6574). See Docker installation for setup instructions. - A Scalekit account with at least one connected account configured in the Scalekit dashboard.
Connect user identity to memory
VectorAI DB has no native multi-tenancy. Isolation is enforced at the application layer using one collection per user, named after the Scalekit user identifier. The following function creates a collection for a user if one does not already exist and returns the collection name. Theuser_id argument must be the same string Scalekit uses as the identifier for the connected account. This is the only source of truth for linking auth scope and memory scope.
Using the Scalekit
identifier directly as the collection name prefix ensures that Scalekit’s auth scope and VectorAI DB’s memory scope always agree on who the current user is. Do not introduce a separate user ID mapping, as it will diverge.Tool access
Scalekit exposes tools through two paths. Use the MCP path when the required environment variables are present. Fall back to the direct LangChain path when they are not.MCP path (recommended)
The MCP path mints a short-lived per-user bearer token (60-minute default) and discovers tools dynamically from the MCP server. It requiresSCALEKIT_MCP_CONFIG_ID and SCALEKIT_MCP_SERVER_URL.
Before using this path, create an MCP configuration once:
Direct LangChain path (fallback)
Use this path when the MCP environment variables are absent:Graceful degradation
If Scalekit credentials are not configured, or the user has not completed OAuth, the agent should fall back to memory-only mode. In this mode the agent can still read and write VectorAI DB collections, but has no external tools. This makes local development possible without Scalekit credentials.actions is None, skip the tool-access section of your agent loop and proceed with VectorAI DB operations only.
Environment variables
The following table lists all environment variables used by this integration.Known issues
ScalekitClient.actions attributeOn some Python versions,
ScalekitClient.actions is not reliably set as an attribute. Use the defensive access pattern shown in Graceful degradation to construct ActionClient directly when the attribute is missing.
Next steps
- LangChain: Use VectorAI DB as a vector store for tool outputs and RAG pipelines.
- Collections: Understand how collections organize per-user vector data.
- Access tokens: Secure your VectorAI DB instance before deploying to production.
- Troubleshooting: Diagnose connection and persistence issues.