New:Socket for Asana Is Now Available.Learn more
Get Started

@adrive/sdk

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adrive/sdk

TypeScript SDK for AgentDrive — cross-agent artifact workspace with provenance, semantic recall, and portable storage.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

@adrive/sdk

TypeScript SDK for AgentDrive — the cross-agent artifact workspace with provenance, semantic recall, and portable storage across Claude Code, Codex, Cursor, and LangGraph.

npm install @adrive/sdk

Quick start

import { AgentDrive } from '@adrive/sdk';

const drive = new AgentDrive({
  apiKey: process.env.AGENTDRIVE_API_KEY!,
  agentPlatform: 'codex',   // claude-code, codex, cursor, langgraph, crewai, mcp, cli, ...
  agentRole: 'planner',     // free-text label; appears in provenance
});

// Write what your agent produced
await drive.writeFile(workspaceId, 'plan.md', '# the plan');

// Pull the context another agent left for you
const { artifacts } = await drive.context({ task: 'implement plan.md', limit: 5 });

// Semantic search across every artifact in the org
const { hits } = await drive.search({ query: 'shipping checklist' });

// Log the run so the next agent in the chain sees what you did
await drive.logRun({
  task: 'implement plan.md',
  status: 'success',
  artifacts_referenced: ['plan.md'],
  artifacts_produced: ['src/foo.ts'],
});

Surface

Files: writeFile, readFile, listFilesPage, listAllFiles, deleteFile, getVersionsPage, getAllVersions Memory: search, context Provenance: logRun, getRun Workspaces: createWorkspace, listWorkspacesPage, listWorkspaces Collaboration: createShareLink, addComment, getCommentsPage, getAllComments, getActivityPage, getAllActivity Sandbox: sandboxClone, sandboxExec, sandboxRead, sandboxCommit Escape hatch: rawFetch(path, init) returns the raw Response

Errors throw ApiError carrying the HTTP status. Use instanceof ApiError to branch.

Cross-agent identity

Every request gets stamped with X-Agent-Platform and X-Agent-Role headers. The same API key (= principal) can run in many sessions; the headers distinguish "Codex on Tuesday" from "Claude Code on Wednesday" in provenance records and metadata indexes. Configure once at construction.

Pagination

List endpoints use cursors. listAllPages walks them to exhaustion, capped at maxPages (default 10) to prevent runaway loops on large workspaces. For finer control, call the *Page variant and loop the cursor yourself.

Keywords

agentdrive

FAQs

Package last updated on 03 Jun 2026

Related posts