pub struct SquadsApi { /* private fields */ }Expand description
Squads — multi-agent groups that run a shared brief
Implementations§
Source§impl SquadsApi
impl SquadsApi
Sourcepub async fn add_squad_graph_edge(
&self,
squad_id: &str,
body: &AddSquadGraphEdgeRequest,
) -> Result<Map<String, Value>>
pub async fn add_squad_graph_edge( &self, squad_id: &str, body: &AddSquadGraphEdgeRequest, ) -> Result<Map<String, Value>>
Add graph edge
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
POST /api/v1/squads/{squadId}/graph/edges
Sourcepub async fn add_squad_graph_node(
&self,
squad_id: &str,
body: &AddSquadGraphNodeRequest,
) -> Result<Map<String, Value>>
pub async fn add_squad_graph_node( &self, squad_id: &str, body: &AddSquadGraphNodeRequest, ) -> Result<Map<String, Value>>
Add graph node
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
POST /api/v1/squads/{squadId}/graph/nodes
Sourcepub async fn cancel_squad_run(
&self,
squad_id: &str,
team_run_id: &str,
) -> Result<CancelSquadRunResponse>
pub async fn cancel_squad_run( &self, squad_id: &str, team_run_id: &str, ) -> Result<CancelSquadRunResponse>
Cancel a squad run
Stops the orchestration loop first, then every non-terminal child run, and releases the chat state so the canvas does not stay locked on a run that was just killed.
Order matters and is not an implementation detail: killing children while the loop is still running makes it spawn more — two fresh child runs were measured within two minutes of a “successful” cancel.
cancelledCount is camelCase on the wire, unlike every neighbouring field. That is what the
server sends.
/api/v1/squads/* is the canonical surface; /api/v1/teams/* is the same handler under the
older noun.
POST /api/v1/squads/{squadId}/runs/{teamRunId}/cancel
Sourcepub async fn create(&self, body: &TeamCreate) -> Result<Team>
pub async fn create(&self, body: &TeamCreate) -> Result<Team>
Create a squad
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
POST /api/v1/squads
Sourcepub async fn delete(&self, squad_id: &str) -> Result<DeleteSquadResponse>
pub async fn delete(&self, squad_id: &str) -> Result<DeleteSquadResponse>
Delete squad
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
DELETE /api/v1/squads/{squadId}
Sourcepub async fn delete_squad_graph_edge(
&self,
squad_id: &str,
edge_id: &str,
) -> Result<DeleteSquadGraphEdgeResponse>
pub async fn delete_squad_graph_edge( &self, squad_id: &str, edge_id: &str, ) -> Result<DeleteSquadGraphEdgeResponse>
Remove edge
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
DELETE /api/v1/squads/{squadId}/graph/edges/{edgeId}
Sourcepub async fn delete_squad_graph_node(
&self,
squad_id: &str,
agent_id: &str,
) -> Result<DeleteSquadGraphNodeResponse>
pub async fn delete_squad_graph_node( &self, squad_id: &str, agent_id: &str, ) -> Result<DeleteSquadGraphNodeResponse>
Remove node
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
DELETE /api/v1/squads/{squadId}/graph/nodes/{agentId}
Sourcepub async fn get(&self, squad_id: &str) -> Result<Team>
pub async fn get(&self, squad_id: &str) -> Result<Team>
Get squad
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
GET /api/v1/squads/{squadId}
Sourcepub async fn get_squad_chat_history(
&self,
squad_id: &str,
params: &GetSquadChatHistoryParams,
) -> Result<GetSquadChatHistoryResponse>
pub async fn get_squad_chat_history( &self, squad_id: &str, params: &GetSquadChatHistoryParams, ) -> Result<GetSquadChatHistoryResponse>
Get squad chat history
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
GET /api/v1/squads/{squadId}/chat
Sourcepub async fn get_squad_graph(
&self,
squad_id: &str,
) -> Result<GetSquadGraphResponse>
pub async fn get_squad_graph( &self, squad_id: &str, ) -> Result<GetSquadGraphResponse>
Get full squad graph
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
GET /api/v1/squads/{squadId}/graph
Sourcepub async fn get_squad_graph_node(
&self,
squad_id: &str,
agent_id: &str,
) -> Result<TeamGraphNode>
pub async fn get_squad_graph_node( &self, squad_id: &str, agent_id: &str, ) -> Result<TeamGraphNode>
Get graph node
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
GET /api/v1/squads/{squadId}/graph/nodes/{agentId}
Sourcepub async fn get_squad_run(
&self,
squad_id: &str,
team_run_id: &str,
) -> Result<TeamRunDetail>
pub async fn get_squad_run( &self, squad_id: &str, team_run_id: &str, ) -> Result<TeamRunDetail>
Get specific squad run
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
GET /api/v1/squads/{squadId}/runs/{teamRunId}
Sourcepub async fn get_squad_run_messages(
&self,
squad_id: &str,
team_run_id: &str,
) -> Result<GetSquadRunMessagesResponse>
pub async fn get_squad_run_messages( &self, squad_id: &str, team_run_id: &str, ) -> Result<GetSquadRunMessagesResponse>
Get squad run messages
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
GET /api/v1/squads/{squadId}/runs/{teamRunId}/messages
Sourcepub async fn list(&self) -> Result<ListSquadsResponse>
pub async fn list(&self) -> Result<ListSquadsResponse>
List squads
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
GET /api/v1/squads
Sourcepub async fn list_squad_graph_edges(
&self,
squad_id: &str,
) -> Result<ListSquadGraphEdgesResponse>
pub async fn list_squad_graph_edges( &self, squad_id: &str, ) -> Result<ListSquadGraphEdgesResponse>
List graph edges
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
GET /api/v1/squads/{squadId}/graph/edges
Sourcepub async fn list_squad_graph_nodes(
&self,
squad_id: &str,
) -> Result<ListSquadGraphNodesResponse>
pub async fn list_squad_graph_nodes( &self, squad_id: &str, ) -> Result<ListSquadGraphNodesResponse>
List graph nodes
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
GET /api/v1/squads/{squadId}/graph/nodes
Sourcepub async fn list_squad_runs(
&self,
squad_id: &str,
) -> Result<ListSquadRunsResponse>
pub async fn list_squad_runs( &self, squad_id: &str, ) -> Result<ListSquadRunsResponse>
List runs for a squad
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
GET /api/v1/squads/{squadId}/runs
Sourcepub async fn start_squad_run(
&self,
squad_id: &str,
body: &StartSquadRunRequest,
) -> Result<StartSquadRunResponse>
pub async fn start_squad_run( &self, squad_id: &str, body: &StartSquadRunRequest, ) -> Result<StartSquadRunResponse>
Start a squad run
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
POST /api/v1/squads/{squadId}/runs
Sourcepub fn stream_squad_chat_events(
&self,
squad_id: &str,
params: &StreamSquadChatEventsParams,
) -> EventStream
pub fn stream_squad_chat_events( &self, squad_id: &str, params: &StreamSquadChatEventsParams, ) -> EventStream
SSE stream for squad chat
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
GET /api/v1/squads/{squadId}/chat/events
Required scopes: events:read.
Returns a server-sent event stream.
Sourcepub fn stream_squad_run_events(
&self,
squad_id: &str,
run_id: &str,
) -> EventStream
pub fn stream_squad_run_events( &self, squad_id: &str, run_id: &str, ) -> EventStream
Stream squad run events (SSE)
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
GET /api/v1/squads/{squadId}/runs/{runId}/events
Required scopes: events:read.
Returns a server-sent event stream.
Sourcepub async fn update(&self, squad_id: &str, body: &TeamUpdate) -> Result<Team>
pub async fn update(&self, squad_id: &str, body: &TeamUpdate) -> Result<Team>
Update squad
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
PUT /api/v1/squads/{squadId}
Sourcepub async fn update_squad_graph_node(
&self,
squad_id: &str,
agent_id: &str,
body: &UpdateSquadGraphNodeRequest,
) -> Result<Map<String, Value>>
pub async fn update_squad_graph_node( &self, squad_id: &str, agent_id: &str, body: &UpdateSquadGraphNodeRequest, ) -> Result<Map<String, Value>>
Update graph node
/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the
older noun: the server rewrites the leading path segment before dispatch, so the two are one
endpoint and cannot drift apart.
PATCH /api/v1/squads/{squadId}/graph/nodes/{agentId}