How openbkn-ai/bkn-foundry works
BKN Foundry is a backend platform for modeling and governing business knowledge networks, querying their ontology and underlying data, and supporting agent-facing model calls. The main query path accepts a client request, applies the relevant query logic, retrieves data through Vega, and returns results. The tree also identifies ontology management, metrics, authorization, proxy synchronization, and trace/evidence capabilities. Edges are limited to relationships visible in sampled source; several README-described capabilities have no corresponding implementation excerpts here.
Main entry points: metric_query_service.go Metric query · llm_controller.py LLM API · query_service.go Cypher query · bkn_handler.go BKN API
Components 23
Ontology management
- BKN API
adp/bkn/bkn-backend/server/driveradapters/bkn_handler.go - BKN service
adp/bkn/bkn-backend/server/logics/bkn/bkn_service.go - Knowledge networks
adp/bkn/bkn-backend/server/logics/knowledge_network/knowledge_network_service.go - Capability bindings
adp/bkn/bkn-backend/server/logics/capability_binding/capability_binding_service.go - Object and relation types
adp/bkn/bkn-backend/server/logics/object_type/object_type_service.go - Permissions
adp/bkn/bkn-backend/server/logics/permission/permission_service.go
Knowledge queries
- Metric API
adp/bkn/ontology-query/server/driveradapters/metric_handler.go - Metric query
adp/bkn/ontology-query/server/logics/metric/metric_query_service.go - Query authorization
adp/bkn/ontology-query/server/logics/query_authorization/query_authorization_service.go - Cypher query
adp/bkn/bkn-backend/server/logics/cypher/query_service.go
Data access
- Vega data access
adp/bkn/ontology-query/server/drivenadapters/vega_backend/vega_backend_access.go - Raw query API
vega/vega-backend/server/driveradapters/query_handler.go - Raw query service
vega/vega-backend/server/logics/query/raw_query_service.go - Data connectors
Agent and trace
- LLM API
infra/mf-model-api/app/controller/llm_controller.py - Model management
infra/mf-model-manager/app/controller/llm_controller.py - LLM provider
- Redis cache
- Evidence trace
adp/bkn/ontology-query/server/common/bkntrace/evidence.go - Interaction assembly
bkn-trace/agent-observability/src/domain/service/assemblysvc/query_service.go
Other components
- CLI or API client
- Query client
- Agent or application
Connections 19
- CLI or API client → BKN API: sends requests
- BKN API → BKN service: dispatches
- BKN service → Knowledge networks: manages networks
- Query client → Metric API: sends metric query
- Metric API → Metric query: dispatches
- Metric query → Vega data access: queries resource data
- Metric query → Query authorization: checks access
- Metric query → Object and relation types: loads object type
- Cypher query → Permissions: checks permissions
- Cypher query → Object and relation types: resolves schema
- Cypher query → Vega data access: runs data query
- Query client → Raw query API: sends raw query
- Raw query API → Raw query service: executes
- Raw query service → Data connectors: queries data
- Agent or application → LLM API: requests completion
- LLM API → LLM provider: calls model
- LLM API → Redis cache: reads and writes
- LLM API → Evidence trace: emits trace evidence
- Interaction assembly → Evidence trace: loads evidence