Start Agent
Start Agent
POST
Start Agent
Send a message to a Gumloop agent and start an asynchronous interaction. Returns immediately with an
For example, if your URL is
interaction_id that you use to poll for results.
To continue an existing conversation, pass the interaction_id from a previous run. The new message is appended to that conversation’s history and the same interaction_id is reused. See Continuing a Conversation below.
Request
Headers
Body Parameters
The unique identifier of the agent to trigger. See Finding Your Agent ID below.
The message/prompt to send to the agent. This is a natural language string, not structured inputs.
Your Gumloop user ID. Required if
project_id is not provided.Your team (workspace) ID. Required if
user_id is not provided. Can be combined with user_id.The
interaction_id from a previous completed or failed interaction. When provided, the new message is appended to the existing conversation and the same interaction_id is reused. The previous interaction must be in a terminal state (COMPLETED or FAILED).Example Request
Response
Success (202 Accepted)
Unique identifier for this interaction. Use this to poll for results via the Retrieve Agent Status endpoint.
Always
"processing" on success, indicating the agent has started working.Error Responses
| Status Code | Error | Description |
|---|---|---|
| 400 | "gummie_id is required" | Missing gummie_id in the request body. |
| 400 | "message is required" | Missing message in the request body. |
| 400 | "project_id or user_id is required" | Missing both project_id and user_id. |
| 401 | "Authorization header with Bearer token or api_key query parameter is required" | No API key provided. |
| 403 | "Unauthorized" | Invalid API key. |
| 403 | "unauthorized_gummie_access" | User doesn’t have permission to access this agent. |
| 403 | "unauthorized_interaction_access" | User doesn’t have permission to access the specified interaction (continuation only). |
| 404 | "gummie_not_found" | No agent found with the provided gummie_id. |
| 404 | "interaction_not_found" | No interaction found with the provided interaction_id (continuation only). |
| 400 | "interaction_gummie_mismatch" | The interaction_id belongs to a different agent than the specified gummie_id (continuation only). |
| 409 | "interaction_not_in_terminal_state" | The interaction is still processing and cannot be continued yet. Wait until it reaches COMPLETED or FAILED (continuation only). |
Finding Your Agent ID
Thegummie_id is the unique identifier for your Gumloop agent. You can find it from the URL when viewing your agent:
https://www.gumloop.com/agents/abc123DEFghiJKL, then your gummie_id is abc123DEFghiJKL.
You can also find the agent ID on the agent’s settings/configuration page in the Gumloop app.
Complete Workflow
After starting an agent interaction, poll for results:Continuing a Conversation
To continue an existing conversation, include theinteraction_id from a previous run in your request body. The agent receives the full prior message history plus your new message, so it can respond with awareness of the earlier context.
Requirements
- The previous interaction must be in a terminal state (
COMPLETEDorFAILED) - The
gummie_idmust match the agent that owns the interaction - The caller must have access to the interaction
Continuation Flow
Example: Multi-Turn Conversation
Full Example: Start and Poll
Authentication Notes
- You can use either a Personal API Key or a Team API Key. See Authentication for details.
- If you authenticate with a personal API key and pass both
user_idandproject_id, the system verifies you are a member of the specified team before allowing the request. - The agent uses the credentials associated with the
user_idandproject_idprovided in the request.
The Python and JavaScript SDKs do not yet support agent triggering. Use the raw HTTP examples above until SDK support is added.
