Genetic tags: repo.platform.sdk.gen1 · repo.platform.sdk.ai_surface.gen1 · repo.platform.sdk.agent_protocol.gen1
RU: AI_INTEGRATOR_GUIDE_ru.md
npm install @agentstack/sdk @agentstack/react| Environment | AGENTSTACK_API_BASE |
|---|---|
| Production (default) | unset → https://agentstack.tech/api |
| Local Core | http://localhost:8000/api |
import { AgentStackSDK, resolveAgentStackApiBase } from '@agentstack/sdk';
const sdk = new AgentStackSDK({ apiBase: resolveAgentStackApiBase() });const catalog = sdk.getModuleCatalog();
const matrix = sdk.getCapabilityMatrix();Project scope: almost all tenant APIs need an active project_id. Set SDKConfig.projectId, call sdk.updateProjectId() after the user picks a project, or rely on post-login sync. Details: PROJECT_CONTEXT.md.
Integrator scope: default sdkAudience is integrator — admin / adminData are not in the catalog and sdk.admin throws. Use project APIs only. Full policy: INTEGRATOR_SCOPE.md.
import { assertIntegratorModule } from '@agentstack/sdk';
assertIntegratorModule(sdk, 'payments'); // ok
// assertIntegratorModule(sdk, 'admin'); // throws for integratorsUse sdk.platform.protocol — full spec: ../../docs/AGENT_PROTOCOL_QUICKSTART.md.
readThroughSnapshotexecuteCommand+invalidateSnapshotPrefixexecuteCommandsBatchdnaList/dnaGet
| Domain | Entry |
|---|---|
| Commerce | sdk.commerce · @agentstack/sdk/commerce/* |
| Economy | sdk.platform.economy · ../../docs/sdk/AGENTNET_ECONOMY_INTEGRATOR_COOKBOOK.md |
| Support | sdk.support / sdk.platform.support |
| Integrations | sdk.integrations |
Prefer sdk.platform.social or sdk.createMessengerEmbed(). UI package: agentstack-messenger (monorepo). Gene: sdk.messenger.gen1.
sdk.media.* — optional peers (@jsquash/*, photoswipe). Gene: sdk.media.gen1, repo.engineering.client_side_computation.gen1.
Import getOrCreateCorrelationIds from @agentstack/sdk — see ../../docs/OPTRACE_FOR_AGENTS.md.
Error actions: AI_ERROR_ACTION_MATRIX.md.
../../docs/ecosystem/REST_MCP_SDK_PARITY.md
../../docs/ecosystem/PYTHON_SDK_PARITY.md — stubs documented; prefer TypeScript SDK for AI agents today.