https://api.impellabs.tech/api/v1. Send Authorization: Bearer imp_... on each request. See
Authentication and Conventions. The API reference lists every field.
Who can see and change an agent
An agent is private to its owner until the owner shares it. A token acts as the person who made it.
An agent that a person may not read answers
404 with This agent does not exist.
Owners and admins keep oversight only. For an agent they cannot read, they see its name, owner, kind, status, sharing
mode and spend over 30 days. They never see its instructions or its other content. They can pause it, archive it,
give it to another person, and make it private. They cannot edit it by role. When an owner or an admin acts on an
agent they do not own, the agent’s owner is told.
A Chief of Staff is private to its person. It cannot be shared, given away, paused or archived through these routes.
Customer-facing work is done by agents that a person creates.
List agents
GET /agents returns an array of the agents the person may read. An agent they cannot read is not in it.
An owner or an admin gets the other agents from GET /agents/oversight.
id, kind, name, status (draft, active or paused), agent_type, category, owner_id,
department_id, live_version, latest_version, unpublished_changes, needs_test, the settings of the newest
version (instructions, tone, model, tools, knowledge_scope, knowledge_groups, guardrails, memory,
sub_agents, skills, hooks, abilities, voice, channel_prompts, handoff and more), and the access
fields below.
GET /agents/types lists the agent types and categories the create route accepts, each with an available flag for
a type.
Create an agent
POST /agents. The agent starts private, in status draft, with a first version.
A personal agent needs the right to add agents for yourself. A department agent needs a manager of the department or
an admin. A company agent needs an owner or an admin. Others get
403.
201 with the agent. In the reply, status is draft, latest_version is 1, live_version is null,
sharing_mode is private and needs_test is true.
Change an agent
PATCH /agents/{agent_id} needs “Can edit” or ownership. Send only the fields you change. A change to
instructions, tone, model, tools, knowledge or other version settings saves a new fixed version. note (200 characters)
labels the change. The name and the reply settings (pause_when_member_replies, resume_after_minutes,
notify_when_unsure) apply at once and do not make a version. The agent_type is fixed once the agent is no longer a draft.
400 with the field name. Someone who can read the agent but not edit it gets
403 with You cannot change this agent.
Test, then publish
POST /agents/{agent_id}/publish makes the newest version the live version and sets the status to active.
It needs “Can edit” or ownership. The newest version must be tested first: send a message to
POST /agents/{agent_id}/test/messages with { "text": "..." }, then publish. Without a test the reply is 400
with detail like Test version 2 in the test chat first. Then publish it. Publish can also fail with 400 when a
check of the version fails.
Versions
GET /agents/{agent_id}/versionslists the versions, newest first:number,note,created_at,by,live,tested. Anyone who can read the agent may call it.POST /agents/{agent_id}/versions/{number}/restorecopies an earlier version into a new draft version. The live version stays. It answers201with the agent. It needs “Can edit”. An unknown number answers404.
Pause and archive
POST /agents/{agent_id}/pausestops a live agent. Only a live agent can be paused; others get400. Publish again to start it.DELETE /agents/{agent_id}archives the agent and answers204.
Share an agent
PATCH /agents/{agent_id}/sharing with { "sharing": { ... } }.
A level is
use (“Can use”) or edit (“Can edit”). Each id must be a person or a department of this workspace. The
owner is not listed. A private agent has no members.
Give an agent to another person
POST /agents/{agent_id}/transfer with { "member_id": "<id>" }. The owner, or an owner or an admin of the
workspace, may do it. The new owner must be an active member and must not own the agent already; otherwise 400.
The new owner is told.
Oversight list
GET /agents/oversight is for owners and admins. Others get 403. It returns a page for every agent except a Chief of
Staff, with id, kind, name, status, agent_type, owner_id, owner_name, sharing_mode, spent_30d and
the access flags, and never the instructions. Filters: status, sharing, q. Sort: name, owner, status,
sharing, spend, with order, page and page_size.
Memories and lessons
An agent keeps short memories and lessons. These routes need “Can edit” to write and read access to read:GET and POST /agents/{agent_id}/memories, PATCH and DELETE /agents/{agent_id}/memories/{memory_id},
GET and POST /agents/{agent_id}/lessons, and DELETE /agents/{agent_id}/lessons/{lesson_id}.
A memory has 300 characters at most and a lesson 1000.