Skip to main content
Credal | Documentation

Search documentation

Type to search this documentation.

On this pageOverview

Fetch the status of an agent response

GET https://app.credal.ai/api/v1/agents/fetchAgentResponse

Polls for the status and result of a previously sent agent message using the job ID returned by sendMessage. Requires the api:agent:message:* scope.

Reference: https://docs.credal.ai/api-reference/v-1/api-reference/agents/fetch-response

  • Authorization header (bearer token, required) — Bearer authentication of the form Bearer <token>, where token is your auth token.
  • jobId (string, required)

Agent response status

  • agents_fetchResponse_Response_200

Invalid request

  • any

Unauthorized

  • any

Forbidden

  • any

Job not found

  • any

Internal server error

  • any
  • status (enum, required)
    • Allowed values: RUNNING
  • status (enum, required)
    • Allowed values: COMPLETED
  • result (AgentsFetchAgentResponseGetResponsesContentApplicationJsonSchemaOneOf1Result, required)
  • status (enum, required)
    • Allowed values: FAILED
  • errorMessage (string, required)

AgentsFetchAgentResponseGetResponsesContentApplicationJsonSchemaOneOf1Result

Section titled “AgentsFetchAgentResponseGetResponsesContentApplicationJsonSchemaOneOf1Result”
  • agentResponseText (string, required)

Response

JSON
{
  "status": "COMPLETED",
  "result": {
    "agentResponseText": "Here are the Q4 planning documents I found..."
  }
}

SDK Code

TypeScript
import { CredalClient } from "@credal/sdk";

async function main() {
    const client = new CredalClient({
        token: "YOUR_TOKEN_HERE",
    });
    await client.agents.fetchResponse({
        jobId: "jobId",
    });
}
main();
Python
from credal import CredalV1

client = CredalV1(
    token="YOUR_TOKEN_HERE",
)

client.agents.fetch_response(
    job_id="jobId",
)
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu