Albanese describes how AI SDK 6 supports a reusable ToolLoopAgent, keeping the agent definition separate from the route that streams its responses. He builds a small Next.js chat app with GPT-5.4 Mini, then changes its behavior through instructions.
Give Your Agent a Computer
Speaker
Nico Albanese of Vercel presents an AI Engineer workshop on building agents with the AI SDK, web search, and persistent Vercel Sandboxes.
Albanese adds provider-executed web search to give the agent current information, then uses typed UI messages to render the tool’s activity in the chat. He distinguishes custom tools, provider-defined tools, and tools that run on a provider’s infrastructure.
Albanese argues that a file system gives an agent a place to keep plans and research, helping it stay on task and leave a record of its work. He demonstrates named Vercel Sandboxes that can be reused across requests, with the file system preserved when an instance is stopped and restarted.
The demo stores memories in a sandbox file and injects them into the agent’s instructions on later runs. Albanese shows early prompting problems, including saving trivial greetings and deleting memories, then refines the instructions and demonstrates a Python weather script the agent can reuse.
Albanese shows a coding agent built with the same AI SDK, AI Gateway, and durable workflows, where failed steps can retry. He says 23 people at Vercel use it, it processed 3.8 billion tokens in the previous month or two, and it helped produce close to 350 pull requests. A subagent used about 30,000 tokens to return a roughly 500-token summary to the main agent.
Takeaways
- Keep the agent definition reusable and separate from the code that streams its responses.
- Show tool activity in the UI so users can tell what the agent is doing.
- Give agents a persistent file system for plans, research, and memory across sessions.
- Treat memory instructions as behavior to test: the demo initially saved trivial events and deleted stored memories.
- Use subagents for independent tasks and return concise summaries to limit work in the main context.
Mentioned in this talk
Search inside this talk
What was claimed 7
- previously atNico Albanese previously at
Vercel
“I work on the AI SDK at Vercel.”
0:00inVercel AI SDK Masterclass: From Fundamentals to Deep ResearchYouTube Verified3 sources· Talk, Web· archived
- uses
OpenCode uses Vercel AI SDK“OpenCode is all built on the AI SDK as well.”
YouTube Unverified1 source· Talk
- featureVercel AI SDK: AI SDK 6 supports a global provider, defaulting to AI Gateway
“By default, that’s the AI Gateway.”
YouTube Unverified1 source· Talk
- featurePersistent sandbox agent pattern: A file system scratchpad can help agents follow through on tasks and preserve research artifacts
“Every session, the agent had a scratchpad in the file system where it stored an initial plan.”
YouTube Unverified1 source· Talk
- feature
E2B sandboxes: Named sandboxes can persist file system state across sessions
“there's something really cool shipping now that's in beta called named sandboxes, or persistent sandboxes.”
YouTube Unverified1 source· Talk
- feature
E2B sandboxes: Inactive sandbox instances can be stopped and restarted from a file system snapshot
“it will snapshot the file system, so the state remains the same.”
YouTube Unverified1 source· Talk
- featureVercel AI SDK: ToolLoopAgent supports call options and runtime context for tools
“You can define those with a call option schema that you pass into your agent definition.”
YouTube Unverified1 source· Talk











