Skip to main content
POST
{baseUrl}
/
api
/
agents
/
{agent_uuid}
/
chat
/
Error
A valid request URL is required to generate request examples
{
  "message": "<string>",
  "conversation_id": "<string>",
  "run_id": "<string>"
}
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

agent_uuid
string
required
UUID of the agent.

Body parameters

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

Example body

{
  "message": "Summarize the open tasks for this workspace.",
  "enable_thinking": true
}

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