Invoke agents and manage sessions¶
Invoke agents from an MCP client or another agent, and create, query, and update invocation sessions. This page does not configure the agent itself, its model, or its tools.
Prerequisites¶
Prepare credentials that can access the target workspace and the target agent ID. For service endpoints, authentication, and general request formats, see Prepare to call an API.
Before invocation, you can get the agent invocation instructions. If you need to persist or maintain a session, retain its ID after creating it.
Call sequence¶
First get agent invocation instructions to confirm invocation information for the target agent.
Choose invocation from an MCP client or from another agent based on the caller.
To manage context separately, create a session and retain its ID to query, update, or read messages.
After invoking or updating, query session details and messages to confirm observable session results.
API operations¶
Get invocation information and invoke an agent¶
What you need to do |
API operation |
Use it when |
|---|---|---|
Get agent invocation instructions |
Confirm target-agent invocation information before calling it. |
|
Invoke from an MCP client |
The caller is an MCP client. |
|
Invoke from another agent |
The caller is another agent. |
Create and maintain sessions¶
What you need to do |
API operation |
Use it when |
|---|---|---|
Create a session |
You need a session ID to manage context continuously. |
|
List sessions |
Select or confirm a target session. |
|
Get session details |
View current information for one session. |
|
List session messages |
View messages in a session. |
|
Update a session |
You have the session ID and need to modify the session. |
Confirm the result¶
The invocation action page defines the specific result after invocation. After creating or updating a session, use Get session details and List session messages to confirm session content.