Agent

The `Agent` entity.

Definition

TypeScript
interface Agent {
  id: string;
  workspaceId: string | null;
  name: string;
  description: string | null;
  system: boolean;
  defaultVersionId: string | null;
  createdBy: string | null;
  runtimeUserId: string | null;
  deletedAt: string | null;
  retentionTier: "short" | "medium" | "long" | "none" | null;
  createdAt: string;
  updatedAt: string;
}

Fields

FieldTypeNotes
idstringreadonly required
workspaceIdstring | nullrequired — Workspace that owns this agent; null for system agents.
namestringrequired — Human-readable name shown in the UI.
descriptionstring | nullrequired — Optional longer-form description of what the agent does.
systembooleanrequired — True for built-in system agents; system agents cannot be edited or deleted.
defaultVersionIdstring | nullrequired — Version currently served as the default for runs; null until a version is published.
createdBystring | nullrequired — User who created the agent; null for system agents.
runtimeUserIdstring | nullrequired — Override the workspace default service user as the runtime caller when this agent runs headlessly. Null = inherit workspace default. Workspace-admin-only to set; target user must be a member of the workspace.
deletedAtstring | nullrequired — ISO-8601 timestamp of soft-delete; null while active. Cleanup worker hard-deletes once deletedAt + retentionTier.days passes.
retentionTier"short" | "medium" | "long" | "none" | nullrequired — Retention tier snapshotted at delete time; controls when the cleanup worker hard-purges. short=7d, medium=30d, long=90d, none=never. Null while active.
createdAtstringreadonly required — ISO-8601 timestamp of creation.
updatedAtstringreadonly required — ISO-8601 timestamp of the last update.