SDKs & toolsTypeScript referenceEnvironments, memory and more

TypeScript SDK: Environments, memory and more

⚠️
Preview — this feature is being built; the design below is the spec.

The supporting resources agents use.

import Syntic from '@syntic/sdk'
 
const client = new Syntic() // reads SYNTIC_API_KEY
MethodEndpointReturns
environments.createPOST /v1/environmentsEnvironment
environments.rebuildPOST /v1/environments/{environment_id}/rebuildEnvironment
memoryStores.memories.searchPOST /v1/memory_stores/{store_id}/memories/searchlist[Memory]
memoryStores.consolidations.createPOST /v1/memory_stores/{store_id}/consolidationsMemoryConsolidation
vaults.secrets.setPUT /v1/vaults/{vault_id}/secrets/{name}VaultSecret (metadata only)
deployments.runs.listGET /v1/deployments/{deployment_id}/runsSyncPage[DeploymentRun]
skills.versions.createPOST /v1/skills/{skill_id}/versionsSkillVersion
userProfiles.createPOST /v1/user_profilesUserProfile
tunnels.createPOST /v1/tunnelsTunnel

Methods

environments.create

Define a sandbox image. Maps to POST /v1/environments.

const result = await client.environments.create({
  name: "data-analysis",
  base_image: "syntic/python:3.12",
  packages: {
    pip: [
      "pandas==2.2.3"
    ]
  }
})

environments.rebuild

Build the image again. Maps to POST /v1/environments/{environment_id}/rebuild.

const result = await client.environments.rebuild("env_01JC5B2D4F6H8K0M2P4R")

memoryStores.memories.search

Semantic search within a scope. Maps to POST /v1/memory_stores/{store_id}/memories/search.

const result = await client.memoryStores.memories.search("mem_01JC1A3C5E7G9J1L3N5Q", {
  query: "account manager",
  scope: "customer:4821"
})

memoryStores.consolidations.create

Start a consolidation job. Maps to POST /v1/memory_stores/{store_id}/consolidations.

const result = await client.memoryStores.consolidations.create("mem_01JC1A3C5E7G9J1L3N5Q", {
  strategies: [
    "merge_duplicates"
  ],
  dry_run: true
})

vaults.secrets.set

Write a secret (write-only). Maps to PUT /v1/vaults/{vault_id}/secrets/{name}.

const result = await client.vaults.secrets.set("vlt_01JC2B4D6F8H0K2M4P6R", "crm-token", {
  value: "…",
  allowed_destinations: [
    "mcp.example.com"
  ]
})

deployments.runs.list

Recent runs of a deployment. Maps to GET /v1/deployments/{deployment_id}/runs.

for await (const item of client.deployments.runs.list("dep_01JC6C8E0G2J4L6N8Q0S")) {
  console.log(item)
}

skills.versions.create

Upload a new skill version from a directory; the SDK zips it. Maps to POST /v1/skills/{skill_id}/versions.

const result = await client.skills.versions.create("skill_01JBXM4", {
  directory: "./skills/invoice-reconciler"
})

userProfiles.create

Create an end-user profile. Maps to POST /v1/user_profiles.

const result = await client.userProfiles.create({
  external_id: "cust-4821",
  locale: "en-GB"
})

tunnels.create

Create an MCP tunnel. Maps to POST /v1/tunnels.

const result = await client.tunnels.create({
  name: "erp-onprem",
  allowed_targets: [
    "http://erp-mcp.internal:8080/mcp"
  ]
})

Conventions

Every method accepts a final options object with headers, query, timeout, maxRetries and signal (an AbortSignal). List methods return pages that work with for await across all pages.

See the TypeScript SDK overview for installation, errors and retries.

Was this page helpful?