Overview
Add files, directories, URLs, or GitHub repositories to OpenViking’s knowledge base. Resources are parsed, indexed, and made available for semantic search.Supported Resource Types
Files
Local files: PDF, Markdown, HTML, code, images, videos, audio
Directories
Recursively process entire directory trees
URLs
Fetch and process content from web URLs
Method Signature
Parameters
Local file path, directory path, or URL to add
Target Viking URI (must be in
viking://resources/ scope). If not provided, automatically determined from path.Why this resource is being added. Improves search relevance and retrieval quality.
Special processing instructions for the parser
Wait for semantic processing (L0/L1 generation) and vectorization to complete before returning
Timeout in seconds when
wait=TrueWhether to build vector index immediately
Whether to generate L0/L1 summaries
Strict parsing mode (fail on errors vs. continue with warnings)
Comma-separated list of directory names to ignore (e.g., “node_modules,.git”)
Glob pattern for files to include (e.g., “.md,.txt”)
Glob pattern for files to exclude (e.g., “.log,.tmp”)
Response
Either “success” or “error”
Viking URI where the resource was added (e.g.,
viking://resources/docs/guide.md)Original source path provided
List of errors encountered during processing (if any)
Queue processing status (only present when
wait=True)Examples
Add Local File
Add from URL
Add Directory with Filters
Wait for Processing
Processing Pipeline
When you add a resource, OpenViking processes it through multiple stages:- Parser: Extracts content based on file type
- TreeBuilder: Creates directory structure
- AGFS: Stores files in the Agentic File System
- SemanticQueue: Generates L0 (abstract) and L1 (overview) asynchronously
- Vector Index: Indexes content for semantic search
Use
wait=True or call wait_processed() to ensure semantic processing completes before querying.Supported File Formats
| Format | Extensions | Processing |
|---|---|---|
.pdf | Text and image extraction | |
| Markdown | .md | Native support |
| HTML | .html, .htm | Cleaned text extraction |
| Plain Text | .txt | Direct import |
| JSON/YAML | .json, .yaml, .yml | Structured parsing |
| Code | .py, .js, .ts, .go, .java, etc. | Syntax-aware parsing |
| Images | .png, .jpg, .jpeg, .gif, .webp | VLM description |
| Video | .mp4, .mov, .avi | Frame extraction + VLM |
| Audio | .mp3, .wav, .m4a | Transcription |
| Documents | .docx | Text extraction |
Related Methods
- wait_processed - Wait for async processing to complete
- add_skill - Add skills instead of resources
- ls - List added resources
- find - Search resources
