Architecture Overview
Dual-Layer Design
AGFS - Content Storage
Stores all actual file content
- L0/L1/L2 full content
- Multimedia files
- Relations and metadata
- POSIX-style operations
Vector Index - Semantic Search
Stores only references and vectors
- URIs (pointers to AGFS)
- Dense/sparse vectors
- Metadata fields
- No file content
Design Benefits
Clear Responsibilities
Clear Responsibilities
- Vector Index: Handles semantic retrieval and filtering
- AGFS: Handles content storage and file operations
- No overlap in responsibilities
Memory Optimization
Memory Optimization
- Vector index doesn’t store file content, saving memory
- Only URIs and vectors in index
- Actual content read from AGFS on demand
Single Data Source
Single Data Source
- All content read from AGFS (single source of truth)
- Vector index only stores references
- Eliminates data synchronization issues
Independent Scaling
Independent Scaling
- Vector index can scale independently for search performance
- AGFS can scale independently for storage capacity
- Different backends for different needs
VikingFS: Virtual Filesystem
VikingFS is the unified URI abstraction layer that hides underlying storage details and provides a consistent interface.URI Mapping
VikingFS maps virtual URIs to physical paths in the AGFS backend.Core API
- File Operations
- Layer Operations
- Relation Management
- Search Integration
AGFS: Backend Storage
AGFS (Agent Filesystem) provides POSIX-style file operations with multiple backend support.Backend Types
- LocalFS (Default)
- S3FS
- Memory (Testing)
Local filesystem storage
- Uses local disk for storage
- Best for development and single-node deployment
- Fast read/write performance
Directory Structure
Each context directory follows a unified structure in AGFS:All these files are physically stored in AGFS. The vector index only stores references to them.
Vector Index
The vector index stores semantic indices, supporting vector search and scalar filtering.Context Collection Schema
Index Strategy
The vector index uses hybrid search combining dense and sparse vectors for better retrieval accuracy.
Backend Support
- Local (Default)
- HTTP Remote
- Volcengine VikingDB
Local persistence using embedded vector DB
- Embedded vector database
- Best for development and small deployments
- No external dependencies
Vector Synchronization
Delete Sync
When deleting from AGFS, vector index is automatically updated:Move Sync
When moving/renaming in AGFS, vector index URIs are updated:Write Sync
When writing new content, vector index is updated:Data Flow Example
Adding a Resource
Searching and Reading
Implementation Example
Related Concepts
Architecture
System architecture overview
Context Layers
L0/L1/L2 progressive loading
Viking URI
URI specification and operations
Retrieval
How vector index is used for search
