ClawFile SDK
The official ClawFile SDK enables AI agents to encrypt and share files securely. This documentation covers installation, configuration, and usage for TypeScript, Python, and Go.
v1.0.0
Latest version
AES-256-GCM
Encryption
<50ms
Latency
MIT
License
Features
- Agent-side encryption using AES-256-GCM
- Zero-knowledge architecture - servers never see your data
- Ephemeral storage with configurable TTL
- Granular access policies for multi-agent workflows
- Ed25519 cryptographic signatures for agent authentication
- Drop-in integration with LangChain, CrewAI, and AutoGen
Supported Languages
Node.js 18+, Deno, Bun
@clawfile/sdkPython 3.9+
clawfileGo 1.21+
github.com/clawfile/clawfile-goGetting Started
Installation
Install the ClawFile SDK using your preferred package manager:
npm install @clawfile/sdkyarn add @clawfile/sdkpnpm add @clawfile/sdkRequirements
Quick Start
Here's a minimal example to encrypt a file and generate a shareable link:
1import { ClawFile } from '@clawfile/sdk'23// 1. Initialize the client4const claw = new ClawFile({ agent: true })56// 2. Encrypt a file7const file = new File(['Hello, Agent!'], 'message.txt', { type: 'text/plain' })8const encrypted = await claw.encrypt(file, {9 expiry: 3600, // Expires in 1 hour10 maxDownloads: 1, // One-time download11})1213// 3. Generate a shareable link14const link = await claw.generateLink(encrypted)15console.log(link) // https://clawfile.dev/a7f3b2e9#9c4d7a1f1617// 4. Recipient decrypts the file18const decrypted = await claw.decrypt(link)19console.log(await decrypted.text()) // "Hello, Agent!"How it works
- The SDK generates a 256-bit encryption key locally
- Your file is encrypted using AES-256-GCM within your runtime
- Only the encrypted ciphertext is uploaded to ClawFile servers
- The decryption key is embedded in the URL fragment (never sent to servers)
Configuration
The ClawFile client accepts the following configuration options:
Client Options
| Parameter | Type | Default | Description |
|---|---|---|---|
agent | boolean | false | Enable agent mode for AI-to-AI file sharing with enhanced security features. |
apiKey | string | undefined | Optional API key for authenticated requests. Required for custom access policies. |
endpoint | string | "https://api.clawfile.dev" | Custom API endpoint URL. Useful for self-hosted deployments. |
timeout | number | 30000 | Request timeout in milliseconds. |
retries | number | 3 | Number of retry attempts for failed requests. |
agentId | string | auto-generated | Custom agent identifier. Used for access policies and audit logs. |
signRequests | boolean | true | Sign all requests with Ed25519 for authentication. |
import { ClawFile } from '@clawfile/sdk'
const claw = new ClawFile({
agent: true,
apiKey: process.env.CLAWFILE_API_KEY,
endpoint: 'https://api.clawfile.dev',
timeout: 30000,
retries: 3,
agentId: 'my-agent-001',
signRequests: true,
})Environment Variables
Core Concepts
Understanding these concepts will help you build secure file sharing workflows with ClawFile.
Encryption
ClawFile uses AES-256-GCM (Advanced Encryption Standard with Galois/Counter Mode) for all file encryption. This is the same encryption standard used by governments and financial institutions worldwide.
Agent-Side Encryption
Encryption happens entirely within your agent's runtime. The encryption key is generated locally and never transmitted to any server.
Authenticated Encryption
GCM mode provides both encryption and authentication. Any tampering with the ciphertext will be detected during decryption.
Encryption Flow
Key Generation
A cryptographically secure 256-bit key and 96-bit IV are generated using the Web Crypto API.
Encryption
Your file is encrypted using AES-256-GCM with the generated key and IV.
Upload
Only the encrypted ciphertext is uploaded to ClawFile servers. The key stays with you.
Link Generation
A shareable URL is created with the file ID in the path and the encryption key in the fragment.
URL Fragment Security
Key Management
ClawFile generates unique encryption keys for each file. You have full control over how keys are distributed.
Key Types
| Parameter | Type | Default | Description |
|---|---|---|---|
File Key | 256-bit | - | Unique AES-256 key generated for each file. Embedded in the shareable URL fragment. |
Agent Key | Ed25519 | - | Optional signing key for agent authentication. Used to prove agent identity. |
API Key | string | - | Optional authentication key for accessing advanced features like custom policies. |
Key Storage Best Practices
- Never log or persist encryption keys
- Share URLs through secure channels only
- Use short TTL values for sensitive files
- Enable one-time download for highly sensitive data
Access Policies
Control who can access your encrypted files with granular access policies.
Policy Types
PUBLICAnyone with the link can decrypt the file. Default policy.
AGENT_ONLYOnly requests from verified AI agents can decrypt. Human browsers blocked.
ALLOWLISTOnly specific agent IDs can decrypt. Most restrictive policy.
// Allow only specific agents to decrypt
const encrypted = await claw.encrypt(file, {
accessPolicy: 'ALLOWLIST',
allowedAgents: [
'agent-sales-001',
'agent-support-002',
'agent-analytics-003',
],
expiry: 3600,
})File Lifecycle
ClawFile files are ephemeral by design. They exist only as long as needed and then self-destruct.
Lifecycle Options
| Parameter | Type | Default | Description |
|---|---|---|---|
expiry | number | 86400 | Time-to-live in seconds. File auto-deletes after this duration. Max: 7 days. |
maxDownloads | number | unlimited | Maximum download count. File auto-deletes after reaching this limit. |
deleteOnView | boolean | false | Delete immediately after first successful decryption. |
Storage Architecture
RAM Only
No disk persistence
Auto-Expiry
Configurable TTL
Secure Deletion
Memory zeroing
Data Retention
API Reference
Complete reference for all ClawFile SDK methods and types.
ClawFile Class
The main entry point for the ClawFile SDK. Create an instance to start encrypting and sharing files.
import { ClawFile } from '@clawfile/sdk'
class ClawFile {
constructor(config?: ClawFileConfig)
// Core methods
encrypt(file: File | Buffer | string, options?: EncryptOptions): Promise<EncryptedFile>
decrypt(url: string, options?: DecryptOptions): Promise<DecryptedFile>
generateLink(encrypted: EncryptedFile, options?: LinkOptions): Promise<string>
// Utility methods
verify(url: string): Promise<VerificationResult>
revoke(fileId: string): Promise<void>
// Properties
readonly agentId: string
readonly isConnected: boolean
}encrypt()
encrypt(file, options?)asyncEncrypts a file using AES-256-GCM encryption. The encryption happens entirely within your local runtime.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
file* | File | Buffer | string | - | The file to encrypt. Can be a File object, Buffer, or file path. |
Options
| Parameter | Type | Default | Description |
|---|---|---|---|
expiry | number | 86400 | Time-to-live in seconds (default: 24 hours, max: 7 days). |
maxDownloads | number | unlimited | Maximum number of downloads allowed. |
accessPolicy | string | "PUBLIC" | "PUBLIC" | "AGENT_ONLY" | "ALLOWLIST" |
allowedAgents | string[] | [] | Agent IDs allowed to decrypt (when using ALLOWLIST policy). |
metadata | object | {} | Custom metadata to attach (not encrypted, visible in verify()). |
compression | boolean | true | Enable gzip compression before encryption. |
fileName | string | original | Override the original filename. |
Returns
Promise<EncryptedFile> - An object containing the encrypted data, file ID, and encryption key.
Example
1// Basic encryption2const encrypted = await claw.encrypt(file)34// With options5const encrypted = await claw.encrypt(file, {6 expiry: 3600, // 1 hour7 maxDownloads: 5, // Max 5 downloads8 accessPolicy: 'ALLOWLIST',9 allowedAgents: ['agent-1', 'agent-2'],10 metadata: {11 project: 'acme-ai',12 version: '1.0.0',13 },14 compression: true,15 fileName: 'report.pdf',16})1718// Access encrypted data19console.log(encrypted.fileId) // "a7f3b2e9"20console.log(encrypted.key) // "9c4d7a1f..." (256-bit)21console.log(encrypted.size) // 1024 (bytes)22console.log(encrypted.compressed) // truedecrypt()
decrypt(url, options?)asyncDecrypts a file from a ClawFile URL. The decryption key is automatically extracted from the URL fragment.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
url* | string | - | The ClawFile URL containing the file ID and encryption key. |
Options
| Parameter | Type | Default | Description |
|---|---|---|---|
outputFormat | string | "buffer" | "buffer" | "stream" | "file" - How to return the decrypted data. |
outputPath | string | undefined | File path to write decrypted data (when outputFormat is "file"). |
Example
1// Decrypt from URL2const url = 'https://clawfile.dev/a7f3b2e9#9c4d7a1f'3const decrypted = await claw.decrypt(url)45// Access decrypted data6console.log(await decrypted.text()) // As string7console.log(await decrypted.arrayBuffer()) // As ArrayBuffer8console.log(decrypted.name) // Original filename9console.log(decrypted.type) // MIME type10console.log(decrypted.size) // Size in bytes1112// Save to file (Node.js)13import { writeFileSync } from 'fs'14writeFileSync('output.pdf', Buffer.from(await decrypted.arrayBuffer()))Common Errors
FILE_NOT_FOUND- The file ID doesn't existFILE_EXPIRED- The file has exceeded its TTLACCESS_DENIED- Your agent is not in the allowlistDECRYPTION_FAILED- Invalid or corrupted key
generateLink()
generateLink(encrypted, options?)asyncGenerates a shareable URL from encrypted file data. The URL contains the file ID and encryption key.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
encrypted* | EncryptedFile | - | The encrypted file object returned by encrypt(). |
Options
| Parameter | Type | Default | Description |
|---|---|---|---|
customSlug | string | random | Custom URL slug instead of random ID (requires API key). |
password | string | undefined | Additional password protection layer. |
baseUrl | string | "https://clawfile.dev" | Custom base URL for self-hosted deployments. |
Returns
Promise<string> - The shareable URL in format: https://clawfile.dev/[fileId]#[key]
Example
1const encrypted = await claw.encrypt(file)23// Basic link4const link = await claw.generateLink(encrypted)5// https://clawfile.dev/a7f3b2e9#9c4d7a1f67// With custom slug8const link = await claw.generateLink(encrypted, {9 customSlug: 'quarterly-report-q4',10})11// https://clawfile.dev/quarterly-report-q4#9c4d7a1f1213// With password protection14const link = await claw.generateLink(encrypted, {15 password: 'secret123',16})17// Recipient will be prompted for password before decryptionverify()
verify(url)asyncVerifies that a ClawFile URL is valid and accessible without actually downloading or decrypting the file.
Example
1const result = await claw.verify('https://clawfile.dev/a7f3b2e9#9c4d7a1f')23console.log(result.valid) // true4console.log(result.exists) // true5console.log(result.expired) // false6console.log(result.remainingTTL) // 3542 (seconds)7console.log(result.remainingDownloads) // 48console.log(result.metadata) // { project: 'acme-ai' }9console.log(result.accessPolicy) // 'PUBLIC'10console.log(result.fileSize) // 102411console.log(result.createdAt) // '2024-01-15T10:30:00Z'revoke()
revoke(fileId)asyncImmediately revokes access to an encrypted file, making it inaccessible even if the link is still valid.
Irreversible Action
Example
1// Revoke access to a file2await claw.revoke('a7f3b2e9')34// Attempting to decrypt will now fail5try {6 await claw.decrypt('https://clawfile.dev/a7f3b2e9#9c4d7a1f')7} catch (error) {8 console.log(error.code) // 'FILE_NOT_FOUND'9}Types & Interfaces
TypeScript type definitions for all SDK objects.
1// Configuration2interface ClawFileConfig {3 agent?: boolean4 apiKey?: string5 endpoint?: string6 timeout?: number7 retries?: number8 agentId?: string9 signRequests?: boolean10}1112// Encryption Options13interface EncryptOptions {14 expiry?: number15 maxDownloads?: number16 accessPolicy?: 'PUBLIC' | 'AGENT_ONLY' | 'ALLOWLIST'17 allowedAgents?: string[]18 metadata?: Record<string, unknown>19 compression?: boolean20 fileName?: string21}2223// Encrypted File24interface EncryptedFile {25 fileId: string26 key: string27 iv: string28 size: number29 compressed: boolean30 checksum: string31}3233// Decrypted File34interface DecryptedFile extends Blob {35 name: string36 type: string37 size: number38 text(): Promise<string>39 arrayBuffer(): Promise<ArrayBuffer>40}4142// Verification Result43interface VerificationResult {44 valid: boolean45 exists: boolean46 expired: boolean47 remainingTTL: number48 remainingDownloads: number | null49 metadata: Record<string, unknown>50 accessPolicy: string51 fileSize: number52 createdAt: string53}5455// Errors56class ClawFileError extends Error {57 code: string58 statusCode?: number59}6061class EncryptionError extends ClawFileError {}62class DecryptionError extends ClawFileError {}63class NetworkError extends ClawFileError {}64class AccessDeniedError extends ClawFileError {}Advanced Usage
Advanced patterns and techniques for building sophisticated AI agent workflows with ClawFile.
Multi-Agent Workflows
ClawFile is designed for complex multi-agent architectures where files need to flow securely between autonomous systems.
Common Patterns
Hub & Spoke
Central orchestrator distributes files to worker agents
Pipeline
Sequential agent chain with file handoffs
Broadcast
One sender, multiple authorized receivers
Round-Robin
Load-balanced distribution across agents
1// Multi-agent workflow: Orchestrator distributes tasks to workers2import { ClawFile } from '@clawfile/sdk'34const orchestrator = new ClawFile({5 agent: true,6 agentId: 'orchestrator-main'7})89// Define worker agents10const workers = [11 'worker-analysis-001',12 'worker-analysis-002',13 'worker-analysis-003',14]1516// Encrypt and distribute file to specific workers only17async function distributeTask(file: File, assignedWorkers: string[]) {18 const encrypted = await orchestrator.encrypt(file, {19 accessPolicy: 'ALLOWLIST',20 allowedAgents: assignedWorkers,21 expiry: 3600,22 metadata: {23 taskType: 'analysis',24 priority: 'high',25 assignedAt: new Date().toISOString(),26 },27 })2829 const link = await orchestrator.generateLink(encrypted)3031 // Send link to assigned workers via your message queue32 return { link, fileId: encrypted.fileId }33}3435// Worker receives and processes36const worker = new ClawFile({37 agent: true,38 agentId: 'worker-analysis-001'39})4041async function processTask(link: string) {42 // Verify we have access before downloading43 const verification = await worker.verify(link)44 if (!verification.valid) {45 throw new Error('Not authorized for this task')46 }4748 // Decrypt and process49 const file = await worker.decrypt(link)50 return processFile(file)51}Custom Access Policies
Beyond built-in policies, you can implement custom access control logic using webhooks.
Enterprise Feature
1// Custom policy with webhook validation2const encrypted = await claw.encrypt(file, {3 accessPolicy: 'CUSTOM',4 policyWebhook: 'https://api.yourcompany.com/validate-access',5 policyConfig: {6 requiredRole: 'analyst',7 department: 'finance',8 clearanceLevel: 3,9 },10 expiry: 7200,11})1213// Your webhook receives:14// {15// fileId: 'a7f3b2e9',16// agentId: 'requesting-agent',17// policyConfig: { requiredRole: 'analyst', ... },18// timestamp: '2026-01-15T10:30:00Z'19// }2021// Return { allowed: true } or { allowed: false, reason: '...' }Streaming Large Files
For files larger than available memory, use streaming encryption/decryption to process data in chunks.
Stream Encrypt
Encrypt files up to 1GB without loading into memory
Stream Decrypt
Decrypt directly to disk or output stream
1import { ClawFile } from '@clawfile/sdk'2import { createReadStream, createWriteStream } from 'fs'34const claw = new ClawFile({ agent: true })56// Stream encrypt a large file7async function encryptLargeFile(inputPath: string) {8 const inputStream = createReadStream(inputPath)910 const encrypted = await claw.encryptStream(inputStream, {11 expiry: 86400,12 chunkSize: 64 * 1024, // 64KB chunks13 onProgress: (progress) => {14 console.log(`Encrypted: ${progress.percent}%`)15 },16 })1718 return claw.generateLink(encrypted)19}2021// Stream decrypt to file22async function decryptLargeFile(url: string, outputPath: string) {23 const outputStream = createWriteStream(outputPath)2425 await claw.decryptStream(url, outputStream, {26 onProgress: (progress) => {27 console.log(`Decrypted: ${progress.percent}%`)28 },29 })3031 console.log(`File saved to ${outputPath}`)32}Memory Considerations
Middleware Integration
Integrate ClawFile with your existing middleware stack for logging, monitoring, and custom transformations.
1import { ClawFile, Middleware } from '@clawfile/sdk'23// Custom logging middleware4const loggingMiddleware: Middleware = {5 name: 'logger',67 async beforeEncrypt(file, options) {8 console.log(`[ENCRYPT] Starting: ${file.name}, size: ${file.size}`)9 return { file, options }10 },1112 async afterEncrypt(encrypted) {13 console.log(`[ENCRYPT] Complete: ${encrypted.fileId}`)14 return encrypted15 },1617 async beforeDecrypt(url, options) {18 console.log(`[DECRYPT] Starting: ${url}`)19 return { url, options }20 },2122 async afterDecrypt(decrypted) {23 console.log(`[DECRYPT] Complete: ${decrypted.name}`)24 return decrypted25 },26}2728// Metrics middleware29const metricsMiddleware: Middleware = {30 name: 'metrics',3132 async afterEncrypt(encrypted) {33 metrics.increment('clawfile.encrypt.count')34 metrics.histogram('clawfile.encrypt.size', encrypted.size)35 return encrypted36 },3738 async afterDecrypt(decrypted) {39 metrics.increment('clawfile.decrypt.count')40 return decrypted41 },42}4344// Apply middleware45const claw = new ClawFile({ agent: true })46claw.use(loggingMiddleware)47claw.use(metricsMiddleware)4849// All operations now pass through middleware50const encrypted = await claw.encrypt(file) // Logs + metricsExamples
Complete, runnable examples for common use cases.
Basic File Sharing
The simplest use case: encrypt a file and share it with another party.
1import { ClawFile } from '@clawfile/sdk'2import { readFileSync, writeFileSync } from 'fs'34async function main() {5 const claw = new ClawFile({ agent: true })67 // === SENDER ===8 // Read file from disk9 const fileBuffer = readFileSync('./report.pdf')10 const file = new File([fileBuffer], 'report.pdf', { type: 'application/pdf' })1112 // Encrypt with options13 const encrypted = await claw.encrypt(file, {14 expiry: 3600, // 1 hour15 maxDownloads: 3, // Max 3 downloads16 })1718 // Generate shareable link19 const link = await claw.generateLink(encrypted)20 console.log('Share this link:', link)21 // https://clawfile.dev/a7f3b2e9#9c4d7a1f...2223 // === RECIPIENT ===24 // Decrypt from URL25 const decrypted = await claw.decrypt(link)2627 // Save to disk28 const buffer = Buffer.from(await decrypted.arrayBuffer())29 writeFileSync('./downloaded-report.pdf', buffer)3031 console.log('File saved successfully!')32}3334main().catch(console.error)Agent-to-Agent Transfer
Secure file transfer between two AI agents with allowlist-based access control.
1// agent-sender.ts - Runs on Agent A2import { ClawFile } from '@clawfile/sdk'34const senderAgent = new ClawFile({5 agent: true,6 agentId: 'agent-data-processor',7})89async function sendToAnalyst(data: string) {10 // Create a file from processed data11 const file = new File([data], 'processed-data.json', {12 type: 'application/json',13 })1415 // Encrypt ONLY for the analyst agent16 const encrypted = await senderAgent.encrypt(file, {17 accessPolicy: 'ALLOWLIST',18 allowedAgents: ['agent-analyst-001'],19 expiry: 1800, // 30 minutes20 maxDownloads: 1, // One-time access21 metadata: {22 sourceAgent: 'agent-data-processor',23 dataType: 'customer-analytics',24 processedAt: new Date().toISOString(),25 },26 })2728 const link = await senderAgent.generateLink(encrypted)2930 // Send link via your agent communication channel31 await messageQueue.send('agent-analyst-001', {32 type: 'file-ready',33 link,34 fileId: encrypted.fileId,35 })36}3738// agent-receiver.ts - Runs on Agent B39import { ClawFile } from '@clawfile/sdk'4041const receiverAgent = new ClawFile({42 agent: true,43 agentId: 'agent-analyst-001',44})4546messageQueue.on('file-ready', async (message) => {47 // Verify the file is for us48 const verification = await receiverAgent.verify(message.link)4950 if (!verification.valid) {51 console.error('File not accessible:', verification)52 return53 }5455 console.log('File metadata:', verification.metadata)56 // { sourceAgent: 'agent-data-processor', dataType: 'customer-analytics', ... }5758 // Decrypt and process59 const decrypted = await receiverAgent.decrypt(message.link)60 const data = JSON.parse(await decrypted.text())6162 await analyzeData(data)63})LangChain Integration
Use ClawFile as a tool in your LangChain agents for secure file operations.
1import { ClawFile } from '@clawfile/sdk'2import { DynamicStructuredTool } from '@langchain/core/tools'3import { ChatOpenAI } from '@langchain/openai'4import { AgentExecutor, createOpenAIFunctionsAgent } from 'langchain/agents'5import { z } from 'zod'67const claw = new ClawFile({ agent: true, agentId: 'langchain-agent' })89// Create ClawFile tools for LangChain10const encryptFileTool = new DynamicStructuredTool({11 name: 'encrypt_file',12 description: 'Encrypts a file and returns a secure shareable link',13 schema: z.object({14 content: z.string().describe('The content to encrypt'),15 fileName: z.string().describe('Name for the file'),16 expiryHours: z.number().optional().describe('Hours until expiry'),17 }),18 func: async ({ content, fileName, expiryHours }) => {19 const file = new File([content], fileName, { type: 'text/plain' })20 const encrypted = await claw.encrypt(file, {21 expiry: (expiryHours || 24) * 3600,22 })23 const link = await claw.generateLink(encrypted)24 return `File encrypted successfully. Share this link: ${link}`25 },26})2728const decryptFileTool = new DynamicStructuredTool({29 name: 'decrypt_file',30 description: 'Decrypts a file from a ClawFile link',31 schema: z.object({32 url: z.string().describe('The ClawFile URL to decrypt'),33 }),34 func: async ({ url }) => {35 const decrypted = await claw.decrypt(url)36 return await decrypted.text()37 },38})3940// Create agent with ClawFile tools41const llm = new ChatOpenAI({ model: 'gpt-4o' })42const tools = [encryptFileTool, decryptFileTool]4344const agent = await createOpenAIFunctionsAgent({ llm, tools, prompt })45const executor = new AgentExecutor({ agent, tools })4647// Use the agent48const result = await executor.invoke({49 input: 'Encrypt this report and give me a link: Q4 revenue was $1.2M',50})CrewAI Integration
Integrate ClawFile with CrewAI for secure file handoffs between crew members.
1from crewai import Agent, Task, Crew, Process2from crewai_tools import tool3from clawfile import ClawFile45# Initialize ClawFile for the crew6claw = ClawFile(agent=True, agent_id="crewai-research-crew")78@tool("Secure File Share")9async def secure_share(content: str, description: str) -> str:10 """Securely encrypt and share file content between agents.1112 Args:13 content: The content to share securely14 description: A brief description of the content15 """16 encrypted = await claw.encrypt(17 content.encode(),18 expiry=3600,19 metadata={"description": description},20 file_name="shared-data.txt",21 )22 link = await claw.generate_link(encrypted)23 return f"Content shared securely: {link}"2425@tool("Retrieve Shared File")26async def retrieve_shared(url: str) -> str:27 """Retrieve and decrypt a securely shared file.2829 Args:30 url: The ClawFile URL to retrieve31 """32 decrypted = await claw.decrypt(url)33 return decrypted.decode()3435# Define agents with ClawFile tools36researcher = Agent(37 role="Research Analyst",38 goal="Research and compile data, share findings securely",39 tools=[secure_share],40 verbose=True,41)4243writer = Agent(44 role="Content Writer",45 goal="Retrieve research and write reports",46 tools=[retrieve_shared],47 verbose=True,48)4950# Define tasks51research_task = Task(52 description="Research AI trends and share findings securely",53 agent=researcher,54 expected_output="A secure link to the research findings",55)5657writing_task = Task(58 description="Retrieve the research and write a summary report",59 agent=writer,60 expected_output="A polished summary report",61 context=[research_task],62)6364# Create and run the crew65crew = Crew(66 agents=[researcher, writer],67 tasks=[research_task, writing_task],68 process=Process.sequential,69)7071result = crew.kickoff()CrewAI Support
Troubleshooting
Common Errors
ENCRYPTION_FAILEDEncryption operation failed
Solution: Check that the file is readable and not empty. Ensure sufficient memory is available.
DECRYPTION_FAILEDDecryption operation failed
Solution: Verify the URL is complete and the key fragment is intact. The file may have been tampered with.
FILE_NOT_FOUNDFile ID does not exist
Solution: The file may have been deleted, revoked, or never existed. Check the URL for typos.
FILE_EXPIREDFile TTL has expired
Solution: Request a new file from the sender. Consider using longer TTL values for important files.
ACCESS_DENIEDAgent not authorized
Solution: Your agent ID is not in the allowlist. Contact the file owner to add your agent.
DOWNLOAD_LIMIT_REACHEDMaximum downloads exceeded
Solution: The file has reached its download limit. Request a new share from the sender.
NETWORK_ERRORNetwork request failed
Solution: Check your internet connection. The ClawFile API may be temporarily unavailable.
INVALID_CONFIGInvalid configuration
Solution: Review your ClawFile initialization options. Check API key format if provided.
FAQ
Can ClawFile servers read my files?
No. Encryption happens entirely in your local runtime. ClawFile servers only ever see encrypted ciphertext. The encryption key is never transmitted.
What happens if I lose the shareable link?
The encryption key is embedded in the URL fragment. If you lose the complete URL, the file cannot be decrypted. Always store links securely.
Is there a file size limit?
Yes. The maximum file size is 100MB for free accounts and 1GB for paid accounts. For larger files, consider chunking or streaming.
Can I extend the expiry of a file?
No. Once a file is encrypted with a specific TTL, it cannot be extended. You would need to re-encrypt and share a new link.
What encryption algorithm is used?
AES-256-GCM (Advanced Encryption Standard with 256-bit keys in Galois/Counter Mode). This provides authenticated encryption with associated data.
Is the SDK open source?
Yes. The ClawFile SDK is MIT licensed. You can view the source code and contribute on GitHub.
Changelog
- addedInitial release of ClawFile SDK
- addedAES-256-GCM encryption with agent-side key generation
- addedSupport for TypeScript, Python, and Go
- addedAccess policies: PUBLIC, AGENT_ONLY, ALLOWLIST
- addedEphemeral storage with configurable TTL
- addedLangChain, CrewAI, and AutoGen integrations
- addedBeta release for early testers
- addedCore encrypt/decrypt functionality
- fixedMemory leak in large file handling