Coalex AI¶
Track, Protect, and Trust your AI agents.
Coalex is an AI governance platform for enterprises in regulated markets. We solve "AI Pilot Purgatory" — enterprises wasting billions on AI pilots that never reach production — by providing AI compliance and accuracy through real-time observability, automated quality assessment, and human-in-the-loop guardrails.
How It Works¶
graph LR
A[Your AI Agent] -->|SDK| B[Track]
B --> C[Protect]
C --> D[Trust]
style A fill:#6366f1,color:#fff
style B fill:#3b82f6,color:#fff
style C fill:#f59e0b,color:#fff
style D fill:#10b981,color:#fff
Track — Full Observability¶
Instrument your AI agent with a single line of code. Coalex captures every LLM call, retrieval step, and chain execution as OpenTelemetry spans — with zero manual instrumentation for 15+ LLM frameworks.
Protect — Real-Time Guardrails¶
Submit agent outputs for automated risk assessment. Low-risk outputs are auto-approved; high-risk outputs are escalated for human review. Quality metrics are computed when humans provide corrections.
Trust — Compliance & Audit¶
Generate compliance artifacts for EU AI Act, ISO 42001, and SOC 2. Maintain a complete audit trail of every agent decision, human review, and policy override.
Quick Start¶
import coalex
from openai import OpenAI
# 1. Connect to Coalex (endpoint defaults to Azure cloud)
coalex.register(
api_key="your-api-key",
service_name="my-agent",
)
# 2. Auto-instrument all LLM libraries
coalex.auto_instrument()
# 3. Declare your agent (optional, improves dashboard experience)
coalex.declare_agent(agent_id="support-bot", display_name="Support Bot")
# 4. Run your agent with full observability
client = OpenAI()
with coalex.coalex_context(agent_id="support-bot", request_id="req-123"):
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "What is my coverage?"}],
)
answer = response.choices[0].message.content
# 5. Evaluate the output
decision = coalex.evaluate(
request_id="req-123",
input={"question": "What is my coverage?"},
output={"answer": answer},
metrics={"answer": ["semantic_similarity", "f1"]},
)
# 6. Handle escalations
if decision.status == "escalated":
result = coalex.resolve(
escalation_id=decision.escalation_id,
decision="approved",
reviewer={"name": "Dr. Smith", "email": "dr.smith@hospital.org"},
)
import {
register, autoInstrument, declareAgent,
coalexContext, evaluate, resolve,
} from "@coalex-ai/sdk";
import OpenAI from "openai";
// 1. Connect to Coalex (endpoint defaults to Azure cloud)
register({
apiKey: "your-api-key",
serviceName: "my-agent",
});
// 2. Auto-instrument all LLM libraries
autoInstrument();
// 3. Declare your agent (optional, improves dashboard experience)
await declareAgent({ agentId: "support-bot", displayName: "Support Bot" });
// 4. Run your agent with full observability
const client = new OpenAI();
await coalexContext({ agentId: "support-bot", requestId: "req-123" }, async () => {
const response = await client.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: "What is my coverage?" }],
});
const answer = response.choices[0].message.content;
// 5. Evaluate the output
const decision = await evaluate({
requestId: "req-123",
input: { question: "What is my coverage?" },
output: { answer },
metrics: { answer: ["semantic_similarity", "f1"] },
});
// 6. Handle escalations
if (decision.status === "escalated") {
const result = await resolve({
escalationId: decision.escalationId!,
decision: "approved",
reviewer: { name: "Dr. Smith", email: "dr.smith@hospital.org" },
});
}
});
SDKs¶
| SDK | Version | Package |
|---|---|---|
| Python | v1.9.0 | coalex on PyPI |
| TypeScript | v1.7.0 | @coalex-ai/sdk on npm |
Both SDKs share the same API surface: register(), declare_agent(), coalex_context(), auto_instrument(), evaluate(), and resolve().
Supported Frameworks¶
Auto-instrumentation works out of the box with 15 LLM frameworks:
- OpenAI · Anthropic · Google Generative AI
- LangChain · LlamaIndex · CrewAI
- Haystack · Guardrails AI · Instructor
- Mistral AI · Amazon Bedrock · Groq
- LiteLLM · DSPy · Vertex AI
Platform Components¶
| Component | Description |
|---|---|
| Proxy | Reverse proxy that authenticates SDK calls and routes telemetry |
| Collector | OpenTelemetry Collector that receives and batches spans |
| Transformer | DuckDB-powered pipeline that enriches spans with cost, PII detection, and sustainability metrics |
| Dashboard | Admin interface for viewing traces, managing escalations, and configuring policies |
| Trust Center | Public-facing compliance portal for your customers |
Resources¶
- Installation — Install the SDK for your language
- Key Concepts — Understand agents, traces, escalations, and policies
- Examples — Runnable reference implementations
- Metrics Catalog — All supported metrics and their schemas
- Environment Variables — Configuration reference
- Changelog — Release history