Register an agent
curl --request POST \
--url https://app.egma.ai/v1/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Receptionist",
"agentPlatform": "retell"
}
'{
"result": "reused",
"agent": {
"id": "<string>",
"projectId": "<string>",
"name": "<string>",
"agentPlatform": "retell",
"platformAgentId": "<string>",
"retellModality": "voice",
"monitoringKeyPresent": true,
"monitoringApiKeyHint": "<string>",
"pullProductionCalls": true,
"monitoringConfigured": true,
"lastReceivedAt": "2023-11-07T05:31:56Z",
"archived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"connection": {
"id": "<string>",
"agentId": "<string>",
"projectId": "<string>",
"name": "<string>",
"agentPlatform": "retell",
"connectionType": "retell_chat_api",
"accessVariant": "retell_chat_api.api_key",
"modality": "voice",
"productLabel": "<string>",
"topology": "agent-dials-out",
"environment": "<string>",
"config": {},
"credentialPresent": true,
"credentialsHint": "<string>",
"archived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"result": "created",
"agent": {
"id": "<string>",
"projectId": "<string>",
"name": "<string>",
"agentPlatform": "retell",
"platformAgentId": "<string>",
"retellModality": "voice",
"monitoringKeyPresent": true,
"monitoringApiKeyHint": "<string>",
"pullProductionCalls": true,
"monitoringConfigured": true,
"lastReceivedAt": "2023-11-07T05:31:56Z",
"archived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"connection": {
"id": "<string>",
"agentId": "<string>",
"projectId": "<string>",
"name": "<string>",
"agentPlatform": "retell",
"connectionType": "retell_chat_api",
"accessVariant": "retell_chat_api.api_key",
"modality": "voice",
"productLabel": "<string>",
"topology": "agent-dials-out",
"environment": "<string>",
"config": {},
"credentialPresent": true,
"credentialsHint": "<string>",
"archived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Agents
Register an agent
Register an agent in your project, with an optional first connection. An existing provider identity can be reused. Check result to see whether Egma created an agent, added a connection, or reused one.
POST
/
v1
/
agents
Register an agent
curl --request POST \
--url https://app.egma.ai/v1/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Receptionist",
"agentPlatform": "retell"
}
'{
"result": "reused",
"agent": {
"id": "<string>",
"projectId": "<string>",
"name": "<string>",
"agentPlatform": "retell",
"platformAgentId": "<string>",
"retellModality": "voice",
"monitoringKeyPresent": true,
"monitoringApiKeyHint": "<string>",
"pullProductionCalls": true,
"monitoringConfigured": true,
"lastReceivedAt": "2023-11-07T05:31:56Z",
"archived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"connection": {
"id": "<string>",
"agentId": "<string>",
"projectId": "<string>",
"name": "<string>",
"agentPlatform": "retell",
"connectionType": "retell_chat_api",
"accessVariant": "retell_chat_api.api_key",
"modality": "voice",
"productLabel": "<string>",
"topology": "agent-dials-out",
"environment": "<string>",
"config": {},
"credentialPresent": true,
"credentialsHint": "<string>",
"archived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"result": "created",
"agent": {
"id": "<string>",
"projectId": "<string>",
"name": "<string>",
"agentPlatform": "retell",
"platformAgentId": "<string>",
"retellModality": "voice",
"monitoringKeyPresent": true,
"monitoringApiKeyHint": "<string>",
"pullProductionCalls": true,
"monitoringConfigured": true,
"lastReceivedAt": "2023-11-07T05:31:56Z",
"archived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"connection": {
"id": "<string>",
"agentId": "<string>",
"projectId": "<string>",
"name": "<string>",
"agentPlatform": "retell",
"connectionType": "retell_chat_api",
"accessVariant": "retell_chat_api.api_key",
"modality": "voice",
"productLabel": "<string>",
"topology": "agent-dials-out",
"environment": "<string>",
"config": {},
"credentialPresent": true,
"credentialsHint": "<string>",
"archived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Authorizations
bearerAuthsessionCookie
An Egma API key.
Query Parameters
Project to act in. A project-scoped API key already identifies its project.
Minimum string length:
1Body
application/json
Display name for the agent in Egma.
Example:
"Receptionist"
The product or framework that runs your agent.
Available options:
retell, livekit Choose one supported agentPlatform, connectionType, accessVariant, and modality from List supported connection options. Its fields describe config and its credentialFields describe credentials. Egma validates the complete combination before saving it.
Show child attributes
Show child attributes
Examples:
{
"name": "Retell chat",
"agentPlatform": "retell",
"connectionType": "retell_text_mode",
"accessVariant": "retell_text_mode.api_key",
"modality": "chat",
"platformAgentId": "agent_receptionist",
"config": { "retellAgentId": "agent_receptionist" },
"credentials": { "apiKey": "YOUR_RETELL_API_KEY" }
}
{
"name": "LiveKit voice",
"agentPlatform": "livekit",
"connectionType": "livekit_room",
"accessVariant": "livekit_room.project_credentials",
"modality": "voice",
"config": {
"url": "wss://example.livekit.cloud",
"agentName": "receptionist"
},
"credentials": {
"apiKey": "YOUR_LIVEKIT_API_KEY",
"apiSecret": "YOUR_LIVEKIT_API_SECRET"
}
}
{
"name": "LiveKit token endpoint",
"agentPlatform": "livekit",
"connectionType": "livekit_room",
"accessVariant": "livekit_room.customer_token_endpoint",
"modality": "voice",
"config": {
"tokenEndpoint": "https://voice.example.com/egma/token",
"agentName": "receptionist"
},
"credentials": {
"headers": "{\"Authorization\":\"Bearer YOUR_ENDPOINT_TOKEN\"}"
}
}