Team objects and request preparation¶
Team management, members, conversations, and messages use their own identifiers and versions. Team members are agents, not Workspace users or role members.
Before you call this API¶
Obtain the product API base URL, personal access token, and Workspace ID from the same environment. Examples use BASE_URL, MOI_KEY, and WORKSPACE_ID; BASE_URL includes the environment’s product prefix. TEAM_ID comes from creation/list; CONTEXT_ID from team conversations; AGENT_WORKSPACE_ID and AGENT_ID from agent definitions.
Creation uses agent_team.create; reads use agent_team.read; profile, member, conversation, and message submission use agent_team.update; deletion uses agent_team.delete. Actual requests still pass current identity, Role, and formal authorization boundaries. owner_user_id does not locally bypass authorization.
Member references¶
Field |
Type |
Description |
|---|---|---|
|
string |
Agent definition Workspace; preserve the distinction between system and current Workspaces. |
|
string |
Agent ID within that definition Workspace. |
A team accepts applicable agents only from the current or system Workspace. Pairs must be unique; do not deduplicate by agent_id alone. Member reads also include team_id and created_at. data is directly an array without pagination.
Team object¶
Field |
Type |
Description |
|---|---|---|
|
string |
Team ID. |
|
string |
Workspace owning the team. |
|
string |
Saved owning user; does not replace request authorization. |
|
string |
Name. |
|
string |
Description; omitted when empty. |
|
string |
active, deleting, or deleted. |
|
integer |
Team profile/state version; used for updates and deletion. |
|
integer |
Member directory version; used to add and remove members. |
|
string |
RFC3339 timestamp. |
Both versions start at 1 for an empty team. Each actual initial member addition advances membership_version. Do not assume creation with initial members returns membership_version=1. Member changes are distinct from profile version changes; profile updates may also conflict with concurrent member changes.
Conversation object¶
Field |
Type |
Description |
|---|---|---|
|
string |
Owning Workspace and team. |
|
string |
Team context ID; used for renaming, sending, and reading messages. |
|
string |
Conversation name; may be empty. |
|
integer |
Conversation version, used for renaming. |
|
string |
Established provider session identifier; omitted when empty. |
|
string |
Source connection at creation; omitted when empty. |
|
string |
External user responsible for creation; omitted when empty. |
|
string |
MOI creator; omitted when empty. |
|
string |
Source connection for the latest update; omitted when empty. |
|
string |
External user responsible for the latest update; omitted when empty. |
|
string |
MOI user responsible for the latest update; omitted when empty. |
|
string |
Current active task; omitted when empty. |
|
string |
Pending occupancy identifier; omitted when empty. Not a message ID. |
|
string |
Definition Workspace and ID of the latest responder; omitted when empty. |
|
string |
RFC3339 timestamp. |
last_completed_task_id is not exported in the current HTTP object. Conversation creation does not start a model; renaming does not clear occupancy. The current 13 routes provide no basis for a conversation DELETE or cancellation command.
Lists and messages¶
Team, conversation, and message lists return data.items/total/limit/offset. total counts the current filtered scope. Stop normal pagination when offset + items.length reaches total or items is empty. Member-list data is directly an array.
Message field |
Type |
Description |
|---|---|---|
|
string |
Input messages prefer the original message_id; outputs may use snapshot identifiers. |
|
string |
Corresponding team context_id. |
|
string |
Owning task. |
|
string |
Actual executing agent identity. |
|
string |
user or agent. |
|
array (parts) |
Public content projection. |
|
string |
Output task state; omitted when empty. |
|
boolean |
Snapshot commit marker; true for agent output at completed. |
|
string |
RFC3339 timestamp. |
Message parts¶
The text example uses {"kind":"text","text":"整理资料"}. ToolPart also defines optional file/data/metadata; file uses uri, mimeType, and name. File accessibility, attachment ownership, and other part-union branches require separate verification. Open JSON fields do not guarantee reading arbitrary URIs.
Do not submit moi.runtime.managed_turn, ingress_receipt_id, or external_conversation_id in metadata; runtime manages these keys. The server writes selection information to agent_team_selection. Metadata does not grant additional client privileges.
Submission receipt¶
Field |
Type |
Description |
|---|---|---|
|
string |
Accepted task identifier; query its terminal state. |
|
object |
|
|
string |
explicit, single_member, continuity, default, clarify, or delegate. |
|
integer |
Membership version at selection. |
|
object |
Policy and model/capability summary saved at selection; contents vary by selection path. |