Enterprise · Agent integration

Agent integration

Use Enterprise routing to translate an agent question into an explicit retrieval request, then give the agent only authorized evidence and validate its citations.

Integration flow

StepOwnerContract
1. Establish scopeApplication authentication boundaryTenant, user, workspace, matter, document, and dataset permissions
2. RouteEnterprise query hookIntent, retrieval plan, evidence plan, filters, limit, confidence, review signal
3. RetrieveCoreCortex query APIAuthorized ranked Evidence with trace identity
4. Act or synthesizeApplication agentTool result or answer over supplied evidence
5. Validate and logApplication + Core contractsCitation membership, abstention, request ID, trace ID, model identity

Call the routing hook

shellCoreCortex Enterprise
cat > request-scope.json <<'JSON'
{"matter_id": "matter-482", "jurisdiction": "federal"}
JSON

corec query route \
  "What authorities does this matter cite?" \
  --dataset authorities \
  --filters request-scope.json \
  --output routing-decision.json

Read the routing decision

The decision is advisory and inspectable. The application intersects its filters with authenticated policy before retrieval. A routing confidence score never grants access and never acts as answer confidence.

jsonCoreCortex Enterprise
{
  "apiVersion": "corecortex.io/enterprise/v1alpha1",
  "kind": "QueryRoutingDecision",
  "request": {
    "query": "What authorities does this matter cite?",
    "intent": "relationship",
    "retrievalPlan": "bounded_graph_then_evidence",
    "scope": "matter",
    "evidencePlan": "graph_path",
    "filters": {"dataset": "authorities", "matter_id": "matter-482", "jurisdiction": "federal"},
    "limit": 10,
    "explain": false
  },
  "routing": {"signals": ["matter_filter", "relationship_language"], "confidence": 0.85, "requiresAgentReview": true}
}

Translate routing into the query API

CoreCortex applies tenant and record policy at candidate generation and again before evidence leaves the retrieval boundary. The response gives the agent evidence IDs, source identity, content hashes, processor revisions, and trace information.

httpCoreCortex Core
POST /v1/corpora/{corpusId}/query
Authorization: Bearer <token>
X-CoreC-Tenant-Id: <tenant-uuid>
Content-Type: application/json

{
  "query": "What authorities does this matter cite?",
  "retrievalPlan": "bounded_graph_then_evidence",
  "intent": "relationship",
  "filters": {"dataset": "authorities", "matter_id": "matter-482", "jurisdiction": "federal"},
  "limit": 10,
  "explain": true
}

Supported deterministic routing intents

IntentDetected signalSuggested strategy
lookupStructured identifier such as record key, external identifier, or version codeLexical single passage
exactQuoted or explicitly verbatim languageLexical single passage
comparisonCompare, difference, changed, versus, or timelineHybrid multi-passage
relationshipCites, connected, between, path, authority, treatment, or linkedBounded graph then source evidence
semanticDetopic natural-language questionHybrid evidence retrieval

Add customer-owned synthesis

Set responsePlan when the agent needs a generated answer. The Synthesis page defines the request, response, citation, and abstention rules; the Evaluation page defines the answer tests.

Agent safety invariants

  • Authentication and tenant context come from the trusted application boundary.
  • Routing hints can narrow scope and choose a strategy; they cannot expand permissions.
  • Relationship paths require agent review and resolve back to source evidence before use.
  • The agent receives stable evidence identities and cites only supplied fragments.
  • Expected-empty and unavailable-source cases lead to explicit abstention behavior.
  • Request, trace, configuration, index, model, and judgment identities remain available for replay and evaluation.