Agents
agents
Methods
Creates a token for conversation access with a specific agent run.
This method generates a temporary token that can be used to securely connect to an ongoing agent conversation, for example in a web UI.
Examples
Create a token to join an agent run conversation in a front-end application:
agentExecutionId: "6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35"
Creates a new prompt.
Use this method to:
- Define new prompts for templates or commands
- Set up organization-wide prompt libraries
Deletes an agent run.
Use this method to:
- Clean up agent runs that are no longer needed
Examples
Delete an agent run by ID:
agentExecutionId: "6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35"
Deletes a prompt.
Use this method to:
- Remove unused prompts
Lists all agent runs matching the specified filter.
Use this method to track multiple agent runs and their associated resources. Results are ordered by their creation time with the newest first.
Examples
List agent runs by agent ID:
filter: agentIds: ["b8a64cfa-43e2-4b9d-9fb3-07edc63f5971"] pagination: pageSize: 10
Lists all prompts matching the specified criteria.
Use this method to find and browse prompts across your organization. Results are ordered by their creation time with the newest first.
Examples
List all prompts:
Retrieves all prompts with pagination.
pagination: pageSize: 10
Gets details about a specific agent run, including its metadata, specification, and status (phase, error messages, and usage statistics).
Use this method to:
- Monitor the run's progress
- Retrieve the agent's conversation URL
- Check if an agent run is actively producing output
Examples
Get agent run details by ID:
agentExecutionId: "6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35"
Gets details about a specific prompt including name, description, and prompt content.
Use this method to:
- Retrieve prompt details for editing
- Get prompt content for execution
Examples
Get prompt details:
promptId: "07e03a28-65a5-4d98-b532-8ea67b188048"
Sends user input to an active agent run.
This method is used to provide interactive or conversation-based input to an agent. The agent can respond with output blocks containing text, file changes, or tool usage requests.
Examples
Send a text message to an agent:
agentExecutionId: "6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35" userInput: text: content: "Generate a report based on the latest logs."
Starts (or triggers) an agent run using a provided agent.
Use this method to:
- Launch an agent based on a known agent
Examples
Start an agent with a project ID:
agentId: "b8a64cfa-43e2-4b9d-9fb3-07edc63f5971" codeContext: projectId: "2d22e4eb-31da-467f-882c-27e21550992f"
Stops an active agent execution.
Use this method to:
- Stop an agent that is currently running
- Prevent further processing or resource usage
Examples
Stop an agent execution by ID:
agentExecutionId: "6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35"
Updates an existing prompt.
Use this method to:
- Modify prompt content or metadata
- Change prompt type (template/command)
Domain types
AgentMode defines the operational mode of an agent