Scoped SDK Overview
The Aerostack Scoped SDK is a zero-config, project-isolated library automatically injected into every Logic Module (Hook) you create in the Logic Lab.
It provides instant, secure access to your project’s shared infrastructure without requiring API keys, connection strings, or environment setup.
Core Capabilities
Section titled “Core Capabilities”sdk.db: Direct SQL access to your project’s decentralized database.sdk.cache: High-performance key-value cache for temporary data.sdk.queue: Reliably offload heavy tasks to background workers.sdk.storage: Upload and manage files with built-in CDN support.sdk.ai: Access 30+ LLMs for analysis and generation.sdk.secrets: Securely retrieve API keys and configuration.
Usage in Logic Lab
Section titled “Usage in Logic Lab”Every Logic Module receives the sdk object as an argument:
export default async ({ sdk, body }) => { // Use sdk here const results = await sdk.db.query('SELECT 1'); return results;};Isolation & Multi-tenancy
Section titled “Isolation & Multi-tenancy”The SDK is “Scoped” because it automatically handles project isolation. For example, when you call sdk.cache.set('key', 'val'), Aerostack internally namespaces this to your project, so other users’ data is never accessible and keys never collide.