Skip to content
18 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Anyone makes an agent by describing it: one box drafts the whole agent (name, job, responsibilities, voice, skills to keep, integrations it needs, model limits and budget) as a card to change and try in a chat beside it before creating it, and an agent changes later by saying what to change, shown as a diff before it's saved. Members can make personal agents, which only they talk to and which spend from their own budget, unless owners turn that off; owners promote one to a workspace agent. The agents guide says how.1-- Personal agents (docs.g1t.sh/guides/agents/, "Personal agents"): any
2-- member may create an agent of their own, which only they talk to, in
3-- their direct message with it, and whose spend counts against their
4-- budget. Owners keep the workspace's agents, and promote a personal one
5-- to a workspace agent.
6
7-- `workspace` or `personal`. Every agent so far is the workspace's.
8ALTER TABLE agents ADD COLUMN scope TEXT NOT NULL DEFAULT 'workspace';
9-- For a personal agent: the member it belongs to, by user id (what chat
10-- names the asker by) and username (what lists show).
11ALTER TABLE agents ADD COLUMN owner_id TEXT;
12ALTER TABLE agents ADD COLUMN owner_username TEXT;
13
14CREATE INDEX agents_personal ON agents (workspace_id, owner_id, archived_at) WHERE owner_id IS NOT NULL;
15
16-- Whether members who aren't owners may create personal agents: on unless
17-- an owner turns it off.
18ALTER TABLE agent_policies ADD COLUMN members_create_agents INTEGER NOT NULL DEFAULT 1;