Cognition OS · by SeKondBrain
Platform · knowledge graph · REST

The graph your AI
reasons over.

Cognition OS is the semantic cognition layer of the SeKondBrain platform: a multi-tenant service that stores, reasons about and evolves knowledge graphs. Write nodes and relationships over REST; it deduplicates, links, resolves free text to concepts, and keeps improving the graph as it grows.

One service, any domain — people, product, code, or a schema you declare yourself. Every organisation gets an isolated graph, writes are idempotent, search spans graph, vector and full text, and every change is attributable.

What it is

Cognition OS stores knowledge as a property graph and serves it back at every level a system needs: a single node, a neighbourhood, a semantic search, or a resolved set of concepts behind a sentence of free text. It is domain-agnostic — the same service backs people graphs, product-management graphs, code knowledge graphs and fully custom schemas, chosen per tenant rather than per deployment.

It never calls a language model directly. Extraction and synthesis are delegated to the Reasoning engine, which keeps the graph a clean, permissioned record of what is known — and keeps model choice out of your data layer.

PropertyValue
ProtocolREST over HTTPS, JSON in and out
Base path/v1
Interactive referenceOpenAPI at /docs and /redoc on your instance
TenancyOne isolated graph per organisation, selected by X-Org-Id
Write semanticsIdempotent merge on (id, org_id) — safe to replay
RetrievalGraph traversal · vector similarity · full text, fused and ranked
RealtimeWebSocket task progress; event bus with dead-letter queue

Quickstart

Provision a tenant, write a node, link it, find it back.

1. Provision your tenant

One-time per application. Creates the isolated graph, its anchor node and the managed vector collections. Idempotent — safe to call on every boot.

curl -X POST https://<YOUR_COGNITION_HOST>/v1/tenants/provision \
  -H "Authorization: Bearer <YOUR_SERVICE_TOKEN>" \
  -H "X-Org-Id: my-tenant" \
  -H "Content-Type: application/json" \
  -d '{ "tenant_id": "my-tenant", "template": "kora_hai" }'

Pass archetype to declare your own subtype tree, template to load a shipped one, or graph_type for a stock shape (product, people, code, kit, concept, custom).

2. Create a node

curl -X POST https://<YOUR_COGNITION_HOST>/v1/graphs/nodes \
  -H "X-Org-Id: my-tenant" \
  -H "Content-Type: application/json" \
  -d '{
        "id": "concept-ml",
        "name": "Machine Learning",
        "node_type": "Concept",
        "description": "A branch of artificial intelligence",
        "graph_type": "custom",
        "graph_name": "my-graph",
        "metadata": { "source": "my-app", "seniority": "principal" }
      }'

# 201 Created
{ "id": "concept-ml", "message": "ok" }

Supplying your own id keeps identifiers stable across systems; the write merges rather than duplicating, so replays are safe. metadata is persisted as flat node properties.

3. Relate it

curl -X POST https://<YOUR_COGNITION_HOST>/v1/graphs/relationships \
  -H "X-Org-Id: my-tenant" \
  -H "Content-Type: application/json" \
  -d '{
        "source_id": "concept-ai",
        "target_id": "concept-ml",
        "rel_type": "PARENT_OF",
        "source_label": "Concept",
        "target_label": "Concept",
        "properties": { "score": 0.91, "source": "vector_match" }
      }'

Passing source_label / target_label selects the indexed write path instead of a full scan — material on large graphs. Circular PARENT_OF / CONTAINS writes are rejected before they can corrupt the tree.

4. Search it back

curl -X POST https://<YOUR_COGNITION_HOST>/v1/search \
  -H "X-Org-Id: my-tenant" \
  -H "Content-Type: application/json" \
  -d '{ "query": "artificial intelligence", "top_k": 10, "min_score": 0.0 }'

{ "query": "artificial intelligence",
  "results": [
    { "entity_id": "concept-ml", "score": 0.83, "title": "Machine Learning",
      "content": "A branch of artificial intelligence", "content_type": "Concept",
      "source_backend": "graph", "match_explanation": "name match" }
  ],
  "total": 1, "backends_used": ["graph"] }

Authentication

Two headers, two jobs. Most data routes need the first; administrative and reasoning routes need both.

HeaderPurpose
X-Org-IdThe tenancy boundary. Required on every tenant-scoped route. Selects which organisation's graph you read and write; a request cannot reach another organisation's data.
Authorization: BearerService identity, validated against the platform identity provider. Required on reasoning, documents, tenants, analyzers, privacy, review and administration routes.
Provisioned, not self-serve

Your host, organisation identifier and service credentials are issued when your tenant is provisioned — see Availability & access. There is no public sign-up endpoint.

Data model

Everything is a node with a type, or a typed relationship between two nodes.

Node

FieldMeaning
idOptional. Your own stable identifier — reuse keys across systems, or let one be generated.
nameRequired. The human label.
node_typeRequired. A root primitive or a declared subtype.
descriptionFree text; this is what semantic search reads.
graph_type / graph_nameWhich graph this belongs to. graph_type defaults to custom.
metadataArbitrary JSON, persisted as flat node properties.

Five root primitives

Every node is rooted at exactly one of five types. Tenants don't invent roots — they declare subtypes beneath them.

RootPurpose
SuperRootTenant graph anchor — one per tenant, carries the archetype configuration.
PersonHuman entities.
OrganisationCompanies, teams, agencies.
ConceptAbstractions — skills, features, requirements, personas.
ArtefactConcrete things — documents, emails, code files, reasoning nodes.

Subtypes are a label chain

A subtype is written with its full ancestry, so both general and specific queries work without any schema migration:

(:Concept:Skill:SkillChain { id: "…", name: "…" })
(:Artefact:Document:Email  { id: "…", subject: "…" })
(:Artefact:ReasoningNode   { id: "…", kind: "inference" })

Match Concept and you get every skill, feature and requirement. Match SkillChain and you get exactly that. Subtype names are validated at provision time — the parent must resolve to a root or an inherited subtype, cycles are rejected, and roots cannot be redefined.

Relationship types

FamilyTypes
HierarchyPARENT_OF CONTAINS SUBCONCEPT_OF GENERALISES
CompositionHAS_JOURNEY HAS_FEATURE HAS_REQUIREMENT HAS_TASK
AssociationRELATED_TO SIMILAR_TO VARIANT_OF ALIGNS_WITH DERIVED_FROM USES_CONCEPT

Edges carry properties — a match score and its source, or the reasoning step that produced it — so provenance lives on the edge itself.

Ontology & archetypes

Your graph's shape is declared, not hard-coded. An archetype composes platform ontology modules with your own subtypes, and is stored on the tenant anchor.

ModuleRooted atContributes
ProductConceptFeature Requirement Task Persona PainPoint Goal Metric Constraint Journey Story
CodeArtefactCodeFile CodeComponent Module Package TestCase
PeopleArtefactDocument Email AgentLog
ReasoningArtefactReasoningNode DesignDecision

Declare your own subtypes in the archetype at provision time, or start from a shipped template. As patterns prove themselves across tenants, they can be promoted into the shared ontology — so the platform vocabulary grows from real usage rather than guesswork.

API reference

All paths are relative to /v1. Org marks routes needing X-Org-Id; Token marks routes needing a bearer token.

GET/healthLiveness.
GET/health/readyReadiness — validates every dependency. Returns 503 until they're all healthy.

Nodes & relationships · Org

POST/v1/graphs/nodes

Create or merge a node. 201 with the id. Unknown node_type or graph_type returns 400.

GET/v1/graphs/nodes/{node_id}

Fetch one node; optional ?graph_name=. 404 if it isn't in your organisation's graph.

PUT/v1/graphs/nodes/{node_id}

Update name and description.

DEL/v1/graphs/nodes/{node_id}

Delete — soft by default; ?soft=false removes outright. 204.

POST/v1/graphs/relationships

Typed edge with optional properties. Cycle detection guards PARENT_OF and CONTAINS.

DEL/v1/graphs/relationships

Remove a specific edge.

GET/v1/graphs/nodes/{node_id}/neighbours

Outgoing neighbours — the primitive behind graph-augmented recall.

GET/v1/graphs/stats

Node and edge counts for your graph.

POST/v1/graphs/super-root

Create or fetch the tenant anchor.

Bulk & dedup · Org

One request per node is the slow path. Two endpoints exist for volume.

POST/v1/graphs/nodes/bulk
POST/v1/graphs/relationships/bulk
{
  "graph_type": "custom",
  "graph_name": "my-graph",
  "nodes": [
    { "id": "svc-1", "name": "Billing",   "node_type": "Module" },
    { "id": "svc-2", "name": "Invoicing", "node_type": "Module" }
  ]
}

# 201 Created
{ "ids": ["svc-1", "svc-2"], "count": 2, "message": "ok" }

Graph-level fields sit on the envelope; each row carries only its own data. Writes merge, so a replayed batch converges rather than duplicating. An invalid row fails that row with a 400.

POST/v1/graphs/dedup

Collapse duplicate nodes sharing an id. Idempotent — a clean graph reports zero removed. Always dry-run first:

{ "graph_name": "my-graph", "dry_run": true, "batch_size": 100 }

{ "dry_run": true, "graph_name": "my-graph",
  "results": [ { "label": "Concept", "dup_groups": 3, "extra_rows": 11, "removed": 0 } ] }

Omit label to sweep every type. batch_size and an iteration cap keep each pass bounded on very large graphs.

Concepts & resolution · Org

POST/v1/concepts

Add a concept, optionally under parent_id, with knowledge_domain and confidence.

GET/v1/concepts/search?q=

Case-insensitive name search.

POST/v1/concepts/resolve

The query-understanding call. Free text in, anchored concepts out, through a three-tier cascade:

TierWhat it does
1 · AnchorsName matches in your graph. Strong anchors match a whole query phrase exactly.
2 · NeighboursHierarchy traversal from those anchors — parents, children, siblings — in one query.
3 · DiscoveriesVector search for what the first two tiers missed.

Returns { anchors, strong_anchors, neighbours, discoveries, all_concepts }. Each tier fails soft, so one backend being down still returns useful matches. Query strings are always parameters, never interpolated into the graph query.

POST/v1/concepts/vectors/search

Semantic search — returns concept_id, name, node_type, score.

POST/v1/concepts/vectors/index
POST/v1/concepts/vectors/batch
DEL/v1/concepts/vectors/{entity_id}

Index one entity or many — batch returns { "indexed": n, "failed": n } — and remove entities from the vector collections.

Reasoning & provenance · Token

Record why the graph looks the way it does — a directed acyclic Graph of Thought, with node kinds of observation, inference, decision, question and answer.

POST/v1/reasoning/nodes
GET/v1/reasoning/nodes/{id}
GET/v1/reasoning/nodes/{id}/chainRoot-to-node chain.
GET/v1/reasoning/nodes/{id}/childrenImmediate branches.
GET/v1/reasoning/provenance/{entity_id}

Ask any entity what produced it — creations, updates, merges, splits and links are all linked back to the reasoning that caused them.

POST/v1/reasoning/decisions
GET/v1/reasoning/decisionsFilterable by status.
PATCH/v1/reasoning/decisions/{id}/status

Design decisions carry context, rationale, alternatives considered and a lifecycle status.

POST/v1/reasoning/search

Semantic search over reasoning chains.

Documents & tasks · Token

POST/v1/documents

Submit a document for asynchronous cognitive processing — extraction, structuring, integration and validation. Returns a task id.

GET/v1/tasks/{task_id}
WS/ws/tasks/{task_id}

Poll the task, or subscribe over WebSocket for live progress.

Tenants · Token

POST/v1/tenants/provision

Idempotent. Accepts archetype (your own subtype tree), template (a shipped one), or graph_type (a stock shape).

GET/v1/tenants
GET/v1/tenants/{tenant_id}
POST/v1/tenants/verify-accessConfirm a node belongs to the calling tenant.
DEL/v1/tenants/{tenant_id}Destructive — removes all tenant data.

Access control · Token

Beyond tenant isolation, individual embeddings carry access levels — public, internal, confidential, restricted — and per-principal grants.

POST/v1/privacy/access/grant
POST/v1/privacy/access/revoke
POST/v1/privacy/access/check
POST/v1/privacy/access/bulk-check
POST/v1/privacy/access/set-level
GET/v1/privacy/access/embeddings/{principal_id}
GET/v1/privacy/access/principals/{embedding_id}
POST/v1/privacy/search

Permission-filtered search — results a principal may not see are never returned, rather than filtered in your application.

Agents, review & dead letters

Housekeeping agents · Org

POST/v1/agents/run
GET/v1/agents/status

Run the full batch with change detection, or name a subset. Six agents keep the graph coherent:

AgentWhat it does
Merge / splitCollapses nodes that are the same thing; splits ones conflating two.
Link predictionProposes edges nobody stated but the data implies.
Hierarchy coherenceRepairs parentage that drifted as the graph grew.
Concept driftFlags where a region stopped matching its own summary.
QualityAudits naming and structural quality.

Each agent runs under its own timeout, so one hung agent can't block the scheduler.

Human review · Token + Org

Extractions below the confidence threshold are staged rather than written into the graph. Reviewers triage them:

GET/v1/hitl/pendingFilter by pending / approved / rejected.
GET/v1/hitl/pending/stats
GET/v1/hitl/pending/{record_id}
POST/v1/hitl/pending/{record_id}/approve
POST/v1/hitl/pending/{record_id}/reject

Dead letter queue

A failed event handler publishes to a dead-letter topic instead of vanishing. Triage and replay:

GET/v1/dlq
POST/v1/dlq/{dlq_id}/replay
GET/v1/dlq/stats
DEL/v1/dlq/purge?status=completed

Analyzers & sync · Token

GET/v1/analyzers/statsDensity and counts.
GET/v1/analyzers/hierarchyDepth, breadth, balance.
GET/v1/analyzers/validateContents against schema.
GET/v1/analyzers/qualityNaming quality.
GET/v1/analyzers/treeText tree view.
POST/v1/syncRun sync skills against a graph.
GET/v1/sync/skillsList registered sync skills.

Ingestion pipeline

Submitting a document runs a four-agent pipeline — Scribe extracts, Architect structures, Synthesizer integrates, Interrogator validates — alongside a four-phase progressive extraction: entities, then relationships, then hierarchy, then quality validation.

Everything then passes a confidence gate. High-confidence output is written to the graph and indexed for vector and full-text search. Low-confidence output is staged for human review instead of being written blind — the difference between a graph you can trust and one that slowly fills with plausible noise.

Events

State changes publish to an event bus you can subscribe to, in-process or distributed:

TopicFires when
document.ingestedA document has been accepted for processing.
concepts.extractedExtraction produced concepts.
graph.updatedThe graph changed.
graph.node.createdA node was created.
graph.node.deletedA node was deleted.
vector.indexedAn entity was indexed for semantic search.
extraction.requestedExtraction was queued.
agent.task.queuedA housekeeping task was scheduled.

Reliability

GuardWhat it prevents
Idempotent writesA retried request creating a second copy. Writes merge on identity.
Cycle detectionA circular hierarchy corrupting the tree — rejected before insertion.
Startup gateServing traffic before storage and search are healthy; readiness stays 503 until they are.
Circuit breakerA failing upstream turning into cascading timeouts — it fast-fails, then probes for recovery.
Per-agent timeoutsOne hung housekeeping agent blocking the rest.
Dead letter queueA failed event being silently lost — it lands somewhere you can replay it from.

Errors

StatusMeaning
400Unknown node_type, rel_type, graph_type or label — the value isn't in your vocabulary. Also a rejected cycle.
401Missing or invalid bearer token on a protected route.
404No such node in your organisation's graph. Cross-tenant reads are indistinguishable from "not found", by design.
422Request body failed schema validation.
503Readiness gate — a dependency isn't healthy yet.

Your data

Cognition OS stores the nodes and relationships you write, their metadata, and the embeddings computed for semantic search. Content is indexed into a vector store and a full-text index alongside the graph, so a single write produces derived copies used for retrieval.

Isolation is by organisation and enforced beneath the query layer — every tenant-scoped read carries an organisation filter, so a request cannot read across organisations. Embeddings additionally carry access levels and per-principal grants, and permission-filtered search honours them server-side. Because housekeeping mutates your graph, every change is recorded and attributable. Retention and erasure are set out in the privacy policy.

Availability & access

Cognition OS ships as part of the SeKondBrain platform. It is licensed, not open source: you buy the platform and integrate the graph into your own stack, with your organisation's data isolated and provisioned for you. It already runs in production behind our own products — what you integrate is proven, not a prototype.

Where it runs

ModelWhat it means
Multi-tenant cloudThe default. We operate it; your organisation gets its own isolated graph and its own endpoint.
Your own cloudFor enterprise. Deployed into your cloud account, so graph data never leaves your boundary.

What you get when you're set up

A unique URLYour organisation is issued its own endpoint — that is the <YOUR_COGNITION_HOST> in every example on this page.
CredentialsYour organisation identifier and service token, issued with the endpoint.
A live API referenceYour instance serves its own OpenAPI at /docs and /redoc, matching the version you are running.
Setup guideProvisioning walks you through tenant creation, your first write and your first search.
Request access

Email hello@sekondbrain.ai with the subject “Access for Cognition OS” and tell us what you want to build.