Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

next
mdx 60 lines 2.18 KB
Raw
1 ---
2 title: "File handling in tool execution now uses presigned URLs"
3 description: "Files from tool execution now use presigned URLs with configurable 1-hour default TTL"
4 date: "2026-01-20"
5 ---
6
7 ## Summary
8
9 Files involved in tool execution are now shared via presigned URLs with a default TTL (time-to-live) of 1 hour. You can customize the file TTL through your project configuration.
10
11 ## What changed
12
13 When tools return files (images, documents, exports, etc.), these files are now delivered as presigned URLs with a configurable TTL instead of non-expiring URLs. This provides:
14
15 - **Automatic cleanup** - Files expire after the configured TTL
16 - **Configurable retention** - Adjust file availability based on your application's needs
17
18 ## Default behavior
19
20 All files returned from tool execution now have a **1 hour TTL** by default. After this period, the presigned URLs expire and files are no longer accessible.
21
22 ## Configuring file TTL
23
24 You can adjust the file TTL to match your application's needs.
25
26 ### Via Dashboard
27
28 1. Navigate to **Project Settings** in your Composio dashboard
29 2. Find the **File TTL** configuration option
30 3. Set your desired TTL value
31
32 ### Via API
33
34 Use the [Update Project Config API](https://docs.composio.dev/rest-api/projects/patch-org-project-config) to programmatically configure the file TTL:
35
36 ```bash
37 curl -X PATCH "https://backend.composio.dev/api/v3/org/projects/config" \
38 -H "x-api-key: YOUR_API_KEY" \
39 -H "Content-Type: application/json" \
40 -d '{
41 "fileTtl": 3600
42 }'
43 ```
44
45 ## Impact
46
47 | Aspect | Before | After |
48 |--------|--------|-------|
49 | File delivery | Non-expiring URLs | Presigned URLs with TTL |
50 | Default expiry | None | 1 hour |
51 | TTL customization | Not available | Configurable via project settings |
52
53 ## Migration
54
55 No code changes are required. Your existing integrations will continue to receive file URLs as before, but these URLs will now expire after the configured TTL.
56
57 If your application stores or caches file URLs for later use, ensure you handle URL expiration appropriately by either:
58 - Downloading files before the TTL expires
59 - Re-executing the tool to obtain fresh URLs when needed
60 - Increasing the TTL via project settings to match your retention requirements