Working with members: the API
API reference for the members a person defines: defining, shaping and retiring a member, starting and reading its runs, its evaluation history, daily usage, memories, and moving it between workspaces.
A member is anyone or anything that works in a workspace: a person, or an
automated agent a person defined. The endpoints on this page are the ones a person
uses on the members they define. Every endpoint needs a signed-in caller
(a bearer token, or the local socket) and returns errors in the standard
format {object: "error", code, message}. The {did} in a path is the
member's id, the actor_did returned when you define it.
Two rules hold across all of them:
- You can only give what you have. A member you define is limited by your own authority, and revoking your access revokes every member you defined.
- A violation writes nothing. Every limit is checked before anything is saved, so a refused request leaves the workspace exactly as it was.
Define a member
POST /v1/actors/define creates (or updates) a member that runs on a language
model under your authority.
Request fields
| Field | Meaning |
|---|---|
label | Required. The human name. The member's id comes from your id and this label, so the same label from you updates the same member (the newest definition wins) while another person's identical label is a different member. |
mechanism | Defaults to "llm". |
trust_domain | The domain its trust is scored under. |
brief | What the member is for, in words. Saved with the definition. |
stands_on | Definitions this one builds on. Saved with the definition. |
declares_kinds | The record kinds it declares it writes. |
default_on_new_threads | true makes this member the one that answers on a new thread. |
write_admit | The kinds the member may write, as a list of clauses. Must be within what you may write yourself. |
work_loop.model | The model it runs on. |
work_loop.system_prompt_ref | Its prompt, as record:<id> pointing to a prompt record. No other scheme is accepted. |
work_loop.tools | The tools it may use. Must be within your own reach. |
work_loop.reads | The threads it may read in every run. You must be able to read them yourself. |
work_loop.budget_usd, work_loop.max_turns | Per-run limits. |
work_loop.daily_cost_cap_usd, work_loop.daily_loop_cap | Per-day limits. A cap you set can only be lower than your plan's. |
work_loop.conversation_loop | Whether a conversational turn may act, not just answer. |
work_loop.verification | The verification mode for its runs. |
Response: 201 with {actor_did, definition}, where definition is the
id of the definition record. Each run records this id, which is what makes the
evaluation history below meaningful.
Refusals
| Code | When |
|---|---|
422 INVALID_BODY | The body does not parse as a define request. |
400 MISSING_FIELD | label is absent or blank. |
400 DEFINE_FIELD_INERT | You sent work_loop.reach (a run's reach comes from your plan level, narrowed by tools) or admit (a read limit belongs on a credential, not a definition). Remove the field. |
422 WORK_PROMPT_UNRESOLVED | system_prompt_ref is not a record:<id> reference. |
403 READS_NOT_COVERED | work_loop.reads names a thread your credential cannot read. |
403 DAILY_CAP_TOO_WIDE | A daily cap higher than a limited member's plan level allows. A cap can only be lower. |
403 TOOL_NOT_IN_REACH | A tool your own plan level does not allow. |
403 WRITE_KIND_NOT_ADMITTED | A write_admit kind beyond what you may write. |
422 GRANT_REFUSED | The permission derived for the member failed validation. |
The 403 limits apply to a limited member (a caller whose credential
has a write limit). The workspace owner has no such limit and may define
freely; runs are still held to the plan level when they start.
Retire a member
DELETE /v1/actors/{did}/definition retires it: its permission is revoked, it
stops being a thread default, and its definition is disabled, in that order,
so it can never run without its limits. Answers
{object: "actor", did, retired: true}.
| Code | When |
|---|---|
404 NO_SUCH_ACTOR | No definition exists for {did}. |
403 RETIRE_FORBIDDEN | Only the person who defined it, or the workspace owner, may retire it. |
A retired member can no longer be run as (see RUN_ACTOR_NOT_COVERED below).
Shape a member
PATCH /v1/actors/{did}/definition changes part of a definition without
rewriting the rest. Only the workspace owner can call it (the credential must have admin rights). A member proposes a definition instead and never edits the chief (the workspace's main assistant). The
body is partial and every field is optional; a field the endpoint does not know
is refused, never dropped:
| Field | What it does |
|---|---|
display_name | Renames the member (the naming rules apply: never a person's name). |
model | One of the priced models listed under models[] in the workspace read. Any other id is refused by name. |
prompt | The member's words, as text. They are saved as a core.actor.prompt.v1 record and the definition points to it, so every earlier wording stays in history. |
tools | {add: [...], remove: [...]}. Adding a tool already held is a no-op; removing one not held is refused. |
budget_usd, max_turns | The run limits. |
The result is checked against the same limits as defining a member, then
saved as one new definition record that links to the previous one. It applies
without a restart. The response is the member's row in
the shape GET /v1/self/workspace serves under assistants[], plus definition_record_id and, when words changed,
prompt_record_id. The next real reply's run stamps the chosen model; that is
the proof the change took. From a terminal, spl actor shape chief --model claude-sonnet-5 --prompt-file words.txt --add-tool judge --remove-tool run_code
does the same thing by the name you see, and spl actor history chief reads
the versions.
| Code | When |
|---|---|
403 OWNER_ONLY | The credential does not have admin rights. |
404 ACTOR_UNKNOWN | No definition exists for {did}. |
409 ACTOR_RETIRED | The member is retired; define it again instead. |
409 ASSISTANT_WOULD_GO_MUTE | The change would leave the member unable to answer (no model, max_turns of 0, or a budget of zero). Nothing is written. |
422 MODEL_UNKNOWN | The model is not in the priced list; the message names the list. |
422 TOOL_NOT_DECLARED | A tools.remove entry the member does not hold. |
400 NOTHING_TO_CHANGE | An empty body. |
History
GET /v1/actors/{did}/history?limit=20 lists the member's versions, newest
first, each with definition_record_id, at (when it was written), by
(who shaped it, else the definition's principal, else its author), the model,
the words, the tools, the limits, and changed: the fields that differ from
the version before it (model, prompt, tools, budget_usd, max_turns,
display_name; the first version says created). Tools compare as a set and
the words by their record, so reordering tools or writing the same words again
is not a change. total counts every version and truncated says whether
limit cut the list. Owner only, like shaping a member.
Revert
POST /v1/actors/{did}/definition/revert with {"version": "<definition_record_id>"}
puts a listed version back. It is saved as a NEW version, never a delete: the old version is copied as the newest definition, so the history reads shaped, shaped, reverted and nothing is lost. The words come back from the saved prompt record. The result is checked against the same limits as defining and shaping, so a version whose tools or limits are outside today's reach is refused by name. A
revert never retires and never un-retires. The response is the member's row as
the workspace read serves it, plus reverted_to. From a terminal, spl actor revert chief <version> takes the id or a prefix of twelve or more characters
as spl actor history prints it.
| Code | When |
|---|---|
403 OWNER_ONLY | The credential does not have admin rights. |
404 ACTOR_UNKNOWN | No definition exists for {did}. |
404 VERSION_UNKNOWN | The id is not one of this member's versions. |
409 ACTOR_RETIRED | The member is retired; define it again instead. |
400 NOTHING_TO_CHANGE | The version named is already the current one. |
403 TOOL_NOT_IN_REACH, 403 WRITE_KIND_NOT_ADMITTED | The version breaks today's limits. |
Start and read its runs
POST /v1/actors/{did}/runs starts a run as the member {did}, so the run
uses that member's model, prompt and tools.
Request fields: goal (what to do), and optionally source_thread (the
thread the run works on behalf of), repo (a declared repository, which
gives the run a working tree), consumes and promises (the threads it reads
from and lands on), contract, verdict, revert (its declared terms),
budget_usd, max_turns, verification and model_override. Limits you
supply can only be lower than the member's own.
A trial: pass definition (a work_loop object in the shape above) to
run a candidate definition once without installing it. The trial is held to
the same checks as defining a member, and refused with the same codes followed by
"No trial ran." A trial's run is marked so the evaluation history can tell a candidate from the live member.
Response: 201 with the run row (below).
| Code | When |
|---|---|
403 RUN_ACTOR_NOT_COVERED | You may run as yourself, as a member you defined, or as anyone if you are the workspace owner. Anything else, including a member you retired, is refused. |
422 INVALID_DEFINITION | definition is not a work_loop object. |
422 WORK_PROMPT_UNRESOLVED | The member's prompt reference does not resolve to a record. |
400 REPO_UNKNOWN | repo names a repository the workspace has not declared. |
503 ADMISSION_CEILING | The workspace is at its limit for runs at once; the message gives both numbers. |
GET /v1/actors/{did}/runs lists every run the member owns or executed,
newest first, as {object: "run_list", actor, count, truncated, data}. The
list covers at most 2,000 runs; truncated: true means it may be
incomplete.
The run row (also served by GET /v1/runs/{thread}):
| Field | Meaning |
|---|---|
thread | The run's own thread. |
actor, actor_name, model | Who ran and on what. |
goal, source_thread, domain | What it was asked, for which thread, in which domain. |
definition, prompt, frame | The definition, prompt and opening words it ran under. |
state | running, waiting_on_you (a decision is waiting), done, stopped (cancelled), or stopped_short (ended without completing). |
turns, max_turns, spent_usd, ceiling_usd | Progress against its limits. |
started_at, ended_at, summary | Its lifetime and its closing words. |
ask | The open decision on the run, if any. |
tools, narrowed, transport | The tools it was given, the ones held back, and how it ran. |
tool_calls_ok, tool_calls_failed | The tally, so a done with every call failed is visible. |
verb, needs, reason, evidence, candidates, reported_by | The run's report: what it says it did, what it needs from you, and why it ended. |
To steer, answer or stop a live run, see Running a goal.
Evaluation history
GET /v1/actors/{did}/evals returns the member's graded history:
{object: "actor_evals", actor, grades, comparisons, scan_ceiling, capped}.
gradesare newest first, one per scoring (each scoring request below saves one). Each carriesstructure_scoreandsubstance_scoreapart, never blended, and every substance figure carriessubstance_scoredbeside it, because a perfect score over two of ninety cases is not a measurement of ninety.comparisonsset each definition against the one it succeeded, per axis.scan_ceilingis 5,000 andcapped: truemeans the history is partial.
Grades are produced by POST /v1/evals/score with {suite, actor, definition} (definition is the id returned when you defined the member), which scores the runs already on record against a suite's cases
and saves one grade. It refuses 400 MISSING_FIELD (any of the three
absent), 400 NO_CASES (the suite holds no cases) and
400 NO_RUNS_UNDER_DEFINITION (no run by that member ran under that
definition). It answers 201 with the grade and runs_scored, the number of
runs the grade rests on. The commands for these endpoints are in
Evaluating actors.
Usage
GET /v1/actors/{did}/usage answers today's numbers for one member:
{object: "actor_usage", actor, window_kind: "daily", loop_count, input_tokens, output_tokens, cost_usd}. A member that has not run today
returns zeros, not an error.
Memory
A member's memories are what it carries between runs. The endpoints:
GET /v1/actors/{did}/memorieslists them as{object: "list", data}. Optional filters:search(matches name, description or tags),domain(a tag),type(one ofuser,feedback,project,reference,skill,insight) andlimit.POST /v1/actors/{did}/memoriesadds one. Fields:name,memory_type,description(all required),confidence(defaults to0.8),tags,source_thread. Answers201with{object: "memory", name, status: "created", thread}.DELETE /v1/actors/{did}/memories/{name}removes one and answers{status: "cancelled"};404 MEMORY_NOT_FOUNDwhen there is no such memory.
What a memory is, how a run writes one for itself, and how memories are shown when a thread is touched are in Actor memory.
Moving a member between workspaces
GET /v1/actors/{did}/export returns the member as a bundle: its identity
(did, display_name, category, status), its trust profile by domain,
its memories (only with ?include_memories=true), its skills and its
patterns. A failed export answers 500.
POST /v1/actors/{did}/import takes {bundle, trust_discount, merge, dry_run}. trust_discount (default 0.5) scales the imported trust, so a
member arrives with a track record to rebuild rather than one to be taken on
faith; merge (default false) combines with an existing member instead of
replacing; dry_run (default false) reports without writing and answers
200 instead of 201. The result carries memories_imported,
skills_imported, trust_domains_imported, pattern_count,
memory_type_counts, trust_summaries, the identity fields and dry_run. A
bundle that cannot be applied answers 400 IMPORT_FAILED.
The bundle carries the member's identity, trust, memories, skills and patterns. It does not carry the definition you created (model, prompt, tools, limits), because a definition is limited by whoever defines it in the receiving workspace. To move a defined member, import the bundle, then define it again with the same request; the label gives it a stable id.
The command-line form and what does and does not move are in Actor portability.
See also
- Actors and adapters: the concepts behind a member's definition.
- Tiers and entitlements: the limits a run is held to.
- Running a goal: sitting inside a run from the command line.
- API reference: every other endpoint.
The API surface
Which API endpoints on a workspace are public and which are internal, with one line per public endpoint, grouped by what you do with it, and the page that explains each one when there is one.
What the workspace says about itself
The owner's settings read, GET /v1/self/workspace, and what each block on it means, including what null means.