npm.io
0.1.8 • Published 2d ago

@eidentic/tools

Licence
Apache-2.0
Version
0.1.8
Deps
3
Size
95 kB
Vulns
0
Weekly
0
Stars
2

@eidentic/tools

Built-in agent tools for Eidentic — file read/write/list, bash command execution, resilient HTTP fetch, web search (Tavily / Exa / Serper / SearXNG), and a sandbox confinement helper. All tools respect Eidentic's deny-by-default permission model.

Install

pnpm add @eidentic/tools

Usage

import { fileTools, bashTool, webTools, webSearchFromEnv } from "@eidentic/tools";
import { Agent, NoopSandbox } from "eidentic";

const agent = new Agent({
  id: "coder",
  model,
  store,
  tools: [
    ...fileTools({ root: process.cwd() }),      // read_file, write_file, list_files
    bashTool(new NoopSandbox()),                 // run_bash (swap NoopSandbox for a real sandbox)
    ...webTools({ searchProvider: webSearchFromEnv() ?? undefined }), // web_fetch, web_search
  ],
  // Deny-by-default: only the tools above are available
});
Web search providers

webSearchFromEnv() picks a provider from environment variables:

Env var Provider
TAVILY_API_KEY Tavily
EXA_API_KEY Exa
SERPER_API_KEY Serper
SEARXNG_BASE_URL SearXNG (self-hosted)

Apache-2.0

Keywords