agentfs-claude  by run-llama

LLM-powered agent for virtual file system operations

Created 1 month ago
314 stars

Top 86.1% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project enables advanced LLM interactions by running Claude Code or Codex within a virtualized file system (AgentFS), orchestrated by LlamaIndex Workflows. It allows agents to process unstructured files like PDFs and Word documents, offering a powerful tool for developers and researchers integrating LLMs into complex workflows that require file manipulation and data processing.

How It Works

The core mechanism leverages AgentFS as a virtual file system, intercepting and handling all file-bound operations through its MCP (Meta-Command Processor). Text files are indexed in a LibSQL database, while non-text files (PDF, DOCX, etc.) are parsed by LlamaParse and converted to markdown. LlamaIndex Workflows orchestrates the agent's execution, pre-loading files into AgentFS and managing user prompts. A PreToolUse hook ensures that disallowed file operations are redirected to AgentFS's provided tools (read_file, write_file, edit_file, list_files, file_exists), creating a controlled and predictable environment for agent actions.

Quick Start & Requirements

  • Primary Install: Clone the repository (git clone https://github.com/run-llama/agentfs-claude), navigate into the directory (cd agentfs-claude), and install dependencies using pnpm install (preferred).
  • Prerequisites: Node.js v22+ is required for tests. pnpm package manager is recommended.
  • Optional (Codex): For Codex integration, install the SDK (pnpm add @openai/codex-sdk), start the MCP server (pnpm run mcp-start), and configure it in $HOME/.codex/config.toml.
  • Run Demo: Execute pnpm run start for the initial run or pnpm run clean-start to add more files.
  • Links: GitHub Repository

Highlighted Details

  • AgentFS MCP provides a robust set of file system interaction tools.
  • Seamless integration with LlamaIndex Workflows for orchestrated agent execution.
  • Supports parsing and processing of various document formats (PDF, DOCX, etc.) via LlamaParse.
  • Enforces AgentFS usage for file operations through a PreToolUse hook.

Maintenance & Community

No specific details regarding maintainers, community channels (e.g., Discord, Slack), or a public roadmap are provided in the README.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: The MIT license is permissive, generally allowing for commercial use and integration into closed-source projects without significant restrictions.

Limitations & Caveats

Setting up the optional Codex SDK and its MCP server involves separate installation and configuration steps, adding complexity. The project is presented as a demo, and details regarding production readiness, scalability, or comprehensive error handling are not elaborated upon in the README. Reliance on pnpm and potentially external services like LlamaCloud for parsing should be considered.

Health Check
Last Commit

3 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
3
Issues (30d)
1
Star History
314 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.