Skip to main content
POST
Error
Sends a message to an agent. The endpoint streams the model response. API keys must explicitly allow streaming when a streaming response is requested by the client.
Required API key scope: agents:run.

Path parameters

string
required
UUID of the agent.

Body parameters

string
required
User message for the agent. Maximum length is 32000 characters.
string
Existing conversation UUID. If omitted, Pharen starts a new conversation.
string
Optional model override. If omitted, the agent default model is used.
boolean
Whether to enable model reasoning when supported by the selected model.
boolean
Whether the agent should produce an artifact-oriented response.
string
Optional artifact category hint.
object
Optional JSON context from the caller’s current page.

Example body

Authorizations

Authorization
string
header
default:phk_your_api_key
required

Paste your Pharen API key without the Bearer prefix.

Path Parameters

agent_uuid
string<uuid>
required

Agent UUID.

Body

application/json
message
string
required
Example:

"Summarize the latest onboarding blockers."

conversation_id
string

Optional conversation identifier for continuing a thread.

context
object

Optional structured context for the agent.

Response

Agent response returned.

message
string
conversation_id
string
run_id
string