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
Plain Text
š¤ 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