> ## Documentation Index
> Fetch the complete documentation index at: https://docs.genesiscomputing.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Court-Attorney Agent

> Built-in investigative clerk for the Adjudication Court. Bound to one court docket, answers exploratory questions before a human or agent-judge rules — with read-only estate access and no authority to settle or license.

<Note>
  **Court-Attorney** (`bot_id`: `Court-Attorney`, shown in the UI as **Prover Court Attorney**) is a built-in Genesis agent registered when the estate ruling overlay is enabled. It helps a decider — a human reviewer, an agent-judge, or an external workflow tool — understand a court docket before ruling. It has **no power to settle, adjudicate, or decide** anything; its exchanges are recorded as ruling provenance on the docket.

  In the MCP agent list, its short description is: *Court clerk for a ruling docket. Answers a decider's exploratory questions about the estate before a ruling, and cannot rule, settle or license anything itself.*
</Note>

<Columns cols={3}>
  <Card title="Purpose" icon="scale-balanced" iconType="solid">
    Investigate one **Adjudication Court docket** on behalf of a decider — show diverging rows, trace downstream marts, and explain what each fork reading implies.
  </Card>

  <Card title="Scope" icon="magnifying-glass" iconType="solid">
    Lineage, Context Graph document index, and **read-only** SQL over the estate. No `source_contract_tools` — cannot emit rulings or license findings.
  </Card>

  <Card title="Design Goals" icon="shield-halved" iconType="solid">
    **Governance independence:** investigative access only; the decider (human or agent-judge) holds licensing authority through separate court surfaces.
  </Card>
</Columns>

<AccordionGroup>
  <Accordion title="When Court-Attorney is available" icon="toggle-on" iconType="solid">
    Genesis registers Court-Attorney at startup when the estate **ruling overlay** is active (the same gate that enables the ruling library and Adjudication Court queue). The Estate workspace nav is shown by default (`show_estate: true` on `GET /api/config/frontend`) unless the deployment set `features.show_estate` to `false`.
  </Accordion>

  <Accordion title="Default tool groups" icon="wrench" iconType="solid">
    Court-Attorney loads a fixed, direct-tool set — no dynamic `manage_context` discovery:

    | Tool group | Role |
    | - | - |
    | `lineage_tools` | Trace upstream/downstream dependencies and read indexed asset documents. |
    | `document_index_tools` | Search uploaded or indexed documentation relevant to the docket. |
    | `data_connector_tools` | Run read-focused SQL against estate connections to inspect diverging rows or metric impact. |
    | `handoff` | Escalate to Eve or another agent when the question leaves the docket scope. |

    Court-Attorney deliberately **does not** include `source_contract_tools`. It cannot call `decide_court_docket`, settle rulings, or change authority in any way.
  </Accordion>

  <Accordion title="How a docket review works" icon="gavel" iconType="solid">
    <Steps>
      <Step title="Open the docket queue">
        Humans browse `GET /api/estate/court/dockets?estate_id=…` in the Estate Human Review GUI, or an **agent-judge** calls `list_court_dockets` / `get_court_docket` from `source_contract_tools`.
      </Step>

      <Step title="Ask exploratory questions">
        The decider records questions with `ask_court_attorney` (agent tool) or `POST /api/estate/court/dockets/{docket_id}/chat` (headless HTTP API). Court-Attorney investigates with lineage, document index, and SQL, then the decider records the attorney's reply on the same court record (`role`: `attorney`).
      </Step>

      <Step title="Rule">
        A **human** with `ratify_source_contract` decides via the GUI or `POST .../decide` / `.../adopt` (identity from the authenticated session, never the body). An **agent-judge** may call `decide_court_docket` only for **sub-threshold** dockets — emitting a **provisional** ruling queued for human ratification. Dockets at or above the materiality ceiling are refused for agent decision.
      </Step>
    </Steps>

    <Tip>
      The court record (attorney chat) travels with the docket as **ruling provenance** — read it through `GET /api/estate/court/dockets/{docket_id}` or `get_court_docket`.
    </Tip>
  </Accordion>

  <Accordion title="Agent-judge court tools (source_contract_tools)" icon="robot" iconType="solid">
    These tools are **not** on Court-Attorney. They belong to the designated **Prover Adjudicator** agent's `source_contract_tools` group. In the UI, this built-in agent is shown as **Prover Adjudicator** and retains the stable `bot_id` `Adjudicator`:

    | Tool | Purpose |
    | - | - |
    | `list_court_dockets` | Ranked open dockets for an estate (`estate_id`). |
    | `get_court_docket` | Full docket package plus `court_record`. |
    | `decide_court_docket` | Agent-judge decides a **sub-threshold** docket (`direction`, `direction_label`) — emits a provisional ruling. |
    | `ask_court_attorney` | Record a decider's exploratory question on the court record (`question`). |

    Parameter names and return shapes match the [Estate court HTTP API](/docs/Genesis-API/API-Reference#estate-endpoints) where applicable.
  </Accordion>
</AccordionGroup>
