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
string
required
Local file path, directory path, or URL to add
string
Target Viking URI (must be in
viking://resources/ scope). If not provided, automatically determined from path.string
default:""
Why this resource is being added. Improves search relevance and retrieval quality.
string
default:""
Special processing instructions for the parser
boolean
default:"false"
Wait for semantic processing (L0/L1 generation) and vectorization to complete before returning
float
Timeout in seconds when
wait=Trueboolean
default:"true"
Whether to build vector index immediately
boolean
default:"false"
Whether to generate L0/L1 summaries
boolean
default:"true"
Strict parsing mode (fail on errors vs. continue with warnings)
string
Comma-separated list of directory names to ignore (e.g., “node_modules,.git”)
string
Glob pattern for files to include (e.g., “.md,.txt”)
string
Glob pattern for files to exclude (e.g., “.log,.tmp”)
Response
string
required
Either “success” or “error”
string
required
Viking URI where the resource was added (e.g.,
viking://resources/docs/guide.md)string
required
Original source path provided
array
List of errors encountered during processing (if any)
object
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
Related Methods
- wait_processed - Wait for async processing to complete
- add_skill - Add skills instead of resources
- ls - List added resources
- find - Search resources
