Relayna logo Relayna

Beyond Approvals: Using Relayna for Secure AI File Handoffs

Relayna Team 2 min read

While Relayna is widely known for its Human-in-the-Loop (HITL) capabilities, one of its most powerful features is often used completely on its own: the Assets API.

In many AI workflows, you don’t actually need a human to click “Approve” or “Reject.” Sometimes, you just need a secure way to move a file from an autonomous agent to a human user, or from one specialized agent to another.

The Problem with Temporary AI Files

AI agents generate a lot of “intermediate” files: logs, code patches, generated images, or data exports. Moving these files around securely is a common pain point:

  1. S3/Cloudflare R2 is too heavy: Managing IAM policies and bucket permissions for a single temporary file is overkill.
  2. Public URLs are risky: You don’t want to leave sensitive agent outputs sitting on a public URL indefinitely.
  3. Email/Slack is messy: Sending files via chat or email is hard to automate and lacks programmatic control.

The “Secure Relay” Concept

Relayna acts as a secure, temporary buffer for your AI agent’s outputs. You can use our API to upload a file, set a Time-to-Live (TTL), and get an authenticated download link—all without ever creating a “Review Checkpoint.”

How it works

Using the Assets API standalone is a simple two-step process.

1. The Agent Uploads the File

The agent (or your backend) sends the file to Relayna. You can specify exactly how long the file should remain available.

curl -X POST https://relayna.app/api/assets/upload \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@invoice_analysis.pdf" \
  -F "purpose=temporary_handoff" \
  -F "ttl_seconds=3600"  # Expire in 1 hour

2. Generate a Download Link

Once you have the asset_id, you can generate a secure, temporary download link whenever you need to share it.

curl -X POST https://relayna.app/api/assets/ASSET_ID/download-request \
  -H "Authorization: Bearer YOUR_API_KEY"

Relayna returns a presigned URL that the user (or another agent) can use to download the file directly from our secure storage.

Key Standalone Use Cases

Agent-to-Agent Handoffs

In a multi-agent system (like a LangGraph swarm), one agent might generate a large data export that a second agent needs to process. Instead of passing massive base64 strings through your message history, Agent A uploads to Relayna and passes the asset_id to Agent B.

Secure Report Delivery

If your agent generates a financial report or a personalized PDF for a customer, you can give the customer a link to the Relayna asset. Because you can set a short TTL (e.g., 24 hours), the file automatically “self-destructs,” reducing your security surface area.

Technical Log Sharing

When an agent encounters an error, it can upload its full debug logs to Relayna and send the download link to your engineering team’s Slack. It’s cleaner than pasting thousands of lines of text and more secure than hosting logs on a public server.

Conclusion

Relayna was built to handle the complexities of human-agent collaboration, but its infrastructure is perfectly suited for any scenario where an agent needs to hand off a file securely.

Whether you need a full human review or just a secure temporary relay, Relayna gives you the programmatic control you need to keep your AI workflows moving safely.

Start using the Assets API today →