surrealfs
SurrealFS virtual filesystem for AI agents. Rust core + Python agent (Pydantic AI). Persistent file operations backed by SurrealDB. Part of the surreal-skills collection.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/24601/surrealfsWhat This Skill Does
SurrealFS is a high-performance virtual filesystem engineered specifically for AI agents, functioning as a persistent, queryable storage layer backed by SurrealDB. Unlike standard local filesystems, SurrealFS provides a unified hierarchical structure that exists independently of the underlying host operating system. This allows agents to maintain state, context, and long-term knowledge across disparate sessions. By utilizing a Rust-based core for high-throughput operations and a Python-based agent interface built on Pydantic AI, it bridges the gap between structured databases and traditional file manipulation. It supports standard POSIX-like operations such as ls, cat, grep, and write_file, but augments them with the power of SurrealDB, allowing for advanced metadata querying and multi-agent concurrency control. The architecture ensures that all filesystem interactions remain isolated within the virtual environment, effectively preventing agent actions from compromising the host machine's integrity.
Installation
To get started, first ensure you have Rust and Cargo installed. Install the core filesystem engine by running cargo install surrealfs. Once installed, you can launch the interactive REPL locally using surrealfs or connect to a remote database using surrealfs --endpoint ws://your-db-url. For AI integration, install the Python package via pip install surrealfs-ai. Finally, deploy the skill through the OpenClaw CLI using clawhub install openclaw/skills/skills/24601/surrealfs. Ensure your environment variables for database credentials are set if using a remote SurrealDB cluster.
Use Cases
- Persistent Agent Memory: Maintain project notes, code snippets, and session logs that persist even after the agent process is restarted.
- Collaborative Workspaces: Multiple agents can read from and write to the same virtual filesystem, utilizing SurrealDB permissions to manage data access.
- Knowledge Retrieval: Use the built-in
grepand search capabilities to query vast amounts of document data stored in the virtual hierarchy. - Automated Scaffolding: Programmatically generate project files, templates, and configurations that are instantly accessible to subsequent agent tasks.
Example Prompts
- "Create a new directory named 'project_alpha' and write a summary of my current task into a file called 'notes.txt' within that directory."
- "Search for all files containing the string 'TODO' in the '/workspace/projects' directory and print the last 10 lines of the first match found."
- "Copy the contents of 'report_v1.md' to a new file named 'report_final.md' and ensure the file permissions are indexed in the database."
Tips & Limitations
SurrealFS shines when dealing with medium-to-large datasets where hierarchical search is frequent. While it supports piping from external commands, ensure the source input is sanitized. Note that while it mimics POSIX behavior, it does not replace the host's actual operating system; all paths are relative to the virtual root. Always prefer the WebSocket interface for production environments to enable better load balancing and database scalability.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-24601-surrealfs": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, network-access
Related Skills
deep-research
Async deep research via Gemini Interactions API (no Gemini CLI dependency). RAG-ground queries on local files (--context), preview costs (--dry-run), structured JSON output, adaptive polling. Universal skill for 30+ AI agents including Claude Code, Amp, Codex, and Gemini CLI.
surrealdb
Expert SurrealDB 3 architect and developer skill. SurrealQL mastery, multi-model data modeling (document, graph, vector, time-series, geospatial), schema design, security, deployment, performance tuning, SDK integration (JS, Python, Go, Rust), Surrealism WASM extensions, and the wider ecosystem (Surrealist, Surreal-Sync, SurrealFS, SurrealKit). Universal skill for 30+ AI agents.
surreal-sync
Data migration and synchronization to SurrealDB from MongoDB, PostgreSQL, MySQL, Neo4j, Kafka, and JSONL. Full and incremental CDC sync. Part of the surreal-skills collection.
surrealism
SurrealDB Surrealism WASM extension development. Write Rust functions, compile to WASM, deploy as database modules. Part of the surreal-skills collection.