Get the agent
The agent’s name, personality, and autonomy switches. Defaults until somebody has edited anything.
GET
/agentAuthorization
AuthorizationBearer token · headerrequired`MEDIAN_KEY` from Settings under API, or an MCP OAuth access token. A key acts as the organization; a token acts as the person who approved it.
Responses
200The agent.
namestringpersonalitystringautoResolvebooleanWhether it may end conversations it finished on its own.
learnFromThreadsbooleanWhether resolved threads get read for knowledge suggestions.
suggestKnowledgebooleanWhether it may file knowledge and tool suggestions mid-conversation.
nightlySweepbooleanWhether the nightly sweep may resolve finished threads.
fileSignalsbooleanWhether it may file bugs and suggestions mid-conversation.
requireEmailbooleanWhether the widget asks for an email before a first message.
messagePreviewbooleanWhether the closed widget previews an unread reply on its button.
401The bearer token is missing, revoked, or expired.
errorobjectShow propertiesHide properties
codestringmessagestring403The token's person does not hold the role this needs.
errorobjectShow propertiesHide properties
codestringmessagestring429Too many requests. Wait the seconds in `Retry-After`. Limits depend on the plan. See [rate limits](/api/errors-and-limits#rate-limits).
errorobjectShow propertiesHide properties
codestringmessagestringRequest
curl -X GET "https://api.median.sh/v1/agent" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.median.sh/v1/agent", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});Response
{
"name": "string",
"personality": "string",
"autoResolve": true,
"learnFromThreads": true,
"suggestKnowledge": true,
"nightlySweep": true,
"fileSignals": true,
"requireEmail": true,
"messagePreview": true
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}