
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@webneat/ai-tools
Advanced tools
A library for creating AI agent tools with built-in Vercel AI SDK integration.
npm install @webneat/ai-tools
# or
pnpm add @webneat/ai-tools
import { z } from 'zod'
import { tool } from '@webneat/ai-tools'
// Define a simple tool
const greet = tool({
name: 'greet',
description: 'Greets a person by name',
input: z.object({ name: z.string() }),
output: z.object({ message: z.string() }),
execute: async (input) => ({ message: `Hello, ${input.name}!` }),
})
// Get AI SDK compatible tool
const ai_tool = greet.ai_sdk()
Tools can receive context for shared state or configuration:
import { z } from 'zod'
import { tool } from '@webneat/ai-tools'
type LogContext = { logs: string[] }
const log_message = tool<{ msg: string }, { logged: boolean }, LogContext>({
name: 'log',
description: 'Logs a message',
input: z.object({ msg: z.string() }),
output: z.object({ logged: z.boolean() }),
execute: async (input, context) => {
context.logs.push(input.msg)
return { logged: true }
},
})
// Create shared context
const context: LogContext = { logs: [] }
// Pass context when creating AI SDK tool
const ai_tool = log_message.ai_sdk(context)
Execute shell commands with permission control and process management:
import { shell, type ShellContext } from '@webneat/ai-tools'
const context: ShellContext = {
ask_permission: async (cmd) => true, // Implement your permission logic
processes: new Map(),
cwd: '/home/user',
env: { PATH: process.env.PATH },
}
const tools = {
start_process: shell.start_process.ai_sdk(context),
check_process: shell.check_process.ai_sdk(context),
kill_process: shell.kill_process.ai_sdk(context),
wait_for_process: shell.wait_for_process.ai_sdk(context),
list_processes: shell.list_processes.ai_sdk(context),
delete_process: shell.delete_process.ai_sdk(context),
write_stdin: shell.write_to_process_stdin.ai_sdk(context),
}
Get information about the execution environment:
import { context } from '@webneat/ai-tools'
const get_context_tool = context.get_context.ai_sdk()
tool(definition)Creates a tool factory from a definition.
Parameters:
name: Tool namedescription: Tool description for the AIinput: Zod schema for input validationoutput: Zod schema for output validationexecute: Async function (input, context) => Promise<Output>Returns:
ToolFactory with ai_sdk(context?) methodToolFactory.ai_sdk(context?)Returns an AI SDK compatible tool. Pass context if the tool requires it.
MIT
FAQs
Useful tools for AI agents.
We found that @webneat/ai-tools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.