Something went wrong. Try again.
fork of prime agent with changes i want but are not upstreamable probqbly (and some fixes)
Something went wrong. Try again.
1.3 kB · 44 lines
TypeScript
123456789101112131415161718192021222324252627282930313233343536373839404142434445/** * Tools Configuration * * Use tool names to choose which built-in, extension, or custom tools are enabled. * * Tool names are matched against all available tools. If you use a custom `cwd`, * createAgentSession() applies that cwd when it builds the actual built-in tools. * * For custom tools, see 06-extensions.ts - custom tools are registered via the * extensions system using pi.registerTool(). */
import { createAgentSession, SessionManager } from "@earendil-works/pi-coding-agent";
// Default tool surfaceawait createAgentSession({ tools: ["ipython"], sessionManager: SessionManager.inMemory(),});console.log("IPython session created");
// Custom tool selectionawait createAgentSession({ tools: ["ipython"], sessionManager: SessionManager.inMemory(),});console.log("Explicit IPython session created");
// With custom cwdconst customCwd = "/path/to/project";await createAgentSession({ cwd: customCwd, tools: ["ipython"], sessionManager: SessionManager.inMemory(customCwd),});console.log("Custom cwd session created");
// Or pick specific tools for custom cwdawait createAgentSession({ cwd: customCwd, tools: ["ipython"], sessionManager: SessionManager.inMemory(customCwd),});console.log("Specific tools with custom cwd session created");