IntentLayerDocsDashboard ↗
Docs/Getting Started
Getting Started

What is IntentLayer?

Intent infrastructure that scores ambiguous requests before execution and turns misunderstandings into regression data.

IntentLayer sits around an AI agent call. Before execution it scores how much of request is missing. After execution it records or infers evidence that agent misunderstood. Those failures become clusters, reports, and tenant-scoped evals.

#Core loop

  1. Gate → score request across goal, output format, scope, and constraints.
  2. Clarify → return up to three questions when server policy says expected failure cost exceeds asking friction.
  3. Run → host application decides whether to observe, suggest questions, or use structured intent.
  4. Measure → record outcomes or let gate stream infer narrow signals.
  5. Learn → cluster redacted failures and export them as regression evals.

#Vocabulary

TermMeaning in current code
GatePOST /v1/gate plus scorer and regret-based question policy.
Intent-specStructured goal, output_format, scope, constraints, and missing_fields returned by gate.
TelemetryReported outcome events and inferred corrections, rephrases, or suspected abandons.
CorpusTenant-scoped failure events, semantic clusters, and eval exports. No cross-customer pooling exists.
ExperimentDeterministic session assignment to GATED or HOLDOUT, with unique failing-session rates and 95% interval.

#What current SDKs do

Python and TypeScript clients call gate and send outcome events. Gate failures return clear fallback so IntentLayer does not crash host path. Core mode value declares integration policy; core clients do not automatically block or rewrite requests.

import intentlayer

intentlayer.init(api_key="il_...", mode="suggest")
result = intentlayer.gate("cancel it", "session-42")
if result.questions:
    return result.questions

#Current limits

  • Heuristic scorer favors recall and over-asks on real ABCD dialogue.
  • LLM scorer is optional; current release evidence only verifies fallback behavior.
  • Regex PII redaction is best-effort, not compliance certification.
  • Cluster detail and session replay dashboard routes are mock-only.
  • Hosted deployment configs exist but production deployment is not release-verified.
Source truthREADME.mddocs/INTEGRATION_GUIDE.mdbackend/app/main.py