Entities
Entities are typed Python objects that map to platform resources, letting you create, read, update, and delete data programmatically. They appear throughout the SDK—for example, synthesizers return a TestSet entity containing multiple Test entities.
Working with entities requires a configured API key.
Available Entities
| Entity | Description |
|---|---|
| Project | Top-level organizational unit for resources |
| Model | LLM configurations with provider, model name, and API key |
| Behavior | Expected behaviors with associated metrics |
| Category | Test categorization |
| Topic | Subject matter classification |
| Status | Entity state tracking |
| Test | Individual test cases with prompts |
| TestSet | Collections of tests for evaluation |
| TestRun | Execution records for test batches |
| TestResult | Individual test execution results |
| TestConfiguration | Settings for test execution |
| Endpoint | LLM applications and APIs tests run against |
Entity vs Collection Classes
Each entity comes as two classes:
- Entity classes (
TestSet,Test,Endpoint) represent a single record. Use them to create, update, and delete individual items. - Collection classes (
TestSets,Tests,Endpoints) provide query methods. Use them to fetch and search records.
All entities share the interface below. Per-entity pages document only what is specific to that entity.
Fetching entities
Retrieve records using the collection class:
pull(name=...) raises ValueError if the name matches no record or more than one.
Filtering results
Pass an OData filter string to all():
Creating and updating
Instantiate an entity and call push() to save it. push() creates a record when id is unset and updates it otherwise:
Refreshing from the platform
Call pull() on an instance to overwrite its fields with the current server state:
Checking existence and deleting
Exporting
Entities convert to dictionaries and single-row CSV files:
Next: create a project, register an endpoint, or build test sets.