---
title: "Generate a Cernion Answer Dossier for external renderer consumption"
method: POST
path: "/api/copilot/answer-dossier"
tags: ["Personal Agent"]
---

# Generate a Cernion Answer Dossier for external renderer consumption

`POST /api/copilot/answer-dossier`

## Request

- Base URL: `https://api.cernion.de`
- URL: `https://api.cernion.de/api/copilot/answer-dossier`
- Auth: none declared

Produces a structured Markdown dossier containing domain reasoning, evidence, guardrails, and a final renderer instruction. External renderers (n8n, AnythingLLM) use only the dossierMarkdown to formulate prose answers — no domain knowledge required from the renderer. Maintains session state for multi-turn continuity.

## Query parameters

- `token` string

## Request body

- object
  - `question` string, required: User question or prompt.
  - `sessionId` string: Stable session identifier for multi-turn continuity. Generated and returned if omitted.
  - `domain` 'auto' | 'vnb' | 'vdmi' | 'znp' | 'grid-connection' | 'edm' | 'finance' | 'process' | 'redispatch'
  - `mode` 'answer_dossier' | 'answer_dossier_followup': answer_dossier_followup continues an existing session; include parentDossierId.
  - `maxEvidence` integer
  - `timeBudgetMs` integer: Total time budget in milliseconds for dossier generation.
  - `parentDossierId` string: For follow-up mode: dossierId of the previous dossier in this session.
  - `context` object: Optional channel, surface, tenant, or user context.
  - `dossierContract` 'rich' | 'slim': Default 'rich' preserves the existing full governance/policy dossier — no caller needs to change anything. 'slim' (#242) opts into a compact answer-payload contract (Question/Consulting Interpretation/Reasoning/Evidence/Answer Constraints/Possible Follow-Up/Renderer Instruction) for evidence-backed, non-process-risk dossiers; process-action or incomplete-evidence dossiers are always served as 'rich' regardless of this value. This is a backend contract only — existing callers (e.g. n8n flows) keep seeing 'rich' output until they explicitly set dossierContract: "slim".
  - `token` string: Optional Cernion MCP token for this request. Overrides CERNION_TOKEN when provided.

## Response `200`

Cernion Answer Dossier with structured metadata and Markdown content

- object
  - `success` boolean, required
  - `sessionId` string, required
  - `dossierId` string, required
  - `mode` 'answer_dossier' | 'answer_dossier_followup', required
  - `answerMode` 'clarification_needed' | 'management_brief' | 'evidence_collection' | 'process_check' | 'prepare_intent' | 'partial_async' | 'final_answer', required
  - `userContext` 'unknown' | 'mayor' | 'management' | 'target_grid_planning' | 'regulatory' | 'technical_operator' | 'process_action', required
  - `processStage` 'initial' | 'context_clarification' | 'evidence_collection' | 'synthesis' | 'async_pending' | 'intent_prepared' | 'action_requested' | 'completed', required
  - `confidence` 'low' | 'medium' | 'high', required
  - `completionState` 'completed' | 'partial' | 'async_pending', required
  - `dossierVersion` integer: Turn index within this session, starting at 1.
  - `parentDossierId` string, nullable
  - `latestDossierId` string
  - `followUp` object, nullable: Follow-up instructions for partial/async dossiers.
  - `priorConversationContext` object: Compact carry-forward context from previous Answer Dossier turns in the same session.
  - `knowledgeSpace` object: Authenticated tenant/session/conversation scope used to build the dossier. context.tenantId is audit context only and cannot override the authenticated tenant.
  - `timeBudget` object
  - `timeoutWarning` string, nullable
  - `dossierMarkdown` string, required
  - `clarificationQuestions` string[], required: Focused clarification questions derived from the same evidence-gap signals as dossierMarkdown's Missing Evidence section. Empty when no clarification is needed or when finalDossierRequested is true.
  - `finalDossierRequested` boolean, required: Deterministic detection of whether the user asked for a final answer instead of another clarification turn.
  - `finalDossierMarkdown` string, nullable: Renderer package variant that suppresses clarification-question instructions while still surfacing evidence gaps as caveats. Null unless finalDossierRequested is true.
  - `answerQuality` object, required: Evidence-first policy signals (#238) describing what the dossier instructions require, not a verified property of any rendered prose answer.
    - `usedRetrievedEvidence` boolean: Whether relevant tool/MCP evidence was retrieved for this turn.
    - `substantiveAnswerInstructed` boolean: Whether the dossier instructs an answer-first response (evidence-derived, final-mode, or flagged preliminary) rather than a defensive non-answer.
    - `defensiveNonAnswer` boolean: Complement of substantiveAnswerInstructed — true when the dossier falls back to asking for more before answering.
  - `dossierPlanning` object: Dossier-safe planning view of the Capability Broker recommendation. Planning only: no consequential actions are executed from this field.
  - `rendererSystemHint` string, required
  - `auditTrail` object

---

[API](https://skmtc.dev/cernion/apis/cernion-energy-tools-api.md) · [All operations](https://skmtc.dev/cernion/apis/cernion-energy-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cernion/apis/cernion-energy-tools-api/revisions/cdb94473b538?raw)
