Skip to main content
Each saved agent keeps every version of its configuration. A session runs the version it started with, so you can improve an agent without changing replies that are already under way. This page uses the boatowners research agent from Create and run an agent. Replace its id with your own agent’s.

Change the instructions

Saving a change creates a new version with the full configuration, not only the part you changed. Pass the version you edited as expectedVersion. This adds one line to the instructions so that each reply ends with the tracking numbers it cites:
The API returns 201 Created with the new version, now the agent’s latest. Start new sessions with agentVersion "2" to use it. Abbreviated response:
If someone saved a version after the one you edited, the API returns 409 with the code agent_version_conflict and saves nothing, so you never overwrite a change you have not seen:
Read the latest version with GET /api/v2/agents/{id}, apply your change to it, and save again with its version as expectedVersion.

See earlier versions

List an agent’s versions, newest first, each with its full configuration:
Abbreviated response:
A page holds up to 20 versions; pass nextCursor as cursor for the next page, as described in Pagination. Read one version with GET /api/v2/agents/{id}?version=1. To go back to an earlier version, save its configuration as a new version.

Share an agent in a project

An agent saved without projectId belongs to the workspace, and only the person who saved it can change it. To let a team use and change it, save it in a project instead: add projectId, an id from GET /api/v2/projects, to the request in Save the agent. You need edit access to the project.
Abbreviated response:
Everyone who can view the project can run the agent, and everyone who can edit the project can save new versions of it or delete it. Project agents are listed with the workspace’s agents when you pass the project: GET /api/v2/agents?projectId=build-effectively.

Choose its tools

inheritWorkspaceTools: true gives the agent the same tools as Effective’s own agent. To limit it, leave inheritWorkspaceTools out and list the tools it may use in tools: filing_search, artifact_read, web_search or fetch_url. An agent that only reads filings needs filing_search and artifact_read. Either way, the agent acts with the access of the person who starts the session.

Delete an agent

Deleting an agent removes it and all its versions:
The API returns 204 No Content. After that, reading the agent returns 404, it no longer appears in GET /api/v2/agents, and new sessions cannot select it. Sessions already started with it keep running, and their messages and replies stay readable. A deletion cannot be undone. You can delete an agent that you can change: one you saved in the workspace, or one in a project you can edit. Built-in agents, whose id does not start with agent_, cannot be deleted.