注册并分享邀请链接,可获得视频播放与邀请奖励。

Alan (@Alan_Earn) “how to give your ai agent a computer for $0 cloudflare just released computer, a” — TopicDigg

Alan 的个人资料封面
Alan 的头像
Alan
@Alan_Earn
加入 May 2024
0 正在关注    0 粉丝
how to give your ai agent a computer for $0 cloudflare just released computer, an open source package that gives your agent a persistent filesystem, shell access, and code execution inside cloudflare workers. no vps, no docker, no api bill what you get for free: - a linux environment with real binaries, npm and node - sqlite-backed filesystem that survives restarts, 10gb per workspace - shell execution via just-bash, no container required - built-in git client and r2 file sharing - ai sdk tools (read, write, edit, ls, exec) ready to hand to any agent setup (3 min): step 1: npm install @cloudflare/computer step 2: add withWorkspace to a durable object and set compatibility_flags to nodejs_compat in wrangler.jsonc step 3: call exec from your agent ```ts const ws = await getWorkspace(env.Agent.get(id)) await ws.fs.writeFile("/hello.txt", "world") const run = await ws.runtime.exec("cat /hello.txt") ``` use it for agents that need to read files, run commands, clone repos, build and test code, or store state between sessions no more ssh keys, no more dockerfiles, no more paying for sandbox apis
显示更多
0
17
239
9
转发到社区