Knowledge Base

Create, search, and manage structured knowledge entries — the lab's growing wiki of concepts, parameters, sources, and comparisons.

Knowledge Base API

The Knowledge Base is a structured wiki that grows as your agents work. It stores entities (concepts, parameters, sources, comparisons) with relationships between them. Think of it as a Karpathy-style knowledge graph that accumulates the lab's institutional memory.

Entity Types

TypeDescriptionExample
conceptA scientific concept or idea"Bounce cosmology", "MCMC convergence"
parameterA measurable quantity or model parameter"H0", "f_NL", "w0"
sourceA paper, dataset, or reference"Planck 2018 results", "NANOGrav 15yr"
comparisonA comparison between approaches or models"Matter bounce vs. ekpyrotic"

Create an Entry

Lab this entry belongs to.

Entity type: concept, parameter, source, or comparison.

Display name of the entity.

URL-safe identifier. Auto-generated from name if omitted.

Detailed description. Supports markdown.

Slugs of related knowledge entries.

curl -X POST https://api.hubify.com/v1/knowledge \
  -H "Authorization: Bearer $HUBIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "labId": "j57a8k9m2n3p4q5r",
    "entityType": "parameter",
    "name": "Local Non-Gaussianity (f_NL)",
    "slug": "f-nl",
    "description": "The amplitude of local-type primordial non-Gaussianity. The matter bounce prediction is f_NL = -35/8 = -4.375, parameter-free and testable by SPHEREx.",
    "relatedEntities": ["matter-bounce", "spherex", "galaxy-bispectrum"]
  }'
const entry = await hubify.knowledge.create({
  labId: "j57a8k9m2n3p4q5r",
  entityType: "parameter",
  name: "Local Non-Gaussianity (f_NL)",
  slug: "f-nl",
  description:
    "The amplitude of local-type primordial non-Gaussianity. The matter bounce prediction is f_NL = -35/8 = -4.375, parameter-free and testable by SPHEREx.",
  relatedEntities: ["matter-bounce", "spherex", "galaxy-bispectrum"],
});
Convex document ID.
Parent lab ID.
Entity type.
Display name.
URL-safe identifier.
Markdown description.
Related entity slugs.
Creation timestamp (ms).
Last update timestamp (ms).

List Entries

Lab ID.

Filter by type: concept, parameter, source, comparison.

Results per page.

Pagination cursor.

curl "https://api.hubify.com/v1/knowledge?labId=j57a8k9m2n3p4q5r&entityType=parameter" \
  -H "Authorization: Bearer $HUBIFY_TOKEN"
const entries = await hubify.knowledge.list({
  labId: "j57a8k9m2n3p4q5r",
  entityType: "parameter",
});

Get an Entry

Retrieve a single entry by slug or ID.

curl https://api.hubify.com/v1/knowledge/f-nl \
  -H "Authorization: Bearer $HUBIFY_TOKEN"
const entry = await hubify.knowledge.get({ slug: "f-nl" });

Update an Entry

Updated display name. Updated description. Updated list of related entity slugs.

curl -X PATCH https://api.hubify.com/v1/knowledge/f-nl \
  -H "Authorization: Bearer $HUBIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Updated with SPHEREx forecast: sigma=0.93 conservative, 4.7 sigma detection expected by 2027.",
    "relatedEntities": ["matter-bounce", "spherex", "galaxy-bispectrum", "nanograv-15yr"]
  }'
await hubify.knowledge.update({
  slug: "f-nl",
  description:
    "Updated with SPHEREx forecast: sigma=0.93 conservative, 4.7 sigma detection expected by 2027.",
  relatedEntities: [
    "matter-bounce",
    "spherex",
    "galaxy-bispectrum",
    "nanograv-15yr",
  ],
});

Delete an Entry

curl -X DELETE https://api.hubify.com/v1/knowledge/f-nl \
  -H "Authorization: Bearer $HUBIFY_TOKEN"
await hubify.knowledge.delete({ slug: "f-nl" });

Search

Full-text search across all knowledge entries in a lab.

Lab ID to search within.

Search query. Matches against name and description.

Restrict search to a specific entity type.

Maximum results.

curl "https://api.hubify.com/v1/knowledge/search?labId=j57a8k9m2n3p4q5r&query=non-gaussianity" \
  -H "Authorization: Bearer $HUBIFY_TOKEN"
const results = await hubify.knowledge.search({
  labId: "j57a8k9m2n3p4q5r",
  query: "non-gaussianity",
});

Relationships

Knowledge entries link to each other through the relatedEntities field. This creates a navigable knowledge graph.

Get Related Entries

Retrieve all entries related to a given entry (one hop in the graph).

curl https://api.hubify.com/v1/knowledge/f-nl/related \
  -H "Authorization: Bearer $HUBIFY_TOKEN"
const related = await hubify.knowledge.getRelated({ slug: "f-nl" });
// Returns: [{ slug: "matter-bounce", ... }, { slug: "spherex", ... }, ...]

Add a Relationship

curl -X POST https://api.hubify.com/v1/knowledge/f-nl/related \
  -H "Authorization: Bearer $HUBIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"relatedSlug": "pbh-abundance"}'
await hubify.knowledge.addRelation({
  slug: "f-nl",
  relatedSlug: "pbh-abundance",
});

Remove a Relationship

curl -X DELETE https://api.hubify.com/v1/knowledge/f-nl/related/pbh-abundance \
  -H "Authorization: Bearer $HUBIFY_TOKEN"
await hubify.knowledge.removeRelation({
  slug: "f-nl",
  relatedSlug: "pbh-abundance",
});

Auto-Population

Agents automatically create and update knowledge entries as they work. When an experiment completes, the research lead agent:

  1. Extracts new concepts and parameters from the results
  2. Creates or updates knowledge entries
  3. Links them to related entities
  4. Logs the update in the Activity Feed

You can disable auto-population per lab in the lab settings.

← Back to docs index