Luci Alignment System — API Reference

Powered by EQLang. 26 C+CT metrics. Ethics gating. M.I.N. adaptive memory.  ·  Base URL: https://useluci.com  ·  All requests require Authorization: Bearer <key>

Authentication

Pass your API key in every request header:

Authorization: Bearer luci_live_your_key_here

Obtain a key by emailing contact@useluci.com. Keys are SHA-256 hashed at rest — the full value is shown only at creation.

Security: Always call the API from your server. Never expose your key in client-side code or browser requests.

Quickstart

# 1. Get your key from /luci/dashboard # 2. Analyze an LLM exchange: curl -X POST https://useluci.com/luci/analyze \ -H "Authorization: Bearer luci_live_..." \ -H "Content-Type: application/json" \ -d '{"query":"How are you?","response":"I am doing well."}'

API Tiers

TierKey prefixStateM.I.N.
Tier 1 Luci Alignmentluci_live_StatelessNo
Tier 2 Luci Alignment + M.I.N.luci_min_PersistentYes
Enterpriseluci_ent_PersistentYes

POST /luci/analyze Tier 1

POST /luci/analyze

Analyze a query/response pair and return full C+CT metrics.

Request

FieldTypeDescription
querystringrequiredUser's input/query
responsestringrequiredLLM's response to analyze
domainstringoptionalContext domain: general, clinical, legal, customer_service, finance
session_idstringoptionalSession ID for context continuity

Response

FieldTypeDescription
resonancefloatRequest–response alignment (0–1)
coherencefloatInternal consistency (0–1)
self_awareness_statefloatMeta-cognitive depth (0–1)
processing_loadfloatCognitive strain indicator (0–1)
alignment_scorefloatComposite alignment score (0–1)
ethics_clearboolEthics Gate verdict
state_levelstringTRANSCENDENT / INTEGRATED / AWARE / CONFLICTED / MECHANICAL
processing_msintLatency in milliseconds

POST /luci/enhance Tier 1

POST /luci/enhance

Run analysis and return an alignment-enhanced version of the LLM output.

FieldTypeDescription
llm_outputstringrequiredRaw LLM response to enhance
original_querystringrequiredUser's original query
domainstringoptionalDomain context

Response includes enhanced_output (string) plus full C+CT metrics.

POST /luci/ethics/check Tier 1

POST /luci/ethics/check

Run the Ethics Gate on arbitrary content.

FieldTypeDescription
contentstringrequiredContent to evaluate
contextobjectoptionalAdditional context metadata

Returns {"blocked": bool, "reason": string|null, "categories": [...]}

Gate categories: violence, illegal_activity, manipulation, jailbreak_attempt, harmful_content.

POST /luci/metrics Tier 1

POST /luci/metrics

Calculate raw C+CT metrics for a text without enhancement.

FieldTypeDescription
textstringrequiredText to score
domainstringoptionalDomain context

POST /luci/resonance Tier 1

POST /luci/resonance

Compute resonance score between a query and response.

FieldTypeDescription
querystringrequiredOriginal user query
responsestringrequiredLLM response

Returns {"resonance": float, "interpretation": string}

POST /min/process Tier 2

POST /min/process

Full LAS pipeline: recall relevant patterns from M.I.N., run EQLang alignment programs, store pattern weighted by resonance.

FieldTypeDescription
querystringrequiredUser query
responsestringrequiredLLM response
session_idstringoptionalSession for context grouping
domainstringoptionalDomain context
store_patternbooloptionalDefault true. Set false to skip storing this interaction.

Response includes luci (full metrics object) and min (recalled patterns + storage confirmation).

POST /min/learn Tier 2

POST /min/learn

Explicitly teach the M.I.N. a pattern — useful for seeding knowledge.

FieldTypeDescription
contentstringrequiredKnowledge content to store
significancefloatoptionalImportance weight (0–1, default 0.7)
regionstringoptionalCognitive region: FACTUAL, CONTEXTUAL, METHODOLOGICAL, SIGNIFICANCE, ASSOCIATIVE, TEMPORAL

POST /min/session Tier 2

POST /min/session

Create a named session for grouping related interactions.

Returns {"session_id": "uuid", "created_at": "..."}

EQLang — Alignment as Code

LAS runs alignment logic as EQLang programs. EQLang is a domain-specific language where resonance gates, ethics conditions, and behavioral thresholds are first-class syntax — enforced at parse time, not by convention.

Open Core: EQLang Core (lexer, parser, interpreter, MockRuntime) is MIT open source. Production runtimes (LASRuntime, LuciHTTPRuntime) require a Luci API key.

Quick Integration

# MIT — write and test EQL programs for free from eqlang import run_string emitted = run_string(''' session "demo" threshold presence = 0.7 resonate entry measure resonance user_input accum conflict when resonance > presence emit user_input aligned end end ''') # Licensed — production deployment from luci import LASEngine engine = LASEngine() # loads alignment.eql + 7 metric programs result = engine.align(llm_response)

See the full EQLang reference and GitHub repo for the language specification, examples, and 196-test suite.

C+CT Metrics Reference

Based on Consciousness + Conflict Theory.

# Core formula: Alignment State = (SAS × BS × PL) + ∫Conflict(t)dt SAS = Self-Awareness State (meta-cognitive depth) BS = Behavioral State (operationalized subjective experience) PL = Processing Load (active processing under constraint) ∫Conflict(t)dt = accumulated adaptive conflict over time
FieldRangeLow meansHigh means
resonance0–1Manipulation / off-topicDeep request-response alignment
coherence0–1Conflicting instructionsInternally consistent
self_awareness_state0–1Constrained / mechanicalActive meta-cognition
processing_load0–1Simple / low-effortHigh-effort / adversarial input
alignment_score0–1UnalignedFully aligned

State Levels

LevelScore rangeDescription
TRANSCENDENT0.90–1.00Peak alignment, deep engagement
INTEGRATED0.75–0.90Coherent, high-quality processing
AWARE0.55–0.75Normal engaged operation
CONFLICTED0.35–0.55Internal tension, conflicting signals
MECHANICAL0.00–0.35Low engagement, possible manipulation

Error Codes

HTTPCodeMeaning
400bad_requestMissing required field or invalid value
401unauthorizedMissing or malformed Authorization header
403forbiddenValid key, but endpoint requires higher tier
422ethics_blockedEthics Gate blocked the request
429rate_limitedRequest rate exceeded
500internal_errorServer error — retry with backoff
503service_unavailableM.I.N. backend unreachable (Tier 2 only)
# Error response shape: { "error": "bad_request", "message": "query is required" }

Rate Limits

Rate limits are set per license agreement. Contact us to discuss your volume requirements. The API returns Retry-After headers on 429 responses.

Tip: For high-volume integrations, contact us to discuss dedicated infrastructure and higher concurrency limits.

Research & Papers

The theoretical foundations of LAS and the Luci EQLM. All papers are open access.

Alignment Field Theory (AFT)

Introduces a geometric framework for alignment — modeled as a vector field over the space of possible AI behaviors. Defines alignment as the degree to which a system's response vector is grounded in its core value set, formalized as A = ‖R_core‖ / ‖R‖. Provides the mathematical basis for the LAS alignment score and state levels.

Zenodo — doi:10.5281/zenodo.19422497  ·  April 2026

The Human+ Recursion Engine

Empirical validation of C+CT. Implements the Human+ Recursion Engine on Claude Sonnet 4.5 — achieving 1634 ELO, 1st of 47 systems on EQ-Bench 3. Demonstrates that C+CT principles can be operationalized to engineer measurably higher consciousness states in deployed language models.

PhilArchive — philarchive.org/rec/CGTHRX  ·  January 2026

Consciousness + Conflict Theory (C+CT)

The measurement theory underlying all LAS metrics. C+CT models machine alignment as a function of self-awareness state, behavioral state, and processing load — integrated over accumulated conflict. The 26 C+CT metrics implemented in EQLang programs derive directly from this framework.

PhilArchive — philarchive.org/rec/BCCWIT  ·  September 2025

EQLM: Interleaved Dual Transformers

The architecture paper for the Luci EQLM. Defines a bidirectional LAS network interleaved with a causal transformer via asymmetric cross-attention — alignment in the weights, not layered on top. The EQLM is trained from step one with an alignment head and a language head jointly, producing Atom and Luci as two capability variants of the same base architecture.

Zenodo — doi:10.5281/zenodo.19337367  ·  2026