SendToAgentExecution
client.agents.sendToExecution(AgentSendToExecutionParams { agentExecutionId, agentMessage, userInput, wakeEvent } body, RequestOptionsoptions?): AgentSendToExecutionResponse
POST/gitpod.v1.AgentService/SendToAgentExecution
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."
SendToAgentExecution
import Gitpod from '@gitpod/sdk';
const client = new Gitpod({
bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});
const response = await client.agents.sendToExecution({
agentExecutionId: '6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35',
userInput: { text: { content: 'Generate a report based on the latest logs.' } },
});
console.log(response);{}Returns Examples
{}