Workspace Intelligence / JSON Schema
Workspai Bounded Knowledge Graph Search
A deterministic, bounded, proof-carrying retrieval projection intended for agents, MCP clients, IDEs, and CI consumers.
- Schema version
workspace-knowledge-search.v1- Contract path
contracts/workspace-intelligence/workspace-knowledge-search.v1.json- Publication
- json-schema
- Defined fields
- 34
- Artifact bindings
- 0
Why this contract exists
Architecture role
Defines a versioned interoperability boundary used by Workspai and contract-aware consumers.
Consumption boundary
- • Workspai CLI
- • Workspace Intelligence consumers
- • IDEs and agents
Related commands
Commands are linked only when the runtime contract identifies a direct production relationship. Supporting contracts may be consumed without having a single producer command.
This is a supporting, capability, cache, compatibility, or consumer contract. It has no single direct producer command in the canonical Workspace Intelligence execution registry.
Produced artifacts
These durable files are emitted by registered commands and validated against this contract.
No canonical file artifact is registered for this contract. It may describe capabilities, embedded data, runtime exchange, or supporting state instead of a standalone report.
Field reference
Every declared schema property or published capability path is listed here. Required means the contract declares or publishes that field at the shown boundary.
| Field path | Type | Required | Meaning | Constraints |
|---|---|---|---|---|
| budget | object | No | Present for the agent projection. Reports every hard payload limit and omission without changing the v1 full projection contract. | additionalProperties: false |
| budget.limits | object | Yes | Defines the limits value at this contract boundary. | additionalProperties: false |
| budget.limits.aliasesPerEntity | integer | Yes | Defines the aliasesperentity value at this contract boundary. | minimum: 1 · maximum: 8 |
| budget.limits.attributeArrayItems | integer | Yes | Defines the attributearrayitems value at this contract boundary. | minimum: 1 · maximum: 8 |
| budget.limits.attributeStringCharacters | integer | Yes | Defines the attributestringcharacters value at this contract boundary. | minimum: 1 · maximum: 256 |
| budget.limits.proofIdsPerItem | integer | Yes | Defines the proofidsperitem value at this contract boundary. | minimum: 1 · maximum: 4 |
| budget.limits.proofs | integer | Yes | Defines the proofs value at this contract boundary. | minimum: 1 · maximum: 16 |
| budget.limits.relatedEntities | integer | Yes | Defines the relatedentities value at this contract boundary. | minimum: 1 · maximum: 24 |
| budget.limits.relations | integer | Yes | Defines the relations value at this contract boundary. | minimum: 1 · maximum: 24 |
| budget.mode | string | Yes | Defines the mode value at this contract boundary. | const: "agent" |
| budget.omitted | object | Yes | Defines the omitted value at this contract boundary. | additionalProperties: false |
| budget.omitted.aliases | integer | Yes | Defines the aliases value at this contract boundary. | minimum: 0 |
| budget.omitted.attributeValues | integer | Yes | Defines the attributevalues value at this contract boundary. | minimum: 0 |
| budget.omitted.entities | integer | Yes | Defines the entities value at this contract boundary. | minimum: 0 |
| budget.omitted.proofReferences | integer | Yes | Defines the proofreferences value at this contract boundary. | minimum: 0 |
| budget.omitted.proofs | integer | Yes | Defines the proofs value at this contract boundary. | minimum: 0 |
| budget.omitted.relatedEntities | integer | Yes | Defines the relatedentities value at this contract boundary. | minimum: 0 |
| budget.omitted.relations | integer | Yes | Defines the relations value at this contract boundary. | minimum: 0 |
| entities | array | Yes | Defines the entities value at this contract boundary. | maxItems: 100 |
| graphSourceHash | string | No | Defines the graphsourcehash value at this contract boundary. | pattern: ^[a-f0-9]{64}$ |
| kind | any | Yes | Defines the kind value at this contract boundary. | — |
| limit | integer | Yes | Defines the limit value at this contract boundary. | minimum: 1 · maximum: 100 |
| projectId | string | No | Defines the projectid value at this contract boundary. | minLength: 1 |
| proofs | array | Yes | Defines the proofs value at this contract boundary. | — |
| query | string | Yes | Defines the query value at this contract boundary. | minLength: 1 |
| relatedEntities | array | Yes | Defines the relatedentities value at this contract boundary. | — |
| relatedEntities[].id | string | Yes | Defines the id value at this contract boundary. | minLength: 1 |
| relatedEntities[].kind | reference | Yes | Defines the kind value at this contract boundary. | ref: workspace-knowledge-graph.v1.json#/properties/entities/items/properties/kind |
| relatedEntities[].label | string | Yes | Defines the label value at this contract boundary. | minLength: 1 |
| relatedEntities[].projectId | string | No | Defines the projectid value at this contract boundary. | minLength: 1 |
| relations | array | Yes | Defines the relations value at this contract boundary. | — |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspace-knowledge-search.v1" |
| totalMatches | integer | Yes | Defines the totalmatches value at this contract boundary. | minimum: 0 |
| truncated | boolean | Yes | Defines the truncated value at this contract boundary. | — |
Canonical machine-readable definition
The raw synchronized contract remains authoritative. The educational sections above are projections of this definition.
Show raw JSON
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://workspai.dev/schemas/workspace-intelligence/workspace-knowledge-search.v1.json",
"title": "Workspai Bounded Knowledge Graph Search",
"description": "A deterministic, bounded, proof-carrying retrieval projection intended for agents, MCP clients, IDEs, and CI consumers.",
"type": "object",
"required": [
"schemaVersion",
"query",
"kind",
"limit",
"totalMatches",
"truncated",
"entities",
"relatedEntities",
"relations",
"proofs"
],
"properties": {
"schemaVersion": {
"const": "workspace-knowledge-search.v1"
},
"graphSourceHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"query": {
"type": "string",
"minLength": 1
},
"kind": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "workspace-knowledge-graph.v1.json#/properties/entities/items/properties/kind"
}
]
},
"projectId": {
"type": "string",
"minLength": 1
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"totalMatches": {
"type": "integer",
"minimum": 0
},
"truncated": {
"type": "boolean"
},
"entities": {
"type": "array",
"maxItems": 100,
"items": {
"$ref": "workspace-knowledge-graph.v1.json#/properties/entities/items"
}
},
"relatedEntities": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"kind",
"label"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"kind": {
"$ref": "workspace-knowledge-graph.v1.json#/properties/entities/items/properties/kind"
},
"label": {
"type": "string",
"minLength": 1
},
"projectId": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
},
"relations": {
"type": "array",
"items": {
"$ref": "workspace-knowledge-graph.v1.json#/properties/relations/items"
}
},
"proofs": {
"type": "array",
"items": {
"$ref": "workspace-knowledge-graph.v1.json#/properties/proofs/items"
}
},
"budget": {
"description": "Present for the agent projection. Reports every hard payload limit and omission without changing the v1 full projection contract.",
"type": "object",
"required": [
"mode",
"limits",
"omitted"
],
"properties": {
"mode": {
"const": "agent"
},
"limits": {
"type": "object",
"required": [
"relations",
"relatedEntities",
"proofs",
"proofIdsPerItem",
"aliasesPerEntity",
"attributeArrayItems",
"attributeStringCharacters"
],
"properties": {
"relations": {
"type": "integer",
"minimum": 1,
"maximum": 24
},
"relatedEntities": {
"type": "integer",
"minimum": 1,
"maximum": 24
},
"proofs": {
"type": "integer",
"minimum": 1,
"maximum": 16
},
"proofIdsPerItem": {
"type": "integer",
"minimum": 1,
"maximum": 4
},
"aliasesPerEntity": {
"type": "integer",
"minimum": 1,
"maximum": 8
},
"attributeArrayItems": {
"type": "integer",
"minimum": 1,
"maximum": 8
},
"attributeStringCharacters": {
"type": "integer",
"minimum": 1,
"maximum": 256
}
},
"additionalProperties": false
},
"omitted": {
"type": "object",
"required": [
"entities",
"relations",
"relatedEntities",
"proofs",
"proofReferences",
"aliases",
"attributeValues"
],
"properties": {
"entities": {
"type": "integer",
"minimum": 0
},
"relations": {
"type": "integer",
"minimum": 0
},
"relatedEntities": {
"type": "integer",
"minimum": 0
},
"proofs": {
"type": "integer",
"minimum": 0
},
"proofReferences": {
"type": "integer",
"minimum": 0
},
"aliases": {
"type": "integer",
"minimum": 0
},
"attributeValues": {
"type": "integer",
"minimum": 0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}