Skip to main content
POST
/
action
/
invoke_agent
Invoke Agent
curl --request POST \
  --url https://api-lr.agent.ai/v1/action/invoke_agent \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "deepseek-r1",
  "user_input": "who created you?",
  "run_id": "a1b2c3d4e5f67890"
}
'
{ "response": "AI agents are autonomous entities that use artificial intelligence to perceive their environment...", "status": 200, "run_id": "f47ac10b58cc4372a5670e02b2c3d479" }

Authorizations

Authorization
string
header
required

Bearer token from your account (https://agent.ai/user/integrations#api)

Body

application/json
id
string
required

The agent ID or human-readable slug.

Example:

"deepseek-r1"

user_input
string
required

The prompt or input text for the agent. For workflow agents this maps to the primary input field. For knowledge agents this is the chat message.

Example:

"who created you?"

run_id
string

Optional. For knowledge agents only: pass a run_id from a previous invocation to resume that conversation. Omit to start a new conversation.

Example:

"a1b2c3d4e5f67890"

Response

Agent invocation result

status
integer<int32>

HTTP status code

Example:

200

response
string

The agent's response text.

run_id
string

Unique run identifier. For knowledge agents, pass this back as run_id to resume the conversation.