Agents

Create an agent

Changed on

An agent has an owner, a name, a brief that says how it works, and rules for which tools it can use. Every change to the brief or tool policy makes a new version. An agent does its work through routines. A routine is a Cloud Automation that belongs to the agent, so it also appears in the Automation capabilities; each run starts from the agent's brief and can use only what the agent's tool policy allows. The owner can share the agent with teammates. Managers can change who can collaborate. The owner must approve changes a manager proposes to the brief, tool policy or routines. Collaborators can use the agent and ask for changes. Runs started by a teammate are private. Scheduled runs use the owner’s accounts and share their results with the team. Create one only when the person asks for an agent. Write the brief as Markdown from what they said: what the agent watches or does, how it decides, and how it reports. The agent does nothing until it has a routine; add one with createPersonalAgentRoutine.

post/v1/personal-agents

Request

  • Base URL
    https://api.openworklabs.com
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Request body

CreatePersonalAgent required
name, string required
brief, string required

The agent's definition, as Markdown: who it is, what it does, how it reports. Every run of the agent starts from it.

toolPolicy, PersonalAgentToolPolicy
never, PersonalAgentNever[]
allow, PersonalAgentAllow[]

Actions the person said the agent may take without asking first. Only include what they asked for.

connectorNames, string[]

Exact names of existing connectors the agent needs for the requested job. Omit unrelated services.

defaultExecutionTarget, 'desktop' | 'cloud'
monthlyBudgetMicros, integer nullable

Monthly spending limit in millionths of a US dollar. Recorded now; not enforced yet.

idempotencyKey, string

Sending the same key again returns the agent the first request made instead of making another.

Response

Agent created or returned from an earlier request.

PersonalAgentDetail required
agent, PersonalAgent required
revision, PersonalAgentRevision required
routineCount, integer required
role, 'owner' | 'manager' | 'collaborator'

What the caller may do with this agent.

owner, PersonalAgentPerson nullable
sharedWith, PersonalAgentShare[]
routines, PersonalAgentRoutineSummary[]
spend, PersonalAgentSpend
openRequestCount, integer
audience, PersonalAgentAudience
listed, boolean

False when the caller can use the agent through their organization or a team but has not opened it and it was not added for them: offer it, do not list it.

canShare, boolean

Whether the caller may share this agent now: their role allows it and the organization lets them.

Changes