Files
Managing files and attachments in Julep
Files
Files in Julep allow agents to work with various types of data including documents, images, audio, and other media. Files are stored securely and can be accessed by agents and tasks as needed.
Overview
Julep’s file system provides:
- Secure storage for various file types
- Unique identifiers for consistent access
- Metadata for organization and discovery
- Content hashing for integrity verification
- Project association for logical grouping
File Properties
Each file in Julep has the following properties:
Field | Type | Description | Default |
---|---|---|---|
name | string | Name of the file | Required |
project | string | The canonical name of the project this file belongs to | "default" |
content | string | Base64-encoded file content | Required |
description | string | Description of the file | "" |
mime_type | string | MIME type of the file | null |
size | number | Size of the file in bytes (read-only) | Auto-calculated |
hash | string | Hash of the file content (read-only) | Auto-calculated |
created_at | string | Creation timestamp (read-only) | Auto-generated |
Creating Files
You can create files using the Julep SDK in Python or JavaScript:
Managing Files
Retrieving Files
Deleting Files
Relationship to Other Concepts
Projects
Files belong to exactly one project, which helps organize related resources together. When creating a file, you can specify which project it belongs to using the project
parameter. If not specified, the file will be assigned to the “default” project.
Example:
For more information about projects, see Projects.
Agents and Tasks
Files can be used by both agents and tasks to access and process information. For example, an agent might analyze an image file, or a task might process a document file.
Best Practices
File Organization
- Group related files in the same project
- Use consistent naming conventions
- Include descriptive metadata for better discovery
Performance
- Keep file sizes reasonable for faster processing
- Consider chunking large files into smaller ones
- Be mindful of the content limits when Base64 encoding
Security
- Avoid storing sensitive information in files
- Regularly audit and clean up unused files
- Validate file types before uploading