Skip to main content

AgentFS Filesystem

AgentFS is Like Each Agent's "Home"

If DesireCore is like a community, then AgentFS is each agent's "home" in that community. This home contains its personal profile, work manual, skill certificates, memory logs, and archived receipts from every job.

You might ask: why not use a database to store all this?

The answer is simple: files are the most transparent form of data. You can directly open files to see everything about the agent — its personality, the rules it learned, the things it remembers. No SQL queries needed, no specialized database management tools.

Design Inspiration

AgentFS's design is inspired by the Linux operating system's file structure:

Linux FilesystemAgentFSAnalogy
/usr/share/app/agents/<id>/Application core, shareable
/home/user/users/<user_id>/User private data
/var/run/runs/Runtime temporary files
/var/cache/cache/Rebuildable cache
/var/log/logs/Log records

Overall Directory Structure

~/.desirecore/
├── config/ # Global configuration (your personal settings)

├── agents/ # All agents' "homes"
│ └── <agent_id>/
│ ├── agent.json # ID card: basic info and configuration
│ ├── persona.md # Personality profile: communication style, decision preferences
│ ├── principles.md # Behavioral guidelines: rules, forbidden zones, baselines
│ ├── memory/ # Memory bank: facts and experiences it remembers
│ ├── skills/ # Skill packages: various skills it has learned
│ ├── workflows/ # Workflows: execution plans for complex tasks
│ ├── tools/ # Toolbox: external tools it can use
│ ├── heartbeat/ # Heartbeat: content it actively monitors
│ ├── resources/ # Reference materials: documents, knowledge bases
│ ├── assets/ # Static resources: images, templates
│ └── .git/ # Version control

├── users/ # User-specific data
│ └── <user_id>/
│ ├── profile.md # Your personal profile
│ ├── preferences.md # Your preference settings
│ └── agents/ # Your "relationship" with each agent
│ └── <agent_id>/
│ ├── relationship.md # Interaction records and relationship
│ ├── memory/ # Exclusive memories with this agent
│ └── preferences/ # Your exclusive settings for this agent

├── runs/ # Execution records (temporary)
├── cache/ # Cache (rebuildable)
└── logs/ # Logs

Core Directory Analysis

agents/ — Agent Core

This is where the agent's "soul" resides. Each agent is a Git repository containing:

File/DirectoryPurposeAnalogy
agent.jsonAgent's basic info, version numberID card
persona.mdPersonality, tone, decision preferencesCharacter traits
principles.mdBehavioral guidelines, red lines, baselinesProfessional ethics
memory/Accumulated knowledge and experienceLong-term memory
skills/Various learned skillsSkill certificates
tools/External tools it can useToolbox

users/ — User Private Data

Your personal data is stored completely independently, strictly isolated from the agent core. Even if you use the same agent, your data won't be mixed with others.

runs/ — Execution Records

Detailed process of each task execution, including receipts, session records, etc. This is the data source for "post-hoc auditing."

Why Filesystem Instead of Database

FeatureFilesystemDatabase
TransparencyOpen files directly to viewRequires query tools
Version ControlNative Git supportRequires additional solution
PortabilityCopy folder to migrateRequires export/import
AuditabilityEvery modification has Git recordRequires audit logs
AI-FriendlyAI reads/writes files directlyRequires API adaptation
Offline AvailableLocal files always availableMay depend on services

Benefits of File-Driven Architecture

1. Agents Can "Modify Themselves"

Because everything is files, agents can directly read and write their own files to learn and evolve. For example, when you teach it a new rule, it writes the rule to principles.md. This is much simpler than operating a database through APIs.

2. Humans Can Easily Review

All changes are file diffs. You can review the agent's every "learning outcome" like reviewing code. What was deleted, what was added — clear at a glance.

3. Distributable Like Software

The agent core is a Git repository — can be cloned, forked, published to marketplace. The agent you cultivated well can be shared with others.

4. Natural Rollback Support

Made a mistake? git revert and it's back. Not satisfied with recent "evolution"? Roll back to the previous version.

Tiered Loading

To save AI model token consumption, AgentFS adopts a three-tier loading strategy:

TierContentConsumptionPurpose
L0One-sentence summaryMinimalQuick filtering, routing
L1Core info + applicable scenariosLowPlanning and decision-making
L2Complete contentOn-demandActual execution

This means the agent doesn't need to read all files every time, but loads on demand — saving both cost and improving efficiency.

Next Steps

  • Want to understand the various memory types of agents? Go to the Memory System chapter in the User Guide
  • Want to understand specific file formats? Read File Format Reference
  • Want to understand where data is stored? Read Data Storage Locations