Request
- Explicit tool approvals for agential runs
Use Case
- LLM wants to execute a tool, but one the developer or user considers dangerous
- SDK needs to prevent execution / runloop continuation until there's some explicit tool approval
AI SDK Equivalent
https://ai-sdk.dev/docs/ai-sdk-core/tools-and-tool-calling#tool-execution-approval
import { tool } from 'ai';
import { z } from 'zod';
const runCommand = tool({
description: 'Run a shell command',
inputSchema: z.object({
command: z.string().describe('The shell command to execute'),
}),
needsApproval: true,
execute: async ({ command }) => {
// your command execution logic here
},
});
Finally
This lib looks great by the way. Coming from TypeScript/aiSDK, it's a good parallel to what I'm used to.
Request
Use Case
AI SDK Equivalent
https://ai-sdk.dev/docs/ai-sdk-core/tools-and-tool-calling#tool-execution-approval
Finally
This lib looks great by the way. Coming from TypeScript/aiSDK, it's a good parallel to what I'm used to.