agent-substrate / agent-substrate/substrate

An API to push local files into an actor sandbox

Offen
#264 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area/storage kind/feature
Vorherrschende Sprache
Go
Sterne
1.8k
Forks
316
Ø Merge
2 T. 43 Min.
Gemergte PRs (30 T.)
287

Beschreibung

### Summary

We need a way to write a client’s own files into a running actor. Other sandbox platforms have this: E2B’s Sandbox.files.write, Anthropic’s container_upload block, Fly Machines’ config.files.

### Motivation

A sandboxed code runner should be able to run code on the caller’s files in a fresh isolated sandbox and hand back the result.

Today there’s no way to get the caller’s files into a running actor. An actor runs whatever workload image it was built from, reached over the workload’s own HTTP server, so the only options are:

1. Bake the files into the image. But images are digest-pinned, so rebuilding on every change is slow and throws away snapshot/warm-start.
2. Have the workload itself expose an upload endpoint on its HTTP server, so every template author builds and secures the same thing by hand.

Either way there’s no platform-level file ingress: CreateActorRequest is just {actor_id, template_ns, template_name}, the data plane only carries WorkloadSpec{containers}, an ActorTemplate is image + command + env, and the ategcs object store only holds runsc checkpoints today.

One option that would cover this: a files map (path to bytes) written into the actor’s filesystem. From the outside it looks like it could sit on the actor, next to the exec channel proposed in #185, so a running actor could both receive files and run commands through one handle. I don’t know the internals well enough to say where it actually belongs, so this is just a starting point, not a recommendation.

I’m mainly filing this to surface the use case and the gap. Happy to help with an implementation once there’s a direction.

### Open Questions

- A standalone file-write operation on the actor, or folded into the #185 exec channel as one “exec with files” call?
- Where should the files land?
- What’s a reasonable size limit, and should large payloads go through the object store instead of riding in the request?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.