UNPKG

packfs-core

Version:

Semantic filesystem operations for LLM agent frameworks with natural language understanding. See LLM_AGENT_GUIDE.md for copy-paste examples.

43 lines (33 loc) • 1.63 kB
šŸ¤– LLM AGENTS: QUICK START GUIDE Multiple projects have reported agents going down wrong usage paths. Here are the most common successful patterns: šŸ“š FULL GUIDE: See LLM_AGENT_GUIDE.md or https://github.com/jwynia/PackFS/blob/main/LLM_AGENT_GUIDE.md šŸš€ QUICKSTART - COPY/PASTE READY: 1. MASTRA (Recommended): import { createMastraSemanticToolSuite } from 'packfs-core/mastra'; const { fileReader, fileWriter } = createMastraSemanticToolSuite({ workingDirectory: '/your/project/path' }); const result = await fileReader.execute({ query: "read the README file" }); console.log(result.content); // Direct access in v0.2.3! 2. LANGCHAIN: import { createLangChainSemanticFilesystemTool } from 'packfs-core/langchain'; const tool = createLangChainSemanticFilesystemTool({ workingDirectory: '/your/project/path' }); const result = await tool.func("read the README file"); 3. LLAMAINDEX: import { createLlamaIndexSemanticFilesystemTool } from 'packfs-core/llamaindex'; const tool = createLlamaIndexSemanticFilesystemTool({ workingDirectory: '/your/project/path' }); const result = await tool.call({ query: "read the README file" }); āš ļø COMMON PITFALLS: āŒ result.data.content (v0.1.x - doesn't work in v0.2.3) āœ… result.content (v0.2.3 - direct access) āŒ workingDirectory: './project' (relative paths) āœ… workingDirectory: '/full/path' (absolute paths) āŒ import from 'packfs-core' (wrong for framework tools) āœ… import from 'packfs-core/mastra' (framework-specific) šŸ“– Full troubleshooting: LLM_AGENT_GUIDE.md