approvalThresholdcode of riskLevelrequiredThe risk at or above which its calls need an approval
Becomes the column approval_threshold of agent.
Written at commons/data/models/identity-agent/mod.ts:49
A program that decides for itself what to do, accountable to an owner and limited by its level of autonomy
Model identityAgent. Written in commons/data/models/identity-agent/mod.ts:40. Identified by principal.
approvalThresholdcode of riskLevelrequiredThe risk at or above which its calls need an approval
Becomes the column approval_threshold of agent.
Written at commons/data/models/identity-agent/mod.ts:49
autonomycode of autonomyLevelrequiredHow much it may do without a person
Becomes the column autonomy of agent.
Written at commons/data/models/identity-agent/mod.ts:43
cardUrltextoptionalWhere its agent card is published
Becomes the column card_url of agent.
Written at commons/data/models/identity-agent/mod.ts:48
frameworktextoptionalWhat it is built with
Becomes the column framework of agent.
Written at commons/data/models/identity-agent/mod.ts:45
frameworkVersiontextoptionalThe version of what it is built with
Becomes the column framework_version of agent.
Written at commons/data/models/identity-agent/mod.ts:46
maxConcurrentRunsintegeroptionalHow many runs it may have at once
Becomes the column max_concurrent_runs of agent.
Written at commons/data/models/identity-agent/mod.ts:51
maxDelegationDepthintegerrequiredHow many delegations deep it may act
Becomes the column max_delegation_depth of agent.
Written at commons/data/models/identity-agent/mod.ts:50
providertextoptionalWho runs it
Becomes the column provider of agent.
Written at commons/data/models/identity-agent/mod.ts:47
purposetextrequiredWhat it is for
Becomes the column purpose of agent.
Written at commons/data/models/identity-agent/mod.ts:44
principaloneThe principal the agent is To principal. Written at commons/data/models/identity-agent/mod.ts:40
sponsoroptionalWho answers for its business use, where that is not its owner To principal. Written at commons/data/models/identity-agent/mod.ts:40
Projects to the table agent with the primary key principal_id.
| Column | Type | Null | Role | From |
|---|---|---|---|---|
approval_threshold | text | false | attribute | agent.approvalThreshold |
autonomy | text | false | attribute | agent.autonomy |
card_url | text | true | attribute | agent.cardUrl |
framework | text | true | attribute | agent.framework |
framework_version | text | true | attribute | agent.frameworkVersion |
max_concurrent_runs | integer | true | attribute | agent.maxConcurrentRuns |
max_delegation_depth | integer | false | attribute | agent.maxDelegationDepth |
principal_id | text | false | reference | agent.principal |
provider | text | true | attribute | agent.provider |
purpose | text | false | attribute | agent.purpose |
sponsor_principal_id | text | true | reference | agent.sponsor |
CREATE TABLE IF NOT EXISTS "agent" (
"principal_id" VARCHAR NOT NULL PRIMARY KEY,
"autonomy" VARCHAR NOT NULL,
"purpose" VARCHAR NOT NULL,
"framework" VARCHAR,
"framework_version" VARCHAR,
"provider" VARCHAR,
"card_url" VARCHAR,
"approval_threshold" VARCHAR NOT NULL,
"max_delegation_depth" INTEGER NOT NULL,
"max_concurrent_runs" INTEGER,
"sponsor_principal_id" VARCHAR,
CONSTRAINT "agent_principal_id_fk" FOREIGN KEY ("principal_id") REFERENCES "principal" ("principal_id"),
CONSTRAINT "agent_sponsor_principal_id_fk" FOREIGN KEY ("sponsor_principal_id") REFERENCES "principal" ("principal_id"),
CONSTRAINT "agent_autonomy_ck" CHECK ("autonomy" IN ('observe', 'suggest', 'act_with_approval', 'autonomous')),
CONSTRAINT "agent_approval_threshold_ck" CHECK ("approval_threshold" IN ('low', 'medium', 'high', 'critical'))
);CREATE TABLE IF NOT EXISTS "agent" (
"principal_id" TEXT NOT NULL PRIMARY KEY,
"autonomy" TEXT NOT NULL,
"purpose" TEXT NOT NULL,
"framework" TEXT,
"framework_version" TEXT,
"provider" TEXT,
"card_url" TEXT,
"approval_threshold" TEXT NOT NULL,
"max_delegation_depth" INTEGER NOT NULL,
"max_concurrent_runs" INTEGER,
"sponsor_principal_id" TEXT,
CONSTRAINT "agent_principal_id_fk" FOREIGN KEY ("principal_id") REFERENCES "principal" ("principal_id"),
CONSTRAINT "agent_sponsor_principal_id_fk" FOREIGN KEY ("sponsor_principal_id") REFERENCES "principal" ("principal_id"),
CONSTRAINT "agent_autonomy_ck" CHECK ("autonomy" IN ('observe', 'suggest', 'act_with_approval', 'autonomous')),
CONSTRAINT "agent_approval_threshold_ck" CHECK ("approval_threshold" IN ('low', 'medium', 'high', 'critical'))
);CREATE TABLE IF NOT EXISTS "agent" (
"principal_id" TEXT NOT NULL PRIMARY KEY,
"autonomy" TEXT NOT NULL,
"purpose" TEXT NOT NULL,
"framework" TEXT,
"framework_version" TEXT,
"provider" TEXT,
"card_url" TEXT,
"approval_threshold" TEXT NOT NULL,
"max_delegation_depth" INTEGER NOT NULL,
"max_concurrent_runs" INTEGER,
"sponsor_principal_id" TEXT,
CONSTRAINT "agent_principal_id_fk" FOREIGN KEY ("principal_id") REFERENCES "principal" ("principal_id"),
CONSTRAINT "agent_sponsor_principal_id_fk" FOREIGN KEY ("sponsor_principal_id") REFERENCES "principal" ("principal_id"),
CONSTRAINT "agent_autonomy_ck" CHECK ("autonomy" IN ('observe', 'suggest', 'act_with_approval', 'autonomous')),
CONSTRAINT "agent_approval_threshold_ck" CHECK ("approval_threshold" IN ('low', 'medium', 'high', 'critical'))
);Read and written from TypeScript with the types the model gives: import { agent } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/identity-agent.auto.ts: do not edit.
import { from } from "@intellectual-frontiers/data/sql/typed";
import { agent } from "@intellectual-frontiers/data/sql/typed/models";
const rows = await from(agent).select((s) => ({ principalId: s.agent.principalId, autonomy: s.agent.autonomy })).run(runner);