@archiveye/sdk
v0.1.2
Published
Official TypeScript SDK for the ArchivEye Developer Platform
Readme
@archiveye/sdk
Official TypeScript SDK for the ArchivEye Developer Platform.
Install
npm install @archiveye/sdkQuick start
import { Archiveye } from "@archiveye/sdk";
const archiveye = new Archiveye({
apiKey: process.env.ARCHIVEYE_API_KEY!,
// baseUrl defaults to https://data.archiveye.ai/api/v1 (BFF)
// mcpBaseUrl defaults to https://mcp.archiveye.ai (not the BFF origin)
});
const collections = await archiveye.http.listCollections();
const hits = await archiveye.mcp.searchSemantic({
collectionId: 12,
query: "invoice Q3",
});Features
- REST (BFF) — collections, documents, ingest jobs, webhook endpoints
- MCP — Streamable HTTP client for
/user/{apiKey}/mcptools - Webhooks — Stripe-style HMAC verification via
constructEvent
Documents and folder trees
const content = await archiveye.http.getProcessedDocumentContent(42);
console.log(content.markdown);
await archiveye.http.uploadDirectory({
name: "Reports",
parentFolderId: 10, // optional
files: [
{ path: "2026/report.md", file: new Blob(["# Report"]) },
{ path: "2026/budget.csv", file: new Blob(["item,total\nRevenue,100"]) },
],
});
await archiveye.http.uploadWebDocument({
markdown: "# Article", sourceUrl: "https://example.com/article", name: "Article",
});
await archiveye.http.ingestPartnerDocument({
title: "Meeting notes", content: "# Notes", contentType: "text/markdown",
source: "mnemo", externalId: "mnemo:note:42",
});Directory uploads require an employee key, create a fresh folder hierarchy, and stop on the first error. Files and folders already uploaded remain; retries create a new tree. Empty subdirectories are not represented. Partner ingest creates or updates the document associated with the employee, source and external ID.
Organization knowledge graph
const graph = await archiveye.mcp.searchOrganizationKnowledge({ query: "budget", limit: 20 });
// REST equivalent:
const restGraph = await archiveye.http.searchKnowledgeGraph("budget", 20);
const neighbors = await archiveye.http.getKnowledgeGraphNeighborhood(graph.nodes[0].id, 1);
const profile = await archiveye.mcp.getOrganizationProfile();
const directory = await archiveye.mcp.getOrganizationDirectory({ limit: 100, offset: 0 });Graph search is a case-insensitive literal match over node IDs, labels, types and relation names across the entire stored organization graph. It returns at most 100 nodes (default 20), including one-hop neighbors after direct matches, and connecting edges. Search terms must contain 1–2000 characters. Use entity names or specific keywords, then inspect neighbors via REST.
Graph access requires an employee identity, Enterprise entitlement and read access to the organization workspace. Collection keys cannot access organization knowledge. MCP graph retrieval and the client AI's answers remain available when Business OS is disabled, removed, unconfigured or in error. They use the stored graph and do not invoke the organization's AI provider. Existing data may reflect the last successful synchronization. Graph citations do not grant access to document bodies.
getKnowledgeStatus, exploreKnowledgeGraph and getKnowledgeGraphNeighborhood
are also available over REST. The separate REST askKnowledge method invokes the
organization's AI provider and retains its Business OS configuration requirements.
Documentation
Full reference: https://data.archiveye.ai/docs/sdk
License
MIT
