FIBRE_API_KEY and FIBRE_API_URL=https://api.fibre.dev. For the
steps where the agent talks to Claude, you also need an Anthropic API key in ANTHROPIC_API_KEY.
Start a sandbox
Install the SDK
Create a small Node project in the sandbox and install the SDK from npm. This takes about a minute, which is longer than an exec allows, so it runs as a background command.Output
Output
output
Write the agent
The agent itself is a short program. It reads its task from theTASK environment variable and works in the
directory it is started in. When you start it with --continue, it resumes the most recent session in that
directory instead of starting a new one.
Give it a repository
Response
Response
response
Run a task
Now run the agent in the repository. The API key and the task are given to this one command only. There is more about the key below.The next task, later
When the agent has finished, the sandbox goes to sleep after its idle timeout, with its memory and files saved, and the next command wakes it. The SDK keeps its sessions on the sandbox’s disk, so--continue picks up the whole
conversation. You do not need a session store of your own, and nothing has to be rebuilt.
keep: true, and the process itself is kept across sleep, even in the middle of a conversation. See
sleep, wake and lifetime.
The API key
The agent needs your model provider’s API key, so it is worth understanding exactly where that key goes:- Only the command you give it to can see it, along with the programs that command starts. Other commands in the sandbox do not get it, Fibre does not write it into the sandbox’s files, and Fibre’s API never returns it.
- Everything the agent runs while it works can read it, including tests, install scripts and code in the repository. Treat it as visible to that repository’s code. Use a key you can revoke, with a spending limit.
- Do not put the key in the sandbox’s own environment (
envin the SDK, orenv_varsin the API, when you create the sandbox). Every command in the sandbox would then get it.
Delete it
Response
Response
response