IF Commons GitHub

agent

concept

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.

Governance: attributes

approvalThresholdcode of riskLevelrequired

The 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 autonomyLevelrequired

How much it may do without a person

Becomes the column autonomy of agent.

Written at commons/data/models/identity-agent/mod.ts:43

cardUrltextoptional

Where its agent card is published

Becomes the column card_url of agent.

Written at commons/data/models/identity-agent/mod.ts:48

frameworktextoptional

What it is built with

Becomes the column framework of agent.

Written at commons/data/models/identity-agent/mod.ts:45

frameworkVersiontextoptional

The version of what it is built with

Becomes the column framework_version of agent.

Written at commons/data/models/identity-agent/mod.ts:46

maxConcurrentRunsintegeroptional

How 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

maxDelegationDepthintegerrequired

How many delegations deep it may act

Becomes the column max_delegation_depth of agent.

Written at commons/data/models/identity-agent/mod.ts:50

providertextoptional

Who runs it

Becomes the column provider of agent.

Written at commons/data/models/identity-agent/mod.ts:47

purposetextrequired

What it is for

Becomes the column purpose of agent.

Written at commons/data/models/identity-agent/mod.ts:44

Governance: relationships

principalone

The principal the agent is To principal. Written at commons/data/models/identity-agent/mod.ts:40

Logical: the table

Projects to the table agent with the primary key principal_id.

ColumnTypeNullRoleFrom
approval_thresholdtextfalseattributeagent.approvalThreshold
autonomytextfalseattributeagent.autonomy
card_urltexttrueattributeagent.cardUrl
frameworktexttrueattributeagent.framework
framework_versiontexttrueattributeagent.frameworkVersion
max_concurrent_runsintegertrueattributeagent.maxConcurrentRuns
max_delegation_depthintegerfalseattributeagent.maxDelegationDepth
principal_idtextfalsereferenceagent.principal
providertexttrueattributeagent.provider
purposetextfalseattributeagent.purpose
sponsor_principal_idtexttruereferenceagent.sponsor

Physical: SQL

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'))
);

Physical: the typed table

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);

Titles, headings, exports, tables, columns and requirements. Esc closes.