Skip to content

v0.10.0: AI SDK 7 and run sandboxes

Choose a tag to compare

@eadwinCode eadwinCode released this 08 Oct 06:02
· 33 commits to main since this release
8932af9

AI SDK 7, sandboxes per run, and the TypeScript package catching up with Go. Go module github.com/eadwinCode/agentic-kit/packages/go-agentenkit@v0.10.0, npm agentenkit@0.10.0 and use-agentenkit@0.10.0.

Why 0.10.0: the Go module had its own releases after 0.7.0 (v0.8.0–v0.9.0). From now on the Go module and the npm packages share one version number. npm skips 0.8 and 0.9.

Breaking (TS only)

  • AI SDK 7 (#34). ai is now a peer dependency (^7.0.0): install it next to agentenkit, bun add agentenkit ai zod. Node 22 or newer is needed.
  • agentTool({ parameters }) is now agentTool({ inputSchema }), like the SDK's own tool().
  • The examples use @ai-sdk/openai 4 and call openai.chat(...) to stay on Chat Completions.

The stored messages and the streamed chunks do not change shape, so existing threads keep loading and clients need no change.

New: run sandboxes (#35, both runtimes)

  • sandboxScope: 'run' (Go: SandboxScope: agentenkit.SandboxScopeRun): each run gets its own sandbox. It is ended when the run finishes, fails, is stopped or parks; sandboxKeepOnPark keeps it through a park. The default stays one sandbox per thread.
  • A provider can restore the work folder (TS: restoresWorkdir: true; Go: the WorkdirRestorer interface). The tools then tell the model the project files are back, not gone.
  • sandboxDefaults: network, envs, template, image, resources and extra for every sandbox the runtime makes.
  • sandboxStateDir: where the sandbox tools keep their own files. An absolute path keeps .agentenkit out of the work folder, with a folder per sandbox.
  • afterSandboxCall (Go: Tools.AfterSandboxCall): called once after each tool call that used the sandbox, for example to save the work. Its error reaches the model as the call's error.

See Sandboxes.

New in TS, as Go already had (#36)

  • A prompt refused as too long no longer fails the run. The thread is compacted at once and the run goes on from its saved steps. runtime.compactThread(threadId, state) compacts on request, for a /compact command.
  • A history larger than the summary model is summarized in parts, then merged.
  • The settle hook gets the run's state as info.runState, also when the sweep retries it later.

Fixed

  • A rate limit worded "too many tokens" (AWS Bedrock) is no longer mistaken for a too-long prompt (both runtimes).
  • After a too-long retry, a run's token count includes the steps before the refusal (both runtimes).

Other

  • web_fetch can be limited to links from searches or from the user (OnlyKnownURLs, #32).