Skip to content

YepCode Storage

YepCode Storage is a robust file storage system designed to handle file operations within your processes. It provides a simple and efficient way to store, retrieve, and manage files through accessible source code integration.

With YepCode Storage, you can perform various file operations including:

  • File Upload: Store files from your processes or external sources
  • File Download: Retrieve files for processing or analysis
  • File Management: List and delete your stored files

YepCode Storage is perfect for scenarios such as:

  • Document Processing: Store uploaded documents for analysis or transformation
  • Image Processing: Handle image files for resizing, conversion or analysis
  • Data Export: Generate and store reports, CSV files or other exports
  • File Sharing: Create temporary file storage for sharing between processes
  • Backup Operations: Store important files as part of backup workflows

YepCode Storage can be accessed through multiple methods, making it flexible for different use cases and integration scenarios:

The most direct way to use YepCode Storage is from within your process source code using the yepcode.storage helper:

Uploading a file
const path = require("node:path");
const localPath = path.join(process.env.TMP_DATA_DIR, "myfile.txt");
await yepcode.storage.upload("path/myfile.txt", fs.createReadStream(localPath));
Listing files
const files = await yepcode.storage.list();
console.log(files);
Downloading a file
const path = require("node:path");
const localPath = path.join(process.env.TMP_DATA_DIR, "downloaded.txt");
const stream = await yepcode.storage.download("path/myfile.txt");
stream.pipe(fs.createWriteStream(localPath));
Deleting a file
await yepcode.storage.delete("path/myfile.txt");

YepCode Storage is also available through our REST API, allowing you to upload, download, list, and delete files from any external system. This enables integration with third-party applications, web services, or any system that can make HTTP requests.

You can interact with YepCode Storage from external applications using our YepCode Run SDK, available for both JavaScript and Python:

Using YepCode Run SDK for JavaScript
const { YepCodeStorage } = require('@yepcode/run');
const fs = require('fs');
const storage = new YepCodeStorage({ apiToken: 'your-api-token' });
// Upload a file (using Node.js stream)
await storage.upload('path/myfile.txt', fs.createReadStream('./myfile.txt'));
// List files
const files = await storage.list();
console.log(files);
// Download a file
const stream = await storage.download('path/myfile.txt');
stream.pipe(fs.createWriteStream('./downloaded.txt'));
// Delete a file
await storage.delete('myfile.txt');

Install the SDK: npm install @yepcode/run

YepCode Storage is available as MCP (Model Context Protocol) tools in our MCP server, making it incredibly powerful when combined with AI agents. This enables AI agents to:

  • Handle file-based tasks end-to-end without manual intervention
  • Process complex data using the full power of Python/JavaScript ecosystems
  • Store and retrieve results securely in the cloud
  • Chain multiple operations across different files and datasets

When combined with our run_code tool, AI agents can upload files, generate and execute code to process them, and store results back to YepCode Storage automatically.