To enable Storytell’s AI functionality via our API or SDKs, you’ll first need to connect your assets to Storytell. You can do this in one of several ways:

Connect to Cloud Storage

Storytell transforms your cloud storage into an intelligent asset hub, automatically processing and analyzing documents as they arrive. This real-time processing means your team always has the latest insights without manual intervention.

Key storage platforms supported:

  • Amazon Web Services (AWS) S3 buckets for enterprise-scale document storage
  • Google Cloud Platform Buckets (GCP) for teams leveraging Google’s infrastructure
  • Microsoft Azure Blob Storage for Microsoft-centric organizations

Contact us for details on connecting to these platforms

Upload and sync from your datastores via API

import {useAssetUploader, AssetFile, AssetConfig} from "@storytellai/client";
import fs from "fs";
import path from "path";

Configuration

interface AssetConfig {
  collectionId: string;
  organizationId: string;
  tenantId: string;
  apiKey: () => string;
}

Usage

  1. Create asset object:
const asset: AssetFile = {
  source: filePath,
  name: fileName,
  size: fileSize,
  file: File
};
  1. Initialize uploader:
const uploader = useAssetUploader({ apiKey: () => config.apiKey });
  1. Upload file:
uploader.newManagedAsset(
  asset,
  config.collectionId,
  config.organizationId,
  config.tenantId
);
await uploader.onConfirm(false); // Set true to enable progress updates

Complete Example

const addAsset = async (filePath: string, cfg: AssetConfig) => {
  const fileStats = await fs.promises.stat(filePath);
  const fileContent = await fs.promises.readFile(filePath);
  const asset: AssetFile = {
    source: filePath,
    name: path.basename(filePath),
    size: fileStats.size,
    file: new File([fileContent], path.basename(filePath))
  };
  const uploader = useAssetUploader({ apiKey: () => cfg.apiKey });
  uploader.newManagedAsset(
    asset,
    cfg.collectionId,
    cfg.organizationId,
    cfg.organizationId
  );
  await uploader.onConfirm(false);
}

Invoke an AI agent

By adding your pre-built AI agents to Storytell’s LLM Router, you can direct Storytell to interface with these agents to answer user queries.

Doing this can augment or replace the need to load data directly into Storytell, however connecting via AI Agents means that Storytell will not turn your raw data into Story Tiles™, lessening the power of the Storytell platform for those queries.