DEVELOPER DOCS

SDK

Configuration reference

On this page

Environment variables

VariableUsed byDescription
OPEXIA_API_KEYSDK, CLIWorkspace API key
OPEXIA_TRANSPORTSDKcollector or direct; the transport= argument wins
OPEXIA_INGEST_URLTS bootstrapIngest base URL
OPEXIA_PROJECT_IDTS bootstrapProject name → service.name
OPEXIA_ORG_ID / OPEXIA_WORKSPACE_IDyour own bootstrapPassed into init()
CREWAI_DISABLE_TELEMETRYCrewAI adapterSet to true before importing CrewAI
PXCORE_MODELpxcoreActive model for calibration gating

OPEXIA_ORG_ID and OPEXIA_WORKSPACE_ID are read by your bootstrap code, not by init() itself — init() takes them as explicit arguments.

Files the SDK reads or writes

PathPurpose
.opexia-wal/spans.jsonlWrite-ahead log; replayed on next init()
.opexia/shipcheck.ymlShip Check policy
.opexia/agentmap.lockCommitted agent-topology lockfile from opexia audit

Add .opexia-wal/ to .gitignore. Commit .opexia/agentmap.lock — its whole value is being diffable in review.


Troubleshooting

SymptomCauseFix
init() raises at startupBad collector endpoint or WAL pathFix the config, or set fail_open=True
No spans, no errorsProtobuf OTLPUse the http/json exporter; collectors need encoding: json
202 on ingest but no tracesSpans dead-letteringCheck the four rules and ingestion health
A whole span vanishesNested object in opexia.decision / opexia.sourcesjson.dumps them — they are JSON strings
A whole span vanishesUndocumented opexia.* keyThe schema is extra="forbid"; remove it
Prompts page has thousands of one-call rowsquery_text joined without role boundariesUse renderPrompt() / the role:\ncontent join
PermissionError (WinError 32) on WindowsWAL renamed with an open handleFixed in current versions — upgrade opexia-trace
Spans lost on exitProcess died before the batch flushedCall force_flush() before exit
No end_user data on the dashboardopexia.end_user never setPass end_user= or call record_end_user()
Empty engine panels, traces presentEngine off, or no LLM credentialCheck engine settings and LLM credentials
No prompt/completion text storedcapture_text is off (the default)See capture text

See also