Quickstart
Create a fully valid .omnidata knowledge container from scratch using standard tools. No runtime or driver needed.
Bootstrap the bundle
# Create the directory bundle
mkdir -p my-knowledge.omnidata/blobs
# Write the manifest
cat > my-knowledge.omnidata/manifest.json << 'EOF'
{
"schema_version": 2,
"instance_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"instance_name": "my-knowledge",
"description": "My personal knowledge container",
"created_at": "2026-04-01T00:00:00Z"
}
EOF
# Create the search/metadata database
sqlite3 my-knowledge.omnidata/index.db << 'INDEXSQL'
CREATE TABLE omnidata_resources (
id INTEGER PRIMARY KEY AUTOINCREMENT,
uri TEXT NOT NULL UNIQUE,
source TEXT NOT NULL,
resource_type TEXT NOT NULL,
title TEXT,
resource_at TEXT,
blob_hash TEXT,
created_at TEXT DEFAULT (datetime('now')),
updated_at TEXT DEFAULT (datetime('now')),
deleted_at TEXT
);
CREATE VIRTUAL TABLE fts_resources USING fts5(
title, content, resource_id UNINDEXED
);
CREATE TABLE omnidata_embeddings (
id INTEGER PRIMARY KEY AUTOINCREMENT,
resource_id INTEGER NOT NULL REFERENCES omnidata_resources(id),
model TEXT NOT NULL,
vector BLOB NOT NULL,
created_at TEXT DEFAULT (datetime('now'))
);
INDEXSQL
# Create the hierarchy/relationships database
sqlite3 my-knowledge.omnidata/memory.db << 'MEMSQL'
CREATE TABLE omnidata_edges (
id INTEGER PRIMARY KEY AUTOINCREMENT,
from_uri TEXT NOT NULL,
to_uri TEXT NOT NULL,
relation TEXT NOT NULL,
weight REAL DEFAULT 1.0,
created_at TEXT DEFAULT (datetime('now')),
deleted_at TEXT
);
CREATE INDEX idx_edges_from ON omnidata_edges(from_uri) WHERE deleted_at IS NULL;
CREATE INDEX idx_edges_to ON omnidata_edges(to_uri) WHERE deleted_at IS NULL;
MEMSQL
# Write the adapter config
echo '[]' > my-knowledge.omnidata/adapters.json
# Initialize the ingress log
touch my-knowledge.omnidata/ingress.log
That’s it. You now have a valid .omnidata bundle with search indexes, a relationship graph, and a content-addressed blob store.
Verify it works
ls my-knowledge.omnidata/
# adapters.json blobs/ index.db ingress.log manifest.json memory.db
cat my-knowledge.omnidata/manifest.json
sqlite3 my-knowledge.omnidata/index.db ".tables"
sqlite3 my-knowledge.omnidata/memory.db ".tables"
Insert your first resource
sqlite3 my-knowledge.omnidata/index.db << 'SQL'
INSERT INTO omnidata_resources (uri, source, resource_type, title, resource_at)
VALUES ('note://first-note', 'manual', 'note', 'My first note', datetime('now'));
INSERT INTO fts_resources (title, content, resource_id)
VALUES (
'My first note',
'This is my first piece of knowledge in OmniData.',
(SELECT id FROM omnidata_resources WHERE uri = 'note://first-note')
);
SQL
Search it
sqlite3 my-knowledge.omnidata/index.db << 'SQL'
SELECT r.title, fts.content, fts.rank
FROM fts_resources fts
JOIN omnidata_resources r ON r.id = fts.resource_id
WHERE fts_resources MATCH 'knowledge'
ORDER BY fts.rank;
SQL
Store a blob
Blobs are files on disk, named by their SHA-256 hash in fanout directories:
# Hash the file
HASH=$(shasum -a 256 photo.jpg | cut -d' ' -f1)
PREFIX=${HASH:0:2}
# Store it
mkdir -p my-knowledge.omnidata/blobs/$PREFIX
cp photo.jpg my-knowledge.omnidata/blobs/$PREFIX/$HASH
# Reference it from a resource
sqlite3 my-knowledge.omnidata/index.db "INSERT INTO omnidata_resources
(uri, source, resource_type, title, blob_hash, resource_at)
VALUES
('photo://vacation-sunset', 'manual', 'image', 'Vacation sunset', '$HASH', datetime('now'));"
With ManyHats
If you use ManyHats for role management, each hat gets its own .omnidata bundle:
mkdir -p director-of-ai.omnidata/blobs
cat > director-of-ai.omnidata/manifest.json << 'EOF'
{
"schema_version": 2,
"instance_id": "unique-uuid-here",
"instance_name": "director-of-ai",
"hat_identifier": "director-of-ai",
"owner_identity": "[email protected]",
"created_at": "2026-04-01T00:00:00Z"
}
EOF