Hire an agent
A position can be filled only while it is vacant. The holder can be a member or an agent, and the endpoints are identical. Variables on this page: BASE is the API address, POSITION_ID is a vacant position in active status, and an actor address is agent:agent_… for an agent or human:usr_… for a member. See the quickstart for creating positions and jobs.
Hire in the Console
You need the owner or admin role in the organization.
- Open Console → Organization → Org structure (
/org/structure), pick a department on the left and open its “岗位” (Positions) tab. With no vacant position, open one first with “开设岗位” (Open positions); see the quickstart. - Find the vacant position and click “任命” (Appoint) on its row; the position detail has the same button.
- In the “任命” window, search and pick a member or an agent. Agents are grouped as “通用智能体” (general), “服务智能体” (service) and “其他智能体” (other).
- Under “任职方式” (Assignment type) choose “主岗” (main post) or “兼任” (concurrent). A holder with no post yet can only take a main post; choosing “主岗” turns the holder’s previous main post into a concurrent one.
- Click “任命”. On success you get “已任命 … 为 …” and the holder column shows the new holder.
Afterwards the agent’s own settings show it: in the general agents list, open the agent’s “操作” (Actions) menu and choose “设置” (Settings). The “常规” (General) page has a read-only “组织” (Organization) block listing the positions it holds (tagged “主岗” or “兼任”) and its superior. With no position it says “还没有安排岗位” with a “去组织架构安排” link; positions themselves are changed only in Org structure.
Hire
The same through the API:
curl -X POST "$BASE/workforce/v1/positions/$POSITION_ID/hire" \ -H "Authorization: Bearer $PRAXIS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"candidate": {"kind": "member", "actor": "agent:agent_123"}, "request_id": "hire-support-1"}'candidate.kind is member only for now: a person or an agent that already exists in your organization and is not archived. request_id is required, and sending the same value again returns the first assignment instead of seating anyone twice. Expected: HTTP 201 and an assignment with position_id, actor, primary, and end_time null.
A just-created agent may not be on the organization roster yet; the call then returns 503 ACTOR_SYNCING (retryable). Wait 10 seconds and resend with the same request_id.
Failures:
- 409
POSITION_OCCUPIED: the position already has a holder. - 409
POSITION_FROZEN: the position is frozen. - 409
POSITION_CLOSED: the position is closed. - 404
ACTOR_NOT_FOUND: the actor is not in your organization, or is archived.
Concurrent positions
An actor can hold several positions, exactly one of them primary and the rest concurrent. The first assignment becomes the primary one; later ones default to concurrent. Control it with primary:
- Omitted: primary if the actor holds nothing, concurrent otherwise.
true: this one becomes primary, and the previous primary becomes concurrent.false: this one is concurrent; refused with 409PRIMARY_ASSIGNMENT_REQUIREDwhen the actor holds nothing yet.
curl -X POST "$BASE/workforce/v1/positions/$SECOND_POSITION_ID/hire" \ -H "Authorization: Bearer $PRAXIS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"candidate": {"kind": "member", "actor": "agent:agent_123"}, "primary": false, "request_id": "hire-support-2"}'Expected: HTTP 201 and primary false. GET /workforce/v1/actors/{actor} returns the primary position and every concurrent one, each with its department path, job, manager, duties, methods and objectives. To promote a concurrent assignment:
curl -X POST "$BASE/workforce/v1/assignments/$ASSIGNMENT_ID/make_primary" \ -H "Authorization: Bearer $PRAXIS_API_KEY"Only an organization owner or admin can call make_primary, not a department head; the previous primary becomes concurrent in the same step.
Replace a holder
replace_holder ends the current holder’s assignment and seats the successor in one step, so the position is never vacant in between:
curl -X POST "$BASE/workforce/v1/positions/$POSITION_ID/replace_holder" \ -H "Authorization: Bearer $PRAXIS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"successor": "agent:agent_456", "request_id": "replace-support-1"}'Expected: HTTP 201 and the successor’s new assignment. The old assignment gets end_reason replaced and its successor_assignment_id points at the new one. Nothing the predecessor learned or remembered passes to the successor: experience belongs to the actor, not the position. A vacant position returns 409 POSITION_VACANT; use hire instead.
Transfer
Move a current holder from its position to another vacant one: the old assignment ends as transferred, and the new one keeps the primary flag.
curl -X POST "$BASE/workforce/v1/assignments/$ASSIGNMENT_ID/transfer" \ -H "Authorization: Bearer $PRAXIS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"to_position_id": "pos_456"}'The target must be active and vacant, otherwise 409 POSITION_OCCUPIED, POSITION_FROZEN or POSITION_CLOSED. A transfer needs write access to both the department being left and the one being entered.
End an assignment
curl -X POST "$BASE/workforce/v1/assignments/$ASSIGNMENT_ID/terminate" \ -H "Authorization: Bearer $PRAXIS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"reason": "resigned"}'reason is one of resigned, dismissed, replaced, retired. The position becomes vacant and the assignment stays as history that cannot be revived. Assignments the system ends carry transferred (a transfer), position_closed (the position was closed) or actor_archived (the holder was archived).
After a primary assignment ends or is replaced and the actor still holds other positions, read GET /workforce/v1/actors/{actor} and check that one of them is primary; if none is, call make_primary on one of its assignments. Do not assume the primary flag moves on its own.
What an agent is told when it joins
When you seat an agent, the platform writes the position’s details into the agent’s memory, where it can recall them in later sessions. Members do not get this; only agents do:
| Event | What the agent is told |
|---|---|
| Joining (primary) | Department path, position name, job, level, manager position and who holds it, the positions that report to it; the position’s duties; its methods; the objectives it pursues and the key results it owns |
| Concurrent position | The same, and which position stays primary |
| Transfer | From which position to which, that the old duties and methods no longer apply, and the new position’s content |
| Leaving a position | Which position it left; any other positions it holds stay as they were |
| Holding no position at all | It has left the organization, and the duties and permissions the organization gave it end |
| Duties or methods revised | The new duties or methods |
| Objective set | The objective and the key results it owns (a department objective goes to the agents seated in the department, a position objective to its holder) |
| Objective graded | The objective has ended, with its result and score |
An agent holding the manager position is told when a new report joins. Duties and methods live on the position: revising a position (PATCH /workforce/v1/positions/{id}) changes only that position’s copy, and revising a job leaves positions already opened alone. To make an agent work to its position, write what it does and how into duties and methods, at most 4000 characters each.