Reference clients
Use these small examples to understand how an application can record datasets, send events, and handle decisions. Adapt the code to your application or implement the documented formats yourself. They are reference implementations, not finished SDK products, and are not published to package registries.
Browse the reference repository · Browse the product repository
Both repositories currently require access. Keep the product and examples as sibling folders if you use the paths in the recording guide. The examples build independently of the product.
git clone https://github.com/georgi2005atanasov/pragma_change_sdks.git
cd pragma_change_sdks
Choose an example
| Language | Local source installation from your application | Guide |
|---|---|---|
| Node.js / TypeScript, Node 20+ | npm install /absolute/path/to/pragma_change_sdks/node | Node.js source guide |
| Python 3.10+ | python3 -m pip install /absolute/path/to/pragma_change_sdks/python | Python source guide |
| C# / .NET 8 | dotnet add reference /absolute/path/to/pragma_change_sdks/csharp/PragmaChange.csproj | C# source guide |
| Rust, validated with 1.98 | Add pragmachange = { path = "/absolute/path/to/pragma_change_sdks/rust" } under [dependencies] | Rust source guide |
C# and .NET refer to the same implementation. Rust bundles the portable contract types; it does not require the behavior training service to build.
Record now, upload later
The synchronous DatasetRecorder writes records.jsonl and manifest.json to a new private directory. It does not contact a service. Download saved pipeline templates for request recordings, or register an application for behavior recordings. Select explicit fields, capture representative data, and finalize the recorder before uploading.
The offline recording guide includes runnable examples for all four languages, bindings, file limits, privacy, and upload steps. You can also generate ordinary request JSONL or feature CSV yourself. Using the reference recorder is optional.
Integrate live behavior
Use the behavior client's record and evaluate operations only on your application server. Keep ingestion tokens private. Use authenticated actor/session identities, evaluate after normal authorization and before the operation, handle check and block, then record the confirmed outcome with a new event ID correlated to the attempt.
Streaming is bounded and best effort. Inspect dropped counters and close clients on shutdown. A service outage returns check; implement your verification policy. New applications default to shadow mode. Offline recording and streaming are independent, and importing overlapping copies can bias training.
Set up the behavior service · Read upload formats · API contracts