Skip to main content
Every SDK exposes the same resources with the same method names, adjusted to the language’s conventions. Pick one, install it, and follow the shared setup before running the resource guide examples.

Python

Sync and async clients. pip install chronicle-sdk

TypeScript

Fully typed. npm install @chroniclelabs/sdk

JavaScript

Same package, no types needed. npm install @chroniclelabs/sdk

Go

Context-aware, typed params. go get github.com/chronicle-labs/chronicle-go

Rust

Async, typed, explicit errors. cargo add chronicle-sdk

Create a client

Set CHRONICLE_API_KEY and CHRONICLE_API_URL, or pass them in.
Python

Use the guide examples

Resource-guide snippets continue with the configured client above. Keep the IDs returned by one step for the next. Follow a language’s installation page for a complete first-evaluation program.
  • Python: run the snippets in one script or session. Import additional types from chronicle.types when needed.
  • TypeScript / JavaScript: use ES modules and top-level await; paste sequential steps into one module.
  • Go: put fragments inside a function returning error, with ctx context.Context. Import chronicle, plus standard packages used by that fragment (context, fmt, time, errors, os, or encoding/json). Pass a context with a deadline to wait methods.
  • Rust: put fragments inside an async function returning Result<(), Box<dyn std::error::Error>>; import chronicle_sdk::{Chronicle, types::*} and std::time::Duration. File export also uses serde_json.
A wait returning successfully means the resource reached a final state; check its status before using its results. The reliability guide lists the checks for worlds, task setup, scorers, and evaluations.

Resources

Naming

Shared behavior

  • Pages: list methods return a page with items, has_next_page(), and get_next_page(). Python adds auto_paging_iter(); TypeScript pages are async iterables.
  • Waiting: worlds.wait, twins.wait, and evaluations.wait poll until the resource reaches a final state.
  • Retries: two automatic retries on transient failures, honoring Retry-After. See Errors and retries.
  • Types: request and response models are exported (chronicle.types in Python, top-level in TypeScript, the chronicle package in Go, chronicle_sdk::types in Rust).