Private preview. Daggry is not publicly released.Roadmap
Skip to content

Tenant config ​

Reference

Two teams rarely work the same way: one lets agents deliver results all night, and another wants a person to approve every plan. The tenant config holds those choices as data. It is one YAML document that says how a tenant's factory works: which workflows it offers, how work is scheduled, which agents work and where a person must approve, which runners run the steps, which validators count as evidence, which projects it serves and which workflows run on each. This page defines the layout and the precedence rule. Read it if you are a tenant admin, or if you write a tool that reads the document. For the steps, follow Set up a tenant.

The format is open. It follows the same layout rules as the Project config: a format header, named sections and namespaced extension keys.

The documents on this page are illustrative. In examples, <engine> stands for the identifier of an agent engine your installation provides.

Download ​

The tenant config has a published JSON Schema (draft 2020-12). The table links the file.

SchemaFile
daggry/tenant@1daggry-tenant-v1.json

The standard ​

Layout ​

A tenant config has three parts.

PartKeysRule
HeaderformatRequired. Names the standard and its major version.
Sectionsworkflows, orchestration, agents, runners, validators, projects, extensionsEach is optional. Each appears at most once.
Extension keys<namespace>/<key>Any number. The rules are in Extension keys.

Every object is closed: a key that is not listed on this page and is not an extension key is refused. The document uses the strict YAML subset.

The header has one key.

KeyTypeRequiredMeaning
formatstringyesAlways daggry/tenant@1.

A reader refuses a missing format, a malformed one and a major version it does not know.

workflows ​

The workflows section is the catalogue: the workflows the tenant offers, and where each one comes from. The table lists its keys.

KeyTypeRequiredMeaning
workflowsarray of objectsnoThe catalogue. Names are unique.
workflows[].namestringyesThe name a project entry uses to assign the workflow. Non-empty. See projects.
workflows[].source.workspacestringyesThe workspace that holds the workflow file. Non-empty. The tenant chooses it.
workflows[].source.pathstringyesThe path of the workflow file in that workspace. Non-empty.
workflows[].source.revisionstringyesThe version of the workspace the file is read from, in the form the binding gives. Non-empty.

A workflow is pinned to one version, so a catalogue entry names exactly one file content. The file itself follows the Workflow file. A run uses only a workflow from the catalogue.

The source can be a workspace of workflows, or the workspace the work is done on. In both cases the tenant names it here, and the workspace itself assigns nothing.

orchestration ​

The orchestration section holds the rules the conductor follows when it gives work to runners. The table lists its keys.

KeyTypeRequiredMeaning
orchestration.concurrency_capintegerno1 or more. The most attempts that run at one time for this tenant.
orchestration.lease_secondsintegerno1 or more. The length of a job lease.
orchestration.attempts.maxintegerno1 or more. The most attempts one job can have. A job that needs one more fails the run.
orchestration.retry.backoff_secondsintegerno0 or more. The wait before a new attempt starts after a lapsed lease.
orchestration.parking.max_secondsintegerno1 or more. The longest a run stays parked before it fails.

A run is parked when a limit is reached and the work waits for it to reset. For the states, see HTTP API.

agents ​

The agents section says which engines and agents work for the tenant, and when a person must decide. The table lists its keys.

KeyTypeRequiredMeaning
agents.enginesarray of objectsnoThe registered engines. An engine value in a workflow must name one of them.
agents.engines[].namestringyesThe engine identifier. Non-empty. Unique.
agents.engines[].credential.refstringyesThe name of the stored secret the engine uses. Non-empty.
agents.rosterarray of objectsnoThe named agents.
agents.roster[].namestringyesThe agent's name. Non-empty. Unique.
agents.roster[].enginestringyesThe name of a registered engine.
agents.roster[].instructionsstringnoThe path of the agent's instruction file in the workflow's source workspace.
agents.approval.requirearray of stringsnoThe points where a run always waits for a person. Each is plan or effect.

Two rules hold for this section:

  • A credential is a reference, never a value. credential.ref names a secret that the control plane stores. The document has no key that takes a secret value.
  • Approval rules bind every workflow. With plan in agents.approval.require, a workflow whose agent step delivers a plan must have a human step with waiting_for: approval before any later step. With effect, a human step must come before every effect step. A catalogue workflow that does not fit is refused.

runners ​

The runners section holds the images that run steps, and the isolation class of each kind of runner. The table lists its keys.

KeyTypeRequiredMeaning
runners.imagesarray of objectsnoThe images the tenant offers.
runners.images[].namestringyesThe name a project entry uses in projects[].image. Non-empty. Unique.
runners.images[].imagestringyesThe image reference, by digest.
runners.images[].toolsarray of labelsnoThe tools the image holds, by the labels a project config uses in needs.tools.
runners.images[].defaultbooleannotrue on at most one image: the one a workspace gets when its project entry names none.
runners.classesarray of objectsnoThe isolation classes.
runners.classes[].namestringyesThe class name. Non-empty. Unique. A script validator asks for a class by this name in needs.runner.
runners.classes[].modulestringyesdeterministic-runner or agent-runner: the kind of step execution the class applies to.
runners.classes[].networkstringyesnone or open: whether a pod of the class reaches the network.
runners.classes[].model_credentialbooleanyesWhether a pod of the class holds an engine's credential. false is required for deterministic-runner.

The deterministic runner runs what a person wrote into the workflow, the project or the tenant, and never holds a model credential. The agent runner runs an agent engine and whatever that engine generates. No class gives a pod the signing key.

validators ​

The validators section says which validators count as evidence for this tenant, beyond the built-in ones. The validator contract and the three sources are defined in Validators. The table lists the keys.

KeyTypeRequiredMeaning
validators.scriptsmapnoThe tenant's script validators, from a validator name to a declaration. A workflow refers to one as tenant/<name>.
validators.scripts.<name>.source.workspacestringyesThe workspace that holds the script. Non-empty.
validators.scripts.<name>.source.revisionstringyesThe version of that workspace the script is read from. Non-empty.
validators.scripts.<name>.runcommandyesWhat runs, with paths relative to the root of the source. See Commands.
validators.scripts.<name>.kindlabelyesWhat the validator looks at.
validators.scripts.<name>.result, timeout, env, needsnoThe same keys as a project's script validator. See validators.
validators.nativearray of objectsnoThe native validators the tenant admits.
validators.native[].namestringyes<namespace>/<name>, in a namespace other than daggry, tenant and project. A workflow refers to it by this name.
validators.native[].versionstringyesThe exact version admitted. Non-empty.
validators.native[].digeststringyesThe SHA-256 of the validator as installed: 64 lowercase hex digits.

These rules apply to the section.

  • A tenant's script validator runs on the project's workspace. It runs in the deterministic runner, on a clean copy of the sealed version, with the files of its source beside it and read-only.
  • A native validator is admitted, not installed, here. The cluster admin installs it with the factory. The tenant admits it by name, version and digest, and one whose digest differs is refused.
  • A project's own validators are admitted for each workspace. See projects[].validators.admit in projects.

projects ​

The projects section lists the workspaces the tenant's factory works on, and what the tenant decided for each one. This section is where a workflow is assigned to a workspace. The table lists the keys of a project entry.

KeyTypeRequiredMeaning
projectsarray of objectsnoThe workspaces.
projects[].workspacestringyesThe workspace, named in the form its binding gives. Non-empty. Unique.
projects[].bindinglabelnoThe name of a binding from extensions.bindings. It says what the workspace is and how its versions, work items and changes are named. Absent is valid when the tenant registers exactly one binding.
projects[].workflows.allowedarray of stringsnoNames from the catalogue that can run on this workspace. Absent means the whole catalogue.
projects[].workflows.defaultstringnoThe workflow a run uses when it names none. One of the allowed names.
projects[].agents.enginesarray of stringsnoNames from agents.engines that can work on this workspace. Absent means every registered engine.
projects[].agents.rosterarray of stringsnoNames from agents.roster that can work on this workspace. Absent means the whole roster.
projects[].approval.requirearray of stringsnoPoints where a run on this workspace always waits for a person, added to agents.approval.require. Each is plan or effect.
projects[].validators.admitstring or array of namesnoWhich of the project's own script validators count as evidence: all, none, or a list of validator names, none twice. Absent means none.
projects[].areasarray of area namesnoNames of areas that the workspace's project config defines in areas. At least one name, none twice. Together they are the scope of every run on this workspace: a run changes paths inside those areas only. Absent means the tenant sets no scope for runs on the workspace.
projects[].imagestringnoThe name of a runner image from runners.images. Absent means the default image.

These rules apply to a project entry.

  • A run starts only for a listed workspace.
  • The tenant assigns, the project does not. A run on a workspace uses a workflow from workflows.allowed. The workspace's own Project config has no key that names a workflow, an engine or an approval rule.
  • The tenant decides which project scripts are evidence. A verify step runs a project's validator only when validators.admit admits it, and a run that names one it does not admit is refused when it starts. A validator the tenant has not admitted still runs as a preview for the agent when the project exposes it. See Admission.
  • A project entry narrows the tenant's own lists. A name that the catalogue, the engines, the roster, the images or the bindings lack is refused.
  • Approval rules only add. A project entry can require one more approval point than the tenant-wide rule. It cannot remove one.
  • A workflow must fit the workspace. A workflow whose verify step names project runs only on a workspace whose project config names a canonical validator. A run that does not fit is refused when it starts.
  • An area must exist. The names in areas are looked up in the project config of the baseline when a run starts. A run on a workspace whose project config lacks one of the names is refused. A run request can name areas from the list to narrow the scope of that run, and a name outside the list refuses the run. See The scope of a run.
  • An image must hold what the validators need. When a validator that a run uses names a tool in needs.tools that the workspace's image does not list, or a runner class in needs.runner that runners.classes lacks, the run is refused when it starts.

What is true of the workspace itself, such as its areas, its validators and the paths it protects, is in its project config. The project config defines the areas, and this section chooses among them.

extensions ​

The extensions section holds what the tenant registers beyond the standard. A binding brings most of these entries. See Bindings. The table lists the keys.

KeyTypeRequiredMeaning
extensions.bindingsarray of objectsnoThe bindings the tenant uses. Each has a name (a label) and a version.
extensions.adaptersarray of objectsnoThe adapters that read a tool's own output into a result document. Each has a name, <namespace>/<adapter>, and a version. A result.contract names one.
extensions.effectsarray of objectsnoThe effects an effect step can name in do. Each has a name, bare or <namespace>/<name>, and a version.
extensions.step_kindsarray of objectsnoStep kinds besides the five of the standard.
extensions.step_kinds[].kindstringyes<namespace>/<name>. See Extensibility.
extensions.step_kinds[].modulestringyesWhat runs the step: deterministic-runner, agent-runner or control-plane.
extensions.step_kinds[].schemastringyesThe URL of the JSON Schema for the step's keys.
extensions.artifact_kindsarray of objectsnoArtifact kinds besides the eight in Record kinds.
extensions.artifact_kinds[].kindstringyes<namespace>/<name>@<major>, in a namespace other than evidence and daggry.
extensions.artifact_kinds[].schemastringyesThe URL of the JSON Schema for the kind's body.

This section is the registry. A binding, an adapter, an effect, a step kind or an artifact kind that is neither part of the standard nor listed here is refused. Validators have a section of their own: see validators.

Where it lives ​

The table says where the document is held and who changes it.

RuleDetail
Held byThe control plane, outside every pod and every workspace.
Changed byA person. No run, no step and no agent writes it.

Precedence ​

Three documents set rules for a run. The order is tenant, then project, then workflow: the tenant's rule wins over the project's, and the project's wins over the workflow's. The table lists what each document sets.

DocumentSetsCannot
Tenant configEvery limit: the catalogue, the engines, the images, the approval points and the orchestration limits. Which workflows, agents, approval points, areas and admitted validators apply to each workspace.-
Project configWhat is true of one workspace: its areas, its validators, its canonical validator and the paths it protects.Choose a workflow, an engine, an approval rule or the scope of a run. Admit its own validators. Widen a tenant rule.
WorkflowNarrower rules for one step: its scope inside the scope of the run, and the validators a verify step names.Name a validator the tenant has not admitted. Widen a project or tenant rule.

A project or a workflow can add limits. A project can protect more paths, and a workflow can give a step a smaller scope inside the scope of the run. The scope of a run is the tenant's choice among the areas the project defines.

Only a person widens a rule. An agent, a workflow and an extension key narrow or add, and never widen. The table says who can widen each rule.

To widenWho decidesHow
A limit in the tenant configThe tenant adminBy changing the tenant config.
A limit in the project configThe project owner, inside what the tenant allowsBy an accepted change to the project config. It applies from the next run.
A rule inside one runA person, by a grantBy an approval that is sealed as evidence and opens one thing once, such as unfreeze.

An agent is never in that table. The control plane holds the tenant config outside every runner, and a run reads the project config from the baseline, so an edit by a step changes nothing for the run. Every run records the configuration it started under, and a later change applies to new runs only.

Worked example ​

This tenant offers two workflows, runs at most four attempts at once, registers one engine and two agents, requires a person before work builds on a plan, and serves two workspaces under two bindings. It defines one script validator of its own and admits one native validator. For the first workspace it admits every validator the project declares. For the second it admits three by name, requires a person before any effect and sets the scope of every run to one area.

yaml
format: daggry/tenant@1

workflows:
  - name: delivery
    source:
      workspace: factory-workflows
      path: workflows/delivery.yaml
      revision: v-0017
  - name: translate
    source:
      workspace: factory-workflows
      path: workflows/translate.yaml
      revision: v-0017

orchestration:
  concurrency_cap: 4
  lease_seconds: 60
  attempts:
    max: 3
  retry:
    backoff_seconds: 30
  parking:
    max_seconds: 21600

agents:
  engines:
    - name: <engine>
      credential:
        ref: model-credential
  roster:
    - name: lead
      engine: <engine>
      instructions: agents/lead.md
    - name: reviewer
      engine: <engine>
      instructions: agents/reviewer.md
  approval:
    require: [plan]

runners:
  images:
    - name: documents
      image: registry.example/jobs/documents@sha256:<digest>
      tools: [pandoc-3]
      default: true
    - name: programs
      image: registry.example/jobs/programs@sha256:<digest>
      tools: [node-22]
  classes:
    - name: checks
      module: deterministic-runner
      network: none
      model_credential: false
    - name: networked
      module: deterministic-runner
      network: open
      model_credential: false
    - name: agents
      module: agent-runner
      network: open
      model_credential: true

validators:
  scripts:
    licence-terms:
      source:
        workspace: factory-validators
        revision: v-0009
      run: [sh, licence/check.sh]
      kind: custom
      result:
        contract: document
      timeout: 120
  native:
    - name: acme/contract-clauses
      version: "1.2.0"
      digest: 3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855e

projects:
  - workspace: handbook
    binding: review
    workflows:
      allowed: [delivery, translate]
      default: delivery
    validators:
      admit: all
    image: documents
  - workspace: example/shop-web
    binding: software
    workflows:
      allowed: [delivery]
      default: delivery
    agents:
      roster: [lead]
    approval:
      require: [effect]
    validators:
      admit: [test, lint, types]
    areas: [app]
    image: programs

extensions:
  bindings:
    - name: review
      version: "1.0.0"
    - name: software
      version: "1.0.0"
  adapters:
    - name: review/citations
      version: "1.0.0"
    - name: software/junit
      version: "1.0.0"
  effects:
    - name: publish
      version: "1.0.0"
    - name: open-pr
      version: "1.0.0"
  step_kinds:
    - kind: acme/scan
      module: deterministic-runner
      schema: https://acme.example/schemas/scan-step-v1.json
  artifact_kinds:
    - kind: acme/scan-report@1
      schema: https://acme.example/schemas/scan-report-v1.json

acme/billing:
  cost_centre: platform

The table explains the values.

ValueMeaning
<engine>The identifier of an agent engine your installation provides.
v-0017, v-0009Version ids in the form the workspace's binding gives.
tenant/licence-termsHow a workflow refers to the tenant's script validator.
admit: [test, lint, types]The validators of example/shop-web that count as evidence, by name. The reference project needs all three: the canonical validator and the two in also.
networkedA class of deterministic runner that reaches the network. A script validator asks for it in needs.runner.
<digest>The 64-digit digest of the image.
model-credentialThe name of a stored secret. The document never holds the secret.
appThe name of an area that the project config of example/shop-web defines. A run on that workspace changes paths inside app only.

Examples a reader refuses ​

A reader refuses each input in the table.

InputRefusal
No format keyMissing format.
format: daggry/tenant@2Unknown major.
orchestration: with concurrency_cap: 0Below the minimum of 1.
agents.engines[] with credential: {value: ...}Unknown key. A credential is given by ref only.
A roster entry whose engine is not in agents.enginesUnknown engine.
A class with module: deterministic-runner and model_credential: trueA deterministic runner never holds a model credential.
extensions.artifact_kinds[] with kind: evidence/scan@1The evidence namespace takes no added kinds.
validators.native[] with name: daggry/extraThe daggry namespace holds the built-in validators only.
validators.native[] with no digestMissing digest. A native validator is admitted by name, version and digest.
validators.scripts with an entry that has no sourceMissing source.
A project entry with validators: {admit: some}Not all, none or a list of names.
A project entry whose binding is not in extensions.bindingsUnknown binding.
A project entry whose workflows.allowed names a workflow the catalogue lacksUnknown workflow.
A project entry whose workflows.default is not an allowed nameThe default is not allowed on the workspace.
A project entry whose image is not in runners.imagesUnknown image.
A project entry with areas: []An entry names at least one area.
A project entry with areas: ["src/**"]Not an area name. A path group is defined in the project config and named here.
retries: 3 at the top levelUnknown key without a namespace.

Next steps ​

The list names the pages to read next.

  • For what a workspace says about itself, see Project config.
  • For the validator contract and the three sources of a validator, see Validators.
  • For the workflow file a catalogue entry points to, see Workflow file.
  • For what another factory implements to use the same documents, see Conformance.

Sponsored by