BKN (Business Knowledge Network) is a Markdown-based domain modeling language for business knowledge networks. This repository hosts the official specification and examples.
The core documentation is the BKN Language Specification:
- SPECIFICATION.md — Full specification (Chinese)
- SPECIFICATION.en.md — English edition
Official SDKs for parsing, validating, and transforming BKN files. See sdk/ for full documentation.
| Language | Package | Install |
|---|---|---|
| Python | pip install kweaver-bkn |
|
| TypeScript | npm install @kweaver-ai/bkn |
|
| Golang | — | go get github.com/kweaver-ai/bkn-specification/sdk/golang |
The repository also includes a Go-based CLI for inspecting, validating, and transforming BKN files:
- cli/README.md — Usage, examples, and smoke-test commands
| Concept | Description |
|---|---|
| Object | Business object types (e.g. Pod, Node, Service) |
| Relation | Links between objects |
| Action | Operations on objects (with tool/MCP binding) |
| Risk | Risk type for structured execution risk modeling |
| data_view | Data source mapping for objects and relations |
- Add/modify: Edit
.bknfiles and import (upsert bynetwork,type,id). - Delete: Use the SDK/CLI delete API explicitly; deletion is not expressed in BKN files.
├── docs/
│ ├── SPECIFICATION.md # Full spec (CN)
│ ├── SPECIFICATION.en.md # Full spec (EN)
│ ├── ARCHITECTURE.md # Architecture overview
│ └── templates/ # BKN file templates
└── examples/ # Example networks (Kubernetes topology)
├── k8s-topology.bkn # Single-file example
├── k8s-network/ # Split by type (objects, relations, actions)
└── k8s-modular/ # One definition per file
Apache-2.0