identityAgentnamespacenamespace identityAgentThe typed tables of the identityAgent model, generated by IFC Data from the model. Do not edit: change the model and run bun tools/typed.ts --write.
AI agents: provenance, tools, runs, budgets and approvals
identityAgentnamespacenamespace identityAgentidentityAgent.AgentRowinterfaceno test imports itinterface AgentRowA program that decides for itself what to do, accountable to an owner and limited by its level of autonomy
| Member | Type | What it is |
|---|---|---|
principalId | string | The principal the agent is |
autonomy | "act_with_approval" | "autonomous" | "observe" | "suggest" | How much it may do without a person |
purpose | string | What it is for |
framework | string | null | What it is built with |
frameworkVersion | string | null | The version of what it is built with |
provider | string | null | Who runs it |
cardUrl | string | null | Where its agent card is published |
approvalThreshold | "critical" | "high" | "low" | "medium" | The risk at or above which its calls need an approval |
maxDelegationDepth | number | How many delegations deep it may act |
maxConcurrentRuns | number | null | How many runs it may have at once |
sponsorPrincipalId | string | null | Who answers for its business use, where that is not its owner |
identityAgent.AgentInsertinterfaceno test imports itinterface AgentInsertWhat an insert into agent takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
principalId | string | |
autonomy | "act_with_approval" | "autonomous" | "observe" | "suggest" | |
purpose | string | |
framework? | string | null | |
frameworkVersion? | string | null | |
provider? | string | null | |
cardUrl? | string | null | |
approvalThreshold | "critical" | "high" | "low" | "medium" | |
maxDelegationDepth | number | |
maxConcurrentRuns? | number | null | |
sponsorPrincipalId? | string | null |
identityAgent.AgentKeytypeno test imports ittype AgentKey = { readonly principalId: string };The key of a row of agent.
identityAgent.agentconstno test imports itconst agent: Table<AgentRow, AgentInsert, "agent">A program that decides for itself what to do, accountable to an owner and limited by its level of autonomy
identityAgent.AgentVersionRowinterfaceno test imports itinterface AgentVersionRowA version of an agent: which model, which prompt and which tools, pinned, so that a bad one can be pulled from every run
| Member | Type | What it is |
|---|---|---|
agentVersionId | string | What identifies the version, made by the application |
versionLabel | string | What the version is called, unique for its agent |
modelProvider | string | Who makes the model |
modelName | string | The model |
modelVersion | string | The pinned snapshot of the model, never an alias that moves |
promptHash | string | A hash of the system prompt; the prompt is not kept here |
toolManifestHash | string | A hash of the tools it is given |
codeRef | string | null | The commit of its code |
status | "active" | "approved" | "candidate" | "retired" | "revoked" | Where the version is |
approvedAt | Timestamp | null | When it was approved |
createdAt | Timestamp | When it was made |
versionKey | string | A hash of the agent and the label, unique |
agentPrincipalId | string | The agent |
approvedByPrincipalId | string | null | Who approved it |
identityAgent.AgentVersionInsertinterfaceno test imports itinterface AgentVersionInsertWhat an insert into agent_version takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
agentVersionId | string | |
versionLabel | string | |
modelProvider | string | |
modelName | string | |
modelVersion | string | |
promptHash | string | |
toolManifestHash | string | |
codeRef? | string | null | |
status | "active" | "approved" | "candidate" | "retired" | "revoked" | |
approvedAt? | Timestamp | null | |
createdAt | Timestamp | |
versionKey | string | |
agentPrincipalId | string | |
approvedByPrincipalId? | string | null |
identityAgent.AgentVersionKeytypeno test imports ittype AgentVersionKey = { readonly agentVersionId: string };The key of a row of agent_version.
identityAgent.agentVersionconstno test imports itconst agentVersion: Table<AgentVersionRow, AgentVersionInsert, "agentVersion">A version of an agent: which model, which prompt and which tools, pinned, so that a bad one can be pulled from every run
identityAgent.AgentToolRowinterfaceno test imports itinterface AgentToolRowA tool that agents may be granted: what it is called, the permission a call needs, how risky it is
| Member | Type | What it is |
|---|---|---|
agentToolId | string | What identifies the tool, made by the application |
name | string | What the tool is called, unique within its tenant |
definition | string | What it does |
serverAudience | string | null | The server or API it is on |
riskLevel | "critical" | "high" | "low" | "medium" | How much harm it can do |
sideEffect | "external" | "irreversible" | "none" | "read" | "write" | What it does |
argsSchemaHash | string | null | A hash of the schema of its arguments |
status | "active" | "retired" | Whether it is in use |
tenantId | string | null | The tenant it is for; empty for the platform's |
permissionId | string | The permission a call needs: one path for tools, APIs and screens |
identityAgent.AgentToolInsertinterfaceno test imports itinterface AgentToolInsertWhat an insert into agent_tool takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
agentToolId | string | |
name | string | |
definition | string | |
serverAudience? | string | null | |
riskLevel | "critical" | "high" | "low" | "medium" | |
sideEffect | "external" | "irreversible" | "none" | "read" | "write" | |
argsSchemaHash? | string | null | |
status | "active" | "retired" | |
tenantId? | string | null | |
permissionId | string |
identityAgent.AgentToolKeytypeno test imports ittype AgentToolKey = { readonly agentToolId: string };The key of a row of agent_tool.
identityAgent.agentToolconstno test imports itconst agentTool: Table<AgentToolRow, AgentToolInsert, "agentTool">A tool that agents may be granted: what it is called, the permission a call needs, how risky it is
identityAgent.ToolGrantRowinterfaceno test imports itinterface ToolGrantRowA tool that an agent has been granted, perhaps with a condition on its calls, never more than the agent's owner may do
| Member | Type | What it is |
|---|---|---|
agentPrincipalId | string | The agent |
toolAgentToolId | string | The tool |
expression | string | null | A condition on a call, over its arguments |
approval | "always" | "inherit" | Whether a call needs approval |
maxCallsPerRun | number | null | How many calls a run may make |
validTo | Timestamp | null | When the grant ends |
status | "active" | "retired" | Whether the grant is applied |
grantedByPrincipalId | string | Who granted it |
identityAgent.ToolGrantInsertinterfaceno test imports itinterface ToolGrantInsertWhat an insert into tool_grant takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
agentPrincipalId | string | |
toolAgentToolId | string | |
expression? | string | null | |
approval | "always" | "inherit" | |
maxCallsPerRun? | number | null | |
validTo? | Timestamp | null | |
status | "active" | "retired" | |
grantedByPrincipalId | string |
identityAgent.ToolGrantKeytypeno test imports ittype ToolGrantKey = { readonly agentPrincipalId: string; readonly toolAgentToolId: string };The key of a row of tool_grant.
identityAgent.toolGrantconstno test imports itconst toolGrant: Table<ToolGrantRow, ToolGrantInsert, "toolGrant">A tool that an agent has been granted, perhaps with a condition on its calls, never more than the agent's owner may do
identityAgent.AgentRunRowinterfaceno test imports itinterface AgentRunRowOne task of an agent, in one version, perhaps under a delegation, perhaps started by another run
| Member | Type | What it is |
|---|---|---|
runId | string | What identifies the run, made by the application |
startedAt | Timestamp | When it started |
endedAt | Timestamp | null | When it ended |
status | "cancelled" | "expired" | "failed" | "killed" | "running" | "succeeded" | Where it is |
traceId | string | null | The trace it is part of |
purpose | string | null | What it is for |
inputHash | string | null | A hash of its input |
agentPrincipalId | string | The agent |
versionAgentVersionId | string | The version it runs |
tenantId | string | The tenant it runs in |
initiatorPrincipalId | string | null | Who started it |
delegationId | string | null | The delegation it acts under |
parentRunAgentRunRunId | string | null | The run that started it, for a sub-agent |
identityAgent.AgentRunInsertinterfaceno test imports itinterface AgentRunInsertWhat an insert into agent_run takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
runId | string | |
startedAt | Timestamp | |
endedAt? | Timestamp | null | |
status | "cancelled" | "expired" | "failed" | "killed" | "running" | "succeeded" | |
traceId? | string | null | |
purpose? | string | null | |
inputHash? | string | null | |
agentPrincipalId | string | |
versionAgentVersionId | string | |
tenantId | string | |
initiatorPrincipalId? | string | null | |
delegationId? | string | null | |
parentRunAgentRunRunId? | string | null |
identityAgent.AgentRunKeytypeno test imports ittype AgentRunKey = { readonly runId: string };The key of a row of agent_run.
identityAgent.agentRunconstno test imports itconst agentRun: Table<AgentRunRow, AgentRunInsert, "agentRun">One task of an agent, in one version, perhaps under a delegation, perhaps started by another run
identityAgent.ToolCallRowinterfaceno test imports itinterface ToolCallRowA call of a tool in a run: what was decided, and a hash of its arguments, never the arguments
| Member | Type | What it is |
|---|---|---|
toolCallId | string | What identifies the call, made by the application |
callIndex | number | Which call of the run it is |
decision | "allowed" | "approval_required" | "budget_exceeded" | "denied" | What was decided about it |
status | "failed" | "requested" | "running" | "succeeded" | Where it is |
argsHash | string | A hash of its arguments |
argsSummary | string | null | What it asked for, redacted by the caller, never the raw arguments |
resourceType | string | null | The kind of resource it was about |
resourceId | string | null | The resource it was about |
resultHash | string | null | A hash of its result |
denyReason | string | null | Why it was refused |
policyRefs | unknown | The roles, policies and grants that decided |
tokensIn | number | null | Tokens sent to the model |
tokensOut | number | null | Tokens received from the model |
costMicros | number | null | What it cost, in millionths of a currency unit |
requestedAt | Timestamp | When it was asked for |
completedAt | Timestamp | null | When it ended |
callKey | string | A hash of the run and the index, unique |
runAgentRunRunId | string | The run |
toolAgentToolId | string | The tool |
approvalApprovalRequestId | string | null | The approval it was given |
identityAgent.ToolCallInsertinterfaceno test imports itinterface ToolCallInsertWhat an insert into tool_call takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
toolCallId | string | |
callIndex | number | |
decision | "allowed" | "approval_required" | "budget_exceeded" | "denied" | |
status | "failed" | "requested" | "running" | "succeeded" | |
argsHash | string | |
argsSummary? | string | null | |
resourceType? | string | null | |
resourceId? | string | null | |
resultHash? | string | null | |
denyReason? | string | null | |
policyRefs? | unknown | |
tokensIn? | number | null | |
tokensOut? | number | null | |
costMicros? | number | null | |
requestedAt | Timestamp | |
completedAt? | Timestamp | null | |
callKey | string | |
runAgentRunRunId | string | |
toolAgentToolId | string | |
approvalApprovalRequestId? | string | null |
identityAgent.ToolCallKeytypeno test imports ittype ToolCallKey = { readonly toolCallId: string };The key of a row of tool_call.
identityAgent.toolCallconstno test imports itconst toolCall: Table<ToolCallRow, ToolCallInsert, "toolCall">A call of a tool in a run: what was decided, and a hash of its arguments, never the arguments
identityAgent.AgentBudgetRowinterfaceno test imports itinterface AgentBudgetRowWhat an agent, under a delegation or in a run, may spend of a meter in a window; it cannot be exceeded
| Member | Type | What it is |
|---|---|---|
budgetId | string | What identifies the budget, made by the application |
meter | "cost_micros" | "tokens" | "tool_calls" | "writes" | What it counts |
windowKind | "day" | "hour" | "lifetime" | "month" | "run" | How long it lasts |
limitValue | number | How much may be spent |
used | number | How much has been |
windowStart | Timestamp | When the window began |
version | number | Which update it has had, so that two updates cannot both win |
status | "active" | "retired" | Whether the budget is applied |
budgetKey | string | A hash of the agent, the delegation, the run, the meter and the window, unique |
agentPrincipalId | string | The agent |
delegationId | string | null | The delegation it is for |
runAgentRunRunId | string | null | The run it is for |
identityAgent.AgentBudgetInsertinterfaceno test imports itinterface AgentBudgetInsertWhat an insert into agent_budget takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
budgetId | string | |
meter | "cost_micros" | "tokens" | "tool_calls" | "writes" | |
windowKind | "day" | "hour" | "lifetime" | "month" | "run" | |
limitValue | number | |
used | number | |
windowStart | Timestamp | |
version | number | |
status | "active" | "retired" | |
budgetKey | string | |
agentPrincipalId | string | |
delegationId? | string | null | |
runAgentRunRunId? | string | null |
identityAgent.AgentBudgetKeytypeno test imports ittype AgentBudgetKey = { readonly budgetId: string };The key of a row of agent_budget.
identityAgent.agentBudgetconstno test imports itconst agentBudget: Table<AgentBudgetRow, AgentBudgetInsert, "agentBudget">What an agent, under a delegation or in a run, may spend of a meter in a window; it cannot be exceeded
identityAgent.ApprovalRequestRowinterfaceno test imports itinterface ApprovalRequestRowA request for a person to approve one action of an agent, bound to a hash of its arguments, usable once
| Member | Type | What it is |
|---|---|---|
approvalRequestId | string | What identifies the request, made by the application |
actionKey | string | The permission the action needs |
resourceType | string | null | The kind of resource it is about |
resourceId | string | null | The resource it is about |
argsHash | string | A hash of the arguments, so that an approval is for exactly this call |
summary | string | What will happen, redacted |
riskLevel | "critical" | "high" | "low" | "medium" | How risky it is |
approverRule | "delegator" | "owner" | "role_holder" | Who may approve |
status | "approved" | "cancelled" | "consumed" | "denied" | "expired" | "pending" | Where the request is |
requestedAt | Timestamp | When it was asked for |
expiresAt | Timestamp | When it stops being valid |
decidedAt | Timestamp | null | When it was decided |
decisionReason | string | null | Why it was decided so |
consumedAt | Timestamp | null | When it was used |
runAgentRunRunId | string | The run |
agentPrincipalId | string | The agent that asks |
approverRoleAccessRoleRoleId | string | null | The role whose holders may approve, where the rule says so |
decidedByPrincipalId | string | null | The person who decided |
identityAgent.ApprovalRequestInsertinterfaceno test imports itinterface ApprovalRequestInsertWhat an insert into approval_request takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
approvalRequestId | string | |
actionKey | string | |
resourceType? | string | null | |
resourceId? | string | null | |
argsHash | string | |
summary | string | |
riskLevel | "critical" | "high" | "low" | "medium" | |
approverRule | "delegator" | "owner" | "role_holder" | |
status | "approved" | "cancelled" | "consumed" | "denied" | "expired" | "pending" | |
requestedAt | Timestamp | |
expiresAt | Timestamp | |
decidedAt? | Timestamp | null | |
decisionReason? | string | null | |
consumedAt? | Timestamp | null | |
runAgentRunRunId | string | |
agentPrincipalId | string | |
approverRoleAccessRoleRoleId? | string | null | |
decidedByPrincipalId? | string | null |
identityAgent.ApprovalRequestKeytypeno test imports ittype ApprovalRequestKey = { readonly approvalRequestId: string };The key of a row of approval_request.
identityAgent.approvalRequestconstno test imports itconst approvalRequest: Table<ApprovalRequestRow, ApprovalRequestInsert, "approvalRequest">A request for a person to approve one action of an agent, bound to a hash of its arguments, usable once