Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.complyhat.ai/llms.txt

Use this file to discover all available pages before exploring further.

Every ComplyHat organization has a private compliance wiki — a structured knowledge graph of pages that back every citation in your reports and model cards. When your host agent generates a report, it can reference wiki pages as sources for [EXTRACTED] findings. You can also query the wiki directly to surface relevant policies, test configurations, and prior findings during an audit conversation. The wiki is per-tenant: your pages are never shared across organizations.

Write or update a page

Call the wiki tool with mode: "write" to create a new page or update an existing one. Pages are identified by a slug matching ^[a-z0-9][a-z0-9/_-]{0,254}$.
{
  "tool": "wiki",
  "arguments": {
    "mode": "write",
    "slug": "policies/disparate-impact-threshold",
    "title": "Disparate impact threshold policy",
    "kind": "concept",
    "body": "# Disparate impact threshold policy\n\nOur organization applies the Four-Fifths Rule threshold of 0.80 for all hiring-related [[automated-employment-decision-tools]]. This threshold is consistent with 29 C.F.R. §1607.4(D) and NYC Local Law 144.",
    "actor_kind": "agent",
    "actor_id": "claude-code"
  }
}
The body is Markdown. Any [[double-bracket-links]] in the body are automatically extracted and recorded as wiki links to other pages in your organization. The response includes the assigned id, the version number, a count of links_extracted, and a log_id from the immutable audit log. To update a page and enforce optimistic concurrency, pass prev_version with the version number you last read:
{
  "tool": "wiki",
  "arguments": {
    "mode": "write",
    "slug": "policies/disparate-impact-threshold",
    "title": "Disparate impact threshold policy",
    "kind": "concept",
    "body": "Updated body text...",
    "prev_version": 1,
    "actor_kind": "agent",
    "actor_id": "claude-code"
  }
}
If another writer has updated the page since you read it, the call returns a 409 VERSION_CONFLICT error.

Search the wiki

The wiki tool supports two search modes: lexical (fast ILIKE on title and slug) and semantic (vector cosine similarity). Use mode: "search" with search_mode: "index" for quick keyword lookups — good for finding pages you already know exist.
{
  "tool": "wiki",
  "arguments": {
    "mode": "search",
    "query": "disparate impact threshold",
    "search_mode": "index",
    "k": 10
  }
}
Use search_mode: "semantic" to find conceptually related pages. You must supply the embedding yourself — ComplyHat never calls an embedding model internally. Pass a 1536-dimensional vector generated by your host’s embedding function.
{
  "tool": "wiki",
  "arguments": {
    "mode": "search",
    "query": "disparate impact threshold",
    "search_mode": "semantic",
    "embedding": [0.023, -0.011, 0.045],
    "k": 5
  }
}
Embeddings are host-supplied. Your host agent generates the vector and passes it as the embedding field — ComplyHat persists and queries it using pgvector but never generates embeddings itself. The same applies when writing a page: pass embedding on mode: "write" to make that page searchable semantically.
If semantic search is not available for your organization, the call returns a 501 SEMANTIC_UNAVAILABLE error. Fall back to search_mode: "index" for lexical search in that case.

Read and list pages

Read a single page by slug with mode: "read":
{
  "tool": "wiki",
  "arguments": {
    "mode": "read",
    "slug": "policies/disparate-impact-threshold"
  }
}
List all pages in your organization with mode: "list". You can filter by kind:
{
  "tool": "wiki",
  "arguments": {
    "mode": "list",
    "kind": "finding"
  }
}
Page kinds available: entity, concept, comparison, summary, overview, finding, log.

Draft a page from a compliance finding

When a bias test or report surfaces a finding that warrants documentation, use mode: "draft_from_finding" to generate a structured wiki page draft. Pass the finding ID and the tool that produced it:
{
  "tool": "wiki",
  "arguments": {
    "mode": "draft_from_finding",
    "finding_source": "bias_tests",
    "finding_id": "bt_01m5...",
    "target_slug": "findings/q2-2026-disparate-impact-hiring",
    "actor_kind": "agent",
    "actor_id": "claude-code"
  }
}
The draft is written to the wiki at target_slug with kind: "finding" and a [INFERRED]-tagged body. Review and edit it before treating it as a signed-off record.
Next steps: See all wiki tool modes — including link, lint, archive, and log_list — in the tool reference.