Skip to main content

Application SDK

Planned

The SDKs are designed but not yet published. The inline verdict API they call — the same contract the local agent serves today — is stable.

For AI systems your organization builds, the Application SDK adds Lumen inline: inspect the prompt before the model call, inspect the completion before your application uses it, and record the finding either way.

Design

  • First wave of languages: Python, TypeScript/Node, Java, Go — the languages AI applications are actually written in, matching the OTel GenAI ecosystem.
  • One contract. The SDK calls the inline verdict API: the local agent's loopback endpoint when one is co-located, or the cloud inline API when there is none. Same request, same verdict shape, same policy semantics — see Local API for the contract as the agent serves it today.
  • Pre/post hooks. Wrap the model call: the prompt is evaluated before submission (a Redact rewrites it, a Block raises a policy error your code can handle), and the response is evaluated before delivery.
  • Streaming. The SDK relays streamed completions through the same hold-and-release window the agent uses, so a secret split across chunks never reaches your user.
# Sketch of the Python surface
from lumen import Lumen

lumen = Lumen(policy="pol_appdev_std")

with lumen.interaction(user=request.user) as ix:
prompt = ix.inspect_prompt(user_input) # redacted or raises PolicyBlocked
completion = model.generate(prompt)
answer = ix.inspect_response(completion) # same, for the output

Registration, tenant identity and policy assignment work like every other collector: the SDK is registered in the console and carries a tenant-scoped API key.