TrueFoundry Python SDK for convenient interaction with TrueFoundry API.
Repo truefoundry/truefoundry-python-sdk, read from GitHub 1 d ago. truefoundry has not joined Take My Repo.
client.personal_access_tokens.get().virtual_accounts.regenerate_token() now accepts grace_period_in_minutes instead of grace_period_in_days.personal_access_tokens.create_for_user() and virtual_accounts.exists().Full Changelog: v0.4.0...v0.6.0
Full Changelog: v0.4.0...v0.6.0-rc.1
client.personal_access_tokens.get().virtual_accounts.regenerate_token() now accepts grace_period_in_minutes instead of grace_period_in_days.personal_access_tokens.create_for_user() and virtual_accounts.exists().Full Changelog: v0.4.0...v0.5.0-rc.1
| Method | Notes |
|---|---|
client.internal.ml.apply(manifest) |
removed (returned ApplyMlEntityResponse) |
client.internal.ml.delete(manifest) |
removed |
Only the
client.internal.mlsub-client was removed.client.users.*(including
get_teams/get_resources/get_permissions),client.internal.users, and
client.internal.ai_gatewayare all still present in this release.
client.teams.list() — the type filter ("team" / "sso-team", typed
TeamsListRequestType) was removed. role and attributes were added (see New Features).
| Method | Param | Old | New |
|---|---|---|---|
users.update_roles() |
resource_type |
Optional[str] |
Optional[ResourceType] |
applications.list() |
application_type |
Optional[str] |
Optional[ApplicationType] |
logs.get() |
start_ts |
Optional[int] |
Optional[str] |
logs.get() |
end_ts |
Optional[int] |
Optional[str] |
# Before client.logs.get(..., start_ts=1779262323000000000, end_ts=1779262333000000000) # After client.logs.get(..., start_ts="1779262323000000000", end_ts="1779262333000000000")
| Method | Old Return | New Return |
|---|---|---|
clusters.delete() |
ClustersDeleteResponse |
DeleteClusterResponse |
workspaces.delete() |
WorkspacesDeleteResponse |
DeleteWorkspaceResponse |
These exported classes no longer exist (import will fail):
| Removed Type | Notes |
|---|---|
ApplyMlEntityResponse, ApplyMlEntityResponseData |
internal.ml removed |
BaseArtifactVersionManifest |
|
HttpValidationError, ValidationError, ValidationErrorLocItem |
error models |
LogsFilterQuery, LogsFilterQueryType |
log filtering now a JSON string |
ChatPromptManifestMessagesItem |
renamed → ChatMessageTurn (§6) |
ClustersDeleteResponse, WorkspacesDeleteResponse |
renamed (§6 / §4) |
TeamsListRequestType |
teams.list() type filter removed |
PangeaGuardrailConfig, PangeaGuardrailConfigConfig, PangeaGuardrailConfigOperation, PangeaKeyAuth, PangeaGuardType |
renamed → CrowdStrike AIDR (§6) |
TrueFoundryAgentManifestResponseFormat, TrueFoundryAgentManifestModelParams |
renamed (§6) |
TrueFoundryAgentManifestModelParamsReasoningEffort, TrueFoundryAgentManifestSandbox, TrueFoundryAgentMcpTool |
agent manifest restructured |
Importing/type-referencing the old names breaks. Wire values are unchanged unless noted.
| Old Name | New Name |
|---|---|
ChatPromptManifestMessagesItem |
ChatMessageTurn |
TrueFoundryAgentManifestResponseFormat |
TrueFoundryAgentResponseFormat |
TrueFoundryAgentManifestModelParams |
TrueFoundryAgentModelParams |
ClustersDeleteResponse |
DeleteClusterResponse |
WorkspacesDeleteResponse |
DeleteWorkspaceResponse |
Pangea guardrail → CrowdStrike AIDR (full rebrand):
| Old | New |
|---|---|
PangeaGuardrailConfig |
CrowdStrikeAidrGuardrailConfig |
PangeaGuardrailConfigConfig |
CrowdStrikeAidrGuardrailConfigConfig |
PangeaGuardrailConfigOperation |
CrowdStrikeAidrGuardrailConfigOperation |
PangeaKeyAuth |
CrowdStrikeAidrKeyAuth |
discriminator "integration/guardrail-config/pangea" |
"integration/guardrail-config/crowdstrike-aidr" |
The Pangea rename is breaking on the wire — persisted configs with
type: integration/guardrail-config/pangeawill no longer deserialize.
| Type | Removed Fields |
|---|---|
ArtifactVersion, ModelVersion, PromptVersion, InternalArtifactVersion, InternalModelVersion |
version_alias |
BaseArtifactVersion |
id, fqn, created_at, updated_at, created_by_subject, ml_repo_id, manifest (now the manifest base: name/metadata/ml_repo/version) |
AgentSkill |
description, tags, examples, input_modes, output_modes (moved to A2AAgentSkill; AgentSkill is now an artifact-style entity) |
TrueFoundryAgentManifest |
instruction, iteration_limit, model_params, sandbox |
TrueFoundryAgentMcpServer |
deferred, tools |
TrueFoundryAgentSkill |
preload_skill_md |
UserMetadata |
is_primary_sso |
Now required (was optional):
| Type | Field | Old | New |
|---|---|---|---|
ArtifactManifest |
step |
Optional[int] |
int (default 0) |
ModelManifest |
step |
Optional[int] |
int (default 0) |
Now optional (was required):
| Type | Field | Old | New |
|---|---|---|---|
AzureOpenAiModel |
deployment_type |
AzureOpenAiModelDeploymentType |
Optional[...] |
OpenaiProviderAccount |
auth_data |
OpenaiApiKeyAuth |
Optional[OpenaiApiKeyAuth] |
Environment |
priority |
float |
Optional[float] |
Referenced type changed:
| Type | Field | Old | New |
|---|---|---|---|
Artifact |
type |
ArtifactType |
Optional[Literal["artifact"]] |
Artifact |
latest_version |
Optional[BaseArtifactVersion] |
Optional[ArtifactVersion] |
ChatPromptManifest |
messages |
List[ChatPromptManifestMessagesItem] |
List[ChatMessageTurn] |
Deployment |
application |
Optional[Application] |
Optional[ApplicationSummary] |
BitbucketProviderAccount |
integrations |
List[BitbucketIntegration] |
List[BitbucketIntegrations] |
PromptSource |
skills |
List[AgentSkill] |
List[A2AAgentSkill] |
PersonalAccessTokenManifest |
owned_by (ownedBy) |
Optional[OwnedBy] |
Optional[VirtualAccountOwnedBy] |
TrueFoundryAgentManifest |
model |
str |
TrueFoundryAgentModel |
TrueFoundryAgentManifest |
response_format |
Optional[TrueFoundryAgentManifestResponseFormat] |
Optional[TrueFoundryAgentResponseFormat] |
| Removed Enum | Members it had |
|---|---|
LogsFilterQueryType |
REGEX, SUBSTRING, IGNORE_CASE_SUBSTRING |
TeamsListRequestType |
team, sso-team |
TrueFoundryAgentManifestModelParamsReasoningEffort |
NONE, MINIMAL, LOW, MEDIUM, HIGH |
PangeaGuardType |
TEXT_GUARD, PII |
| Client | Methods |
|---|---|
client.agents |
list, create_or_update, get, delete |
client.agent_versions |
list |
client.runs |
create, get, update, delete, search, get_metric_history, list_metric_history, log_metric, log_parameter, set_tag, delete_tag, log_batch |
client.teams.list_members(id, *, limit=100, offset=0, filter=None) → SyncPager[TeamSubjectRow, ListTeamMembersResponse]client.teams.list_managers(id, *, limit=100, offset=0, filter=None) → SyncPager[TeamSubjectRow, ListTeamManagersResponse]client.internal.ai_gateway.get_budget_usage(...)| Method | New Param | Type |
|---|---|---|
workspaces.list(), ml_repos.list(), clusters.list(), clusters.get_addons(), secret_groups.list(), teams.list() |
attributes |
Optional[Union[str, Sequence[str]]] |
teams.list() |
role |
Optional[Literal["manager"]] |
artifact_versions.list() |
artifact_types |
Optional[Sequence[ArtifactType]] |
secret_groups.delete() |
force_delete |
Optional[bool] |
personal_access_tokens.create() |
team_name, token_type |
str, CreatePersonalAccessTokenRequestTokenType |
personal_access_tokens.get() |
team_name |
Optional[str] |
Agent, AgentVersion, Run, RunData, RunInfo, RunParam, RunTag,MetricCollection, A2AAgentSkill, ChatMessageTurn, and the TrueFoundryAgentConfigTrueFoundryAgentModel, TrueFoundryAgentModelParams, TrueFoundryAgentResponseFormat.BudgetV2* family, TeamBudgetConfig, TenantBudgetConfig (+ mode enums).MsTeams*).CrowdStrikeAidrGuardrailConfig (replaces Pangea), TfyMetadataGuardrailConfig.AgentIdentityManifest/Config, IdentityProviderBackedIdentity,TruefoundryBackedIdentity, JwtTokenType, token-type enums on PAT / virtual-account manifests.SnowflakeConfig, SnowflakeSql,NativeSnowflakeFlyteTaskTemplate, TruefoundryFlyteTaskTemplate.ApplicationSummary, ResourceType, SessionActor, InternalServerError,McpToolAnnotations, GuardrailSettings, TfyManagedMcpServerManifest.int → float widenings (accept both; only matters for strict type-checkers):
Artifact/Model/Prompt.run_steps items, Metric.step/timestamp, FileInfo.file_size,
InternalArtifactVersion/InternalModelVersion.artifact_size, CreateMultiPartUploadRequest.num_parts,
ListFilesRequest.limit.
Widened optionality: ChatPromptManifest.variables → Dict[str, Optional[str]];
MlRepo.artifact_type_counts values → Optional[int].
Docs only: description strings were added to many existing fields (Team, VirtualAccount,
Workspace, Deployment, Application, GatewayConfiguration, …) — no type or optionality change.
Preserved (no longer breaking vs. earlier drafts): MimeType, Operation, InferMethodName,
LibraryName, Parameters, ParametersStop keep their names; Model.type/Prompt.type stay
Optional[Literal[...]]; ModelVersion.deployable stays Optional[bool]; ml_repos.delete()
still returns EmptyResponse; the *_versions.list() version filters stay Optional[int];
ArtifactVersion/InternalArtifactVersion.manifest stay required (ArtifactManifest);
artifacts.create_or_update() manifest stays ArtifactManifest (endpoint narrowed to artifact
manifests only — models/agent-skills use their own create_or_update).
| Method | Notes |
|---|---|
client.internal.ml.apply(manifest) |
removed (returned ApplyMlEntityResponse) |
client.internal.ml.delete(manifest) |
removed |
Only the
client.internal.mlsub-client was removed.client.users.*(including
get_teams/get_resources/get_permissions),client.internal.users, and
client.internal.ai_gatewayare all still present in this release.
client.teams.list() — the type filter ("team" / "sso-team", typed
TeamsListRequestType) was removed. role and attributes were added (see New Features).
| Method | Param | Old | New |
|---|---|---|---|
users.update_roles() |
resource_type |
Optional[str] |
Optional[ResourceType] |
applications.list() |
application_type |
Optional[str] |
Optional[ApplicationType] |
logs.get() |
start_ts |
Optional[int] |
Optional[str] |
logs.get() |
end_ts |
Optional[int] |
Optional[str] |
# Before client.logs.get(..., start_ts=1779262323000000000, end_ts=1779262333000000000) # After client.logs.get(..., start_ts="1779262323000000000", end_ts="1779262333000000000")
| Method | Old Return | New Return |
|---|---|---|
clusters.delete() |
ClustersDeleteResponse |
DeleteClusterResponse |
workspaces.delete() |
WorkspacesDeleteResponse |
DeleteWorkspaceResponse |
These exported classes no longer exist (import will fail):
| Removed Type | Notes |
|---|---|
ApplyMlEntityResponse, ApplyMlEntityResponseData |
internal.ml removed |
BaseArtifactVersionManifest |
|
HttpValidationError, ValidationError, ValidationErrorLocItem |
error models |
LogsFilterQuery, LogsFilterQueryType |
log filtering now a JSON string |
ChatPromptManifestMessagesItem |
renamed → ChatMessageTurn (§6) |
ClustersDeleteResponse, WorkspacesDeleteResponse |
renamed (§6 / §4) |
TeamsListRequestType |
teams.list() type filter removed |
PangeaGuardrailConfig, PangeaGuardrailConfigConfig, PangeaGuardrailConfigOperation, PangeaKeyAuth, PangeaGuardType |
renamed → CrowdStrike AIDR (§6) |
TrueFoundryAgentManifestResponseFormat, TrueFoundryAgentManifestModelParams |
renamed (§6) |
TrueFoundryAgentManifestModelParamsReasoningEffort, TrueFoundryAgentManifestSandbox, TrueFoundryAgentMcpTool |
agent manifest restructured |
Importing/type-referencing the old names breaks. Wire values are unchanged unless noted.
| Old Name | New Name |
|---|---|
ChatPromptManifestMessagesItem |
ChatMessageTurn |
TrueFoundryAgentManifestResponseFormat |
TrueFoundryAgentResponseFormat |
TrueFoundryAgentManifestModelParams |
TrueFoundryAgentModelParams |
ClustersDeleteResponse |
DeleteClusterResponse |
WorkspacesDeleteResponse |
DeleteWorkspaceResponse |
Pangea guardrail → CrowdStrike AIDR (full rebrand):
| Old | New |
|---|---|
PangeaGuardrailConfig |
CrowdStrikeAidrGuardrailConfig |
PangeaGuardrailConfigConfig |
CrowdStrikeAidrGuardrailConfigConfig |
PangeaGuardrailConfigOperation |
CrowdStrikeAidrGuardrailConfigOperation |
PangeaKeyAuth |
CrowdStrikeAidrKeyAuth |
discriminator "integration/guardrail-config/pangea" |
"integration/guardrail-config/crowdstrike-aidr" |
The Pangea rename is breaking on the wire — persisted configs with
type: integration/guardrail-config/pangeawill no longer deserialize.
| Type | Removed Fields |
|---|---|
ArtifactVersion, ModelVersion, PromptVersion, InternalArtifactVersion, InternalModelVersion |
version_alias |
BaseArtifactVersion |
id, fqn, created_at, updated_at, created_by_subject, ml_repo_id, manifest (now the manifest base: name/metadata/ml_repo/version) |
AgentSkill |
description, tags, examples, input_modes, output_modes (moved to A2AAgentSkill; AgentSkill is now an artifact-style entity) |
TrueFoundryAgentManifest |
instruction, iteration_limit, model_params, sandbox |
TrueFoundryAgentMcpServer |
deferred, tools |
TrueFoundryAgentSkill |
preload_skill_md |
UserMetadata |
is_primary_sso |
Now required (was optional):
| Type | Field | Old | New |
|---|---|---|---|
ArtifactManifest |
step |
Optional[int] |
int (default 0) |
ModelManifest |
step |
Optional[int] |
int (default 0) |
Now optional (was required):
| Type | Field | Old | New |
|---|---|---|---|
AzureOpenAiModel |
deployment_type |
AzureOpenAiModelDeploymentType |
Optional[...] |
OpenaiProviderAccount |
auth_data |
OpenaiApiKeyAuth |
Optional[OpenaiApiKeyAuth] |
Environment |
priority |
float |
Optional[float] |
Referenced type changed:
| Type | Field | Old | New |
|---|---|---|---|
Artifact |
type |
ArtifactType |
Optional[Literal["artifact"]] |
Artifact |
latest_version |
Optional[BaseArtifactVersion] |
Optional[ArtifactVersion] |
ChatPromptManifest |
messages |
List[ChatPromptManifestMessagesItem] |
List[ChatMessageTurn] |
Deployment |
application |
Optional[Application] |
Optional[ApplicationSummary] |
BitbucketProviderAccount |
integrations |
List[BitbucketIntegration] |
List[BitbucketIntegrations] |
PromptSource |
skills |
List[AgentSkill] |
List[A2AAgentSkill] |
PersonalAccessTokenManifest |
owned_by (ownedBy) |
Optional[OwnedBy] |
Optional[VirtualAccountOwnedBy] |
TrueFoundryAgentManifest |
model |
str |
TrueFoundryAgentModel |
TrueFoundryAgentManifest |
response_format |
Optional[TrueFoundryAgentManifestResponseFormat] |
Optional[TrueFoundryAgentResponseFormat] |
| Removed Enum | Members it had |
|---|---|
LogsFilterQueryType |
REGEX, SUBSTRING, IGNORE_CASE_SUBSTRING |
TeamsListRequestType |
team, sso-team |
TrueFoundryAgentManifestModelParamsReasoningEffort |
NONE, MINIMAL, LOW, MEDIUM, HIGH |
PangeaGuardType |
TEXT_GUARD, PII |
| Client | Methods |
|---|---|
client.agents |
list, create_or_update, get, delete |
client.agent_versions |
list |
client.runs |
create, get, update, delete, search, get_metric_history, list_metric_history, log_metric, log_parameter, set_tag, delete_tag, log_batch |
client.teams.list_members(id, *, limit=100, offset=0, filter=None) → SyncPager[TeamSubjectRow, ListTeamMembersResponse]client.teams.list_managers(id, *, limit=100, offset=0, filter=None) → SyncPager[TeamSubjectRow, ListTeamManagersResponse]client.internal.ai_gateway.get_budget_usage(...)| Method | New Param | Type |
|---|---|---|
workspaces.list(), ml_repos.list(), clusters.list(), clusters.get_addons(), secret_groups.list(), teams.list() |
attributes |
Optional[Union[str, Sequence[str]]] |
teams.list() |
role |
Optional[Literal["manager"]] |
artifact_versions.list() |
artifact_types |
Optional[Sequence[ArtifactType]] |
secret_groups.delete() |
force_delete |
Optional[bool] |
personal_access_tokens.create() |
team_name, token_type |
str, CreatePersonalAccessTokenRequestTokenType |
personal_access_tokens.get() |
team_name |
Optional[str] |
Agent, AgentVersion, Run, RunData, RunInfo, RunParam, RunTag,MetricCollection, A2AAgentSkill, ChatMessageTurn, and the TrueFoundryAgentConfigTrueFoundryAgentModel, TrueFoundryAgentModelParams, TrueFoundryAgentResponseFormat.BudgetV2* family, TeamBudgetConfig, TenantBudgetConfig (+ mode enums).MsTeams*).CrowdStrikeAidrGuardrailConfig (replaces Pangea), TfyMetadataGuardrailConfig.AgentIdentityManifest/Config, IdentityProviderBackedIdentity,TruefoundryBackedIdentity, JwtTokenType, token-type enums on PAT / virtual-account manifests.SnowflakeConfig, SnowflakeSql,NativeSnowflakeFlyteTaskTemplate, TruefoundryFlyteTaskTemplate.ApplicationSummary, ResourceType, SessionActor, InternalServerError,McpToolAnnotations, GuardrailSettings, TfyManagedMcpServerManifest.int → float widenings (accept both; only matters for strict type-checkers):
Artifact/Model/Prompt.run_steps items, Metric.step/timestamp, FileInfo.file_size,
InternalArtifactVersion/InternalModelVersion.artifact_size, CreateMultiPartUploadRequest.num_parts,
ListFilesRequest.limit.
Widened optionality: ChatPromptManifest.variables → Dict[str, Optional[str]];
MlRepo.artifact_type_counts values → Optional[int].
Docs only: description strings were added to many existing fields (Team, VirtualAccount,
Workspace, Deployment, Application, GatewayConfiguration, …) — no type or optionality change.
Preserved (no longer breaking vs. earlier drafts): MimeType, Operation, InferMethodName,
LibraryName, Parameters, ParametersStop keep their names; Model.type/Prompt.type stay
Optional[Literal[...]]; ModelVersion.deployable stays Optional[bool]; ml_repos.delete()
still returns EmptyResponse; the *_versions.list() version filters stay Optional[int];
ArtifactVersion/InternalArtifactVersion.manifest stay required (ArtifactManifest);
artifacts.create_or_update() manifest stays ArtifactManifest (endpoint narrowed to artifact
manifests only — models/agent-skills use their own create_or_update).