# Models: I

> API models starting with I.

## `IdentityProviderCollectionPage`

- `data: list[Annotated[kindgi.client.OidcIdentityProviderConfig | kindgi.client.SamlIdentityProviderConfig | kindgi.client.IdentityProviderConfigUnrecognized, <kindgi.client._open.OpenUnion object at 0x1086d7650>]]`
- `has_more: bool | None` (`hasMore` on the wire) (optional)
- `changes: Optional[Annotated[Union[Literal['tenant', 'operator'], str], <kindgi.client._open.OpenEnum object at 0x107c4bdd0>]]` (optional)

## `IdentityProviderConfigUnrecognized`

A `kind` this client doesn't know yet, from a newer runtime: the object as it came, every field kept.

- `kind: str`

## `IdentityProviderSignIn1`

What to give the identity provider so it can send people back: set by the deployment on what it returns, ignored on registration. OIDC: `redirectUri`. SAML: `spEntityId`, `acsUrl`, `spMetadataUrl`.

- `redirect_uri: AnyUrl` (`redirectUri` on the wire)

## `IdentityProviderSignIn2`

What to give the identity provider so it can send people back: set by the deployment on what it returns, ignored on registration. OIDC: `redirectUri`. SAML: `spEntityId`, `acsUrl`, `spMetadataUrl`.

- `sp_entity_id: str` (`spEntityId` on the wire)
- `acs_url: AnyUrl` (`acsUrl` on the wire)
- `sp_metadata_url: AnyUrl` (`spMetadataUrl` on the wire)

## `IdentityProviderSignInUrls`

What to give the identity provider so it can send people back, for a provider under this `providerId`: the same before it's registered, after, and after an unregister and a new registration, so the identity provider's side can be set up first. Not secrets: they're in every sign-in's browser redirects.

- `provider_id: str` (`providerId` on the wire)
- `kind: Union[Literal['oidc', 'saml'], str]`
- `sign_in: kindgi.client.IdentityProviderSignIn1 | kindgi.client.IdentityProviderSignIn2` (`signIn` on the wire)
- `registered: bool`

## `IdentitySessionCollectionPage`

- `data: list[kindgi.client.IdentitySessionSummary]`
- `has_more: bool` (`hasMore` on the wire)
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)

## `IdentitySessionSummary`

Wire-safe subset of a session. Excludes provider access-token / refresh-token — those never cross the wire, even to admins.

- `session_id: str` (`sessionId` on the wire)
- `user_id: str` (`userId` on the wire)
- `provider_id: str` (`providerId` on the wire)
- `created_at: AwareDatetime` (`createdAt` on the wire)
- `expires_at: AwareDatetime` (`expiresAt` on the wire)
- `scopes: list[str]`
- `revoked_at: AwareDatetime | None` (`revokedAt` on the wire) (optional)

## `IdpCertificate`

- `root: str`

## `ImproveBody`

Start an improvement pass.

- `agent_id: str` (`agentId` on the wire)
- `from_version: str | None` (`fromVersion` on the wire) (optional)
- `scope: kindgi.client.LiveScopeTenant | kindgi.client.LiveScopeOrg | kindgi.client.LiveScopeProject | kindgi.client.LiveScopeSegment | kindgi.client.LiveScopeUnrecognized`
- `suite_id: str` (`suiteId` on the wire)
- `tiers: list[Literal['settings', 'prompt']] | None` (optional)
- `model: kindgi.client.Model2 | None` (optional)
- `candidates: int | None` (optional)
- `class_weights: Optional[Literal['as-recorded', 'restricted-only']]` (`classWeights` on the wire) (optional)
- `objective: Optional[Literal['weightedYesShare', 'weightedPrecisionAtK']]` (optional)
- `budget: kindgi.client.Budget2 | None` (optional)

## `ImproveScheduleInput`

An improve schedule's `config.input`. Each fire counts the trusted "no" judgments (recorded under a restricted judge class) on the agent's runs in the scope since its last pass. When there are enough, across enough runs and judges, it starts a pass on a fresh test set of those runs; otherwise the fire is `skipped`, saying which count was short. A pass that proposes asks for the review at once.

- `tiers: list[Literal['settings', 'prompt']] | None` (optional)
- `objective: Optional[Literal['weightedYesShare', 'weightedPrecisionAtK']]` (optional)
- `class_weights: Optional[Literal['as-recorded', 'restricted-only']]` (`classWeights` on the wire) (optional)
- `model: kindgi.client.Model4 | None` (optional)
- `candidates: int | None` (optional)
- `budget: kindgi.client.Budget3 | None` (optional)
- `threshold: kindgi.client.Threshold | None` (optional)
- `monthly_cap_usd: float | None` (`monthlyCapUsd` on the wire) (optional)

## `ImproveScheduleTarget`

What an improve schedule works on: the agent, and the live scope its passes propose for and count judgments in.

- `agent_id: str` (`agentId` on the wire)
- `scope: kindgi.client.LiveScopeTenant | kindgi.client.LiveScopeOrg | kindgi.client.LiveScopeProject | kindgi.client.LiveScopeSegment | kindgi.client.LiveScopeUnrecognized`

## `ImprovementBudget`

- `max_cost_usd: float` (`maxCostUsd` on the wire)
- `max_candidates: int` (`maxCandidates` on the wire)

## `ImprovementPass`

An improvement pass: the runtime looking for better values for an agent version's tunable settings (`x-kindgi-tunable`) on a test set, within a budget. Its best candidate becomes an improvement proposal.

- `id: uuid.UUID`
- `agent_id: str` (`agentId` on the wire)
- `from_version: str` (`fromVersion` on the wire)
- `scope: kindgi.client.LiveScopeTenant | kindgi.client.LiveScopeOrg | kindgi.client.LiveScopeProject | kindgi.client.LiveScopeSegment | kindgi.client.LiveScopeUnrecognized`
- `suite_id: str` (`suiteId` on the wire)
- `tiers: list[Annotated[Union[Literal['prompt', 'settings'], str], <kindgi.client._open.OpenEnum object at 0x107c4bdd0>]]`
- `objective: Union[Literal['weightedYesShare', 'weightedPrecisionAtK'], str]`
- `class_weights: Optional[Annotated[Union[Literal['as-recorded', 'restricted-only'], str], <kindgi.client._open.OpenEnum object at 0x107c4bdd0>]]` (`classWeights` on the wire) (optional)
- `model: kindgi.client.Model1 | None` (optional)
- `candidates: int | None` (optional)
- `budget: kindgi.client.ImprovementBudget`
- `requested_by: str` (`requestedBy` on the wire)
- `status: Union[Literal['running', 'completed', 'failed', 'cancelled'], str]`
- `candidates_evaluated: int` (`candidatesEvaluated` on the wire)
- `cost_usd: str` (`costUsd` on the wire)
- `outcome: kindgi.client.ImprovementPassOutcome | None` (optional)
- `cancel_reason: str | None` (`cancelReason` on the wire) (optional)
- `comparisons: list[kindgi.client.Comparison1] | None` (optional)
- `trigger: kindgi.client.Trigger | None` (optional)
- `created_at: AwareDatetime` (`createdAt` on the wire)
- `updated_at: AwareDatetime` (`updatedAt` on the wire)
- `finished_at: AwareDatetime | None` (`finishedAt` on the wire) (optional)

## `ImprovementPassCollectionPage`

- `data: list[kindgi.client.ImprovementPass]`
- `has_more: bool` (`hasMore` on the wire)
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)

## `ImprovementPassFinishedEvent`

An improvement pass ended (`completed`, `failed` or `cancelled`): one a person started, or one an `improve` schedule did. Its outcome names the proposal it wrote, if it wrote one.

- `id: str`
- `type: Literal['improvement-pass.finished']`
- `created_at: AwareDatetime` (`createdAt` on the wire)
- `data: kindgi.client.Data1`

## `ImprovementPassOutcome`

What a finished pass found. `proposed`: its best candidate beat the current values on the test set's hold-out part, so it wrote an improvement proposal (`proposalId`) for a reviewer to decide. `nothing-found`: no candidate beat them by more than the noise, or within the budget (`reason`; `holdOut` has the best candidate's numbers when one got that far). `failed`: `message` says why.

- `kind: Union[Literal['proposed', 'nothing-found', 'failed'], str]`
- `proposal_id: uuid.UUID | None` (`proposalId` on the wire) (optional)
- `reason: str | None` (optional)
- `hold_out: kindgi.client.HoldOut | None` (`holdOut` on the wire) (optional)
- `message: str | None` (optional)

## `InstructionType`

- `root: str`

## `Instructions`

- `root: str`

## `InviteEmail`

Whether the invitation was emailed, and why not: `no-email` (the person has no email, so isn't invited), `not-requested` (`sendInvite: false`), `not-configured` (the deployment sends no email), `send-failed` (the mail server refused it or didn't answer), `capped` (the workspace, or the whole deployment, has sent as many invitation emails as it may in 24 hours). An invitation not emailed is still open: tell them yourself.

- `sent: bool`
- `reason: Optional[Annotated[Union[Literal['no-email', 'not-requested', 'not-configured', 'send-failed', 'capped'], str], <kindgi.client._open.OpenEnum object at 0x107c4bdd0>]]` (optional)

## `InviteRenewed`

The person, with their invitation's new expiry, and whether it was emailed.

- `user: kindgi.client.UserRecord`
- `invite_email: kindgi.client.InviteEmail` (`inviteEmail` on the wire)
