Skip to main content

Providers

Providers implement contracts using specific database clients.

Enterprise Mode Providers

Postgres Provider

Implements: ObjectStore, OutboxStore, AdminStore
Tables:
  • items, passages, entities, artifacts, agent_actions
  • outbox_events
  • tenants, users, connector_configs, run_logs

OpenSearch Provider

Implements: TextSearchProvider
Index: kos_passages Features:
  • Full-text search with highlighting
  • Faceted aggregations (source, content_type, date)
  • Term vectors for snippets

Neo4j Provider

Implements: GraphSearchProvider
Nodes:
  • :Entity {kos_id, tenant_id, name, type}
  • :Item {kos_id, tenant_id, title, source}
  • :Passage {kos_id, tenant_id}
Relationships:
  • (Item)-[:HAS_PASSAGE]->(Passage)
  • (Passage)-[:MENTIONS]->(Entity)
  • (Entity)-[:RELATED_TO {type}]->(Entity)

Qdrant Provider

Implements: VectorSearchProvider
Collection: kos_passages_vectors Payload: kos_id, tenant_id, user_id, item_id, source

Solo Mode Provider

SurrealDB Provider

Implements: ALL contracts
Tables: Same as Postgres Edges: mentions, has_passage, related_to

Provider Selection

Providers are selected based on KOS_MODE:

Adding Custom Providers

To add a new provider:
  1. Create a new package in kos/providers/
  2. Implement the required contracts
  3. Add to dependency extras in pyproject.toml
  4. Update the dependency injection in kos/kernel/api/http/dependencies.py

Adaptive Cognitive Plane Providers

The ACP introduces three new contracts that providers must implement:

Additional Tables (Both Modes)

The outcome_events table must enforce append-only semantics at the provider level. No UPDATE or DELETE operations should be permitted on this table.

Next Steps

Adaptive Cognitive Plane

How providers power self-evolution

Agents

Learn about the agent subsystem