AppMage

Agent Configuration

This endpoint group provides methods for managing AI agent configurations, including creation, retrieval, updates, and deletion. It also offers utilities for managing agent avatars and listing available tools.

Endpoints

POST /api/rpc (Method: AgentConfigRpc.create)

  • Description: Creates a new agent configuration.
  • Request Body:
    {
      "method": "AgentConfigRpc.create",
      "params": {
        "name": "string",
        "model": "string",
        "description": "string",
        "agentClass": "string",
        "promptSource": "string",
        "promptText": "string",
        "promptFile": "string",
        "saveChatHistory": "boolean",
        "communicationModes": [
          "string"
        ],
        "personalityEnabled": "boolean",
        "personality": {
          "profession": "string",
          "style": "string",
          "gender": "string",
          "verbosity": "string",
          "defaultMood": "string",
          "adaptMood": "boolean",
          "notes": "string"
        },
        "voiceEnabled": "boolean",
        "ttsModel": "string",
        "selectedVoice": "string",
        "transcriptionModel": "string",
        "speakFirstOutgoing": "string",
        "allowOutgoingCalls": "boolean",
        "allowIncomingCalls": "boolean",
        "allowGroupParticipation": "boolean",
        "forkNewInstanceForCalls": "boolean",
        "enableDeepWork": "boolean",
        "capabilities": {
          "computer": {
            "browserAccess": "boolean",
            "terminalAccess": "boolean"
          },
          "search": {
            "enabled": "boolean",
            "connectors": [
              "string"
            ]
          },
          "documentation": {
            "accessWorkspace": "boolean",
            "modifyWorkspace": "boolean",
            "createOwn": "boolean"
          },
          "tasks": {
            "accessWorkspace": "boolean",
            "modifyWorkspace": "boolean",
            "createOwn": "boolean"
          }
        },
        "role": "string",
        "tools": [
          "string"
        ],
        "fileContext": "string",
        "messagingContactId": "string",
        "avatarUrl": "string",
        "realtime": "boolean",
        "projectId": "string"
      }
    }
  • Parameters:
    Name Type Required Description
    name String Yes The unique name of the agent configuration.
    model String Yes The AI model to be used by the agent.
    description String No A description of the agent's purpose.
    agentClass String No The class of the agent (e.g., AIAgent, RealtimeAIAgent).
    promptSource String No The source of the agent's prompt (e.g., "text", "file").
    promptText String No The initial prompt text for the agent.
    promptFile String No The file path for the agent's prompt if promptSource is "file".
    saveChatHistory Boolean No Whether to save the agent's chat history.
    communicationModes Array<String> No An array of communication modes the agent supports (e.g., "direct", "omnix_callback", "phoneCall").
    personalityEnabled Boolean No Whether the agent's personality is enabled.
    personality Object No Configuration for the agent's personality.
    personality.profession String No The agent's profession.
    personality.style String No The agent's communication style.
    personality.gender String No The agent's perceived gender.
    personality.verbosity String No The agent's verbosity level.
    personality.defaultMood String No The agent's default mood.
    personality.adaptMood Boolean No Whether the agent should adapt its mood.
    personality.notes String No Additional notes about the agent's personality.
    voiceEnabled Boolean No Whether voice capabilities are enabled for the agent.
    ttsModel String No The Text-to-Speech model to use.
    selectedVoice String No The specific voice to use for TTS.
    transcriptionModel String No The transcription model to use for voice input.
    speakFirstOutgoing String No Determines if the agent speaks first in outgoing calls.
    allowOutgoingCalls Boolean No Whether the agent is allowed to make outgoing calls.
    allowIncomingCalls Boolean No Whether the agent is allowed to receive incoming calls.
    allowGroupParticipation Boolean No Whether the agent can participate in group conversations.
    forkNewInstanceForCalls Boolean No Whether to fork a new agent instance for each call.
    enableDeepWork Boolean No Whether the agent can engage in deep work.
    capabilities Object No Configuration for the agent's capabilities.
    capabilities.computer.browserAccess Boolean No Whether the agent has browser access.
    capabilities.computer.terminalAccess Boolean No Whether the agent has terminal access.
    capabilities.search.enabled Boolean No Whether the agent has search capabilities.
    capabilities.search.connectors Array<String> No List of search connectors the agent can use.
    capabilities.documentation.accessWorkspace Boolean No Whether the agent can access the workspace documentation.
    capabilities.documentation.modifyWorkspace Boolean No Whether the agent can modify the workspace documentation.
    capabilities.documentation.createOwn Boolean No Whether the agent can create its own documentation.
    capabilities.tasks.accessWorkspace Boolean No Whether the agent can access tasks in the workspace.
    capabilities.tasks.modifyWorkspace Boolean No Whether the agent can modify tasks in the workspace.
    capabilities.tasks.createOwn Boolean No Whether the agent can create its own tasks.
    role String No The role of the agent.
    tools Array<String> No A list of tool names the agent can use.
    fileContext String No The file context for the agent.
    messagingContactId String No The ID of the messaging contact associated with the agent.
    avatarUrl String No The URL of the agent's avatar.
    realtime Boolean No Indicates if the agent operates in real-time.
    projectId String No The project ID the agent configuration belongs to. If an empty string "" is provided, the agent will be explicitly global. If not provided, it defaults to the context.projectId.
  • Response:
    {
      "success": true,
      "data": {
        "_id": "string",
        "name": "string",
        "description": "string",
        "agentClass": "string",
        "promptSource": "string",
        "promptText": "string",
        "promptFile": "string",
        "saveChatHistory": "boolean",
        "communicationModes": [
          "string"
        ],
        "personalityEnabled": "boolean",
        "personality": {
          "profession": "string",
          "style": "string",
          "gender": "string",
          "verbosity": "string",
          "defaultMood": "string",
          "adaptMood": "boolean",
          "notes": "string"
        },
        "voiceEnabled": "boolean",
        "ttsModel": "string",
        "selectedVoice": "string",
        "transcriptionModel": "string",
        "speakFirstOutgoing": "string",
        "allowOutgoingCalls": "boolean",
        "allowIncomingCalls": "boolean",
        "allowGroupParticipation": "boolean",
        "forkNewInstanceForCalls": "boolean",
        "enableDeepWork": "boolean",
        "capabilities": {
          "computer": {
            "browserAccess": "boolean",
            "terminalAccess": "boolean"
          },
          "search": {
            "enabled": "boolean",
            "connectors": [
              "string"
            ]
          },
          "documentation": {
            "accessWorkspace": "boolean",
            "modifyWorkspace": "boolean",
            "createOwn": "boolean"
          },
          "tasks": {
            "accessWorkspace": "boolean",
            "modifyWorkspace": "boolean",
            "createOwn": "boolean"
          }
        },
        "role": "string",
        "tools": [
          "string"
        ],
        "fileContext": "string",
        "messagingContactId": "string",
        "avatarUrl": "string",
        "realtime": "boolean",
        "userId": "string",
        "subscriptionId": "string",
        "createdAt": "Date",
        "updatedAt": "Date",
        "projectId": "string"
      }
    }
  • Example (cURL):
    curl -X POST https://api.example.com/api/rpc \
      -H "Content-Type: application/json" \
      -H "X-API-Key: YOUR_API_KEY" \
      -d '{
        "method": "AgentConfigRpc.create",
        "params": {
          "name": "My New Agent",
          "model": "gpt-4",
          "description": "A new agent for testing.",
          "projectId": "myProjectId"
        }
      }'

POST /api/rpc (Method: AgentConfigRpc.update)

  • Description: Updates an existing agent configuration.
  • Request Body:
    {
      "method": "AgentConfigRpc.update",
      "params": {
        "_id": "string",
        "name": "string",
        "description": "string",
        "agentClass": "string",
        "promptSource": "string",
        "promptText": "string",
        "promptFile": "string",
        "saveChatHistory": "boolean",
        "communicationModes": [
          "string"
        ],
        "personalityEnabled": "boolean",
        "personality": {
          "profession": "string",
          "style": "string",
          "gender": "string",
          "verbosity": "string",
          "defaultMood": "string",
          "adaptMood": "boolean",
          "notes": "string"
        },
        "voiceEnabled": "boolean",
        "ttsModel": "string",
        "selectedVoice": "string",
        "transcriptionModel": "string",
        "speakFirstOutgoing": "string",
        "allowOutgoingCalls": "boolean",
        "allowIncomingCalls": "boolean",
        "allowGroupParticipation": "boolean",
        "forkNewInstanceForCalls": "boolean",
        "enableDeepWork": "boolean",
        "capabilities": {
          "computer": {
            "browserAccess": "boolean",
            "terminalAccess": "boolean"
          },
          "search": {
            "enabled": "boolean",
            "connectors": [
              "string"
            ]
          },
          "documentation": {
            "accessWorkspace": "boolean",
            "modifyWorkspace": "boolean",
            "createOwn": "boolean"
          },
          "tasks": {
            "accessWorkspace": "boolean",
            "modifyWorkspace": "boolean",
            "createOwn": "boolean"
          }
        },
        "role": "string",
        "tools": [
          "string"
        ],
        "fileContext": "string"
      }
    }
  • Parameters:
    Name Type Required Description
    _id String Yes The unique identifier of the agent configuration to update.
    name String No The unique name of the agent configuration.
    description String No A description of the agent's purpose.
    agentClass String No The class of the agent (e.g., AIAgent, RealtimeAIAgent).
    promptSource String No The source of the agent's prompt (e.g., "text", "file").
    promptText String No The initial prompt text for the agent.
    promptFile String No The file path for the agent's prompt if promptSource is "file".
    saveChatHistory Boolean No Whether to save the agent's chat history.
    communicationModes Array<String> No An array of communication modes the agent supports (e.g., "direct", "omnix_callback", "phoneCall").
    personalityEnabled Boolean No Whether the agent's personality is enabled.
    personality Object No Configuration for the agent's personality.
    personality.profession String No The agent's profession.
    personality.style String No The agent's communication style.
    personality.gender String No The agent's perceived gender.
    personality.verbosity String No The agent's verbosity level.
    personality.defaultMood String No The agent's default mood.
    personality.adaptMood Boolean No Whether the agent should adapt its mood.
    personality.notes String No Additional notes about the agent's personality.
    voiceEnabled Boolean No Whether voice capabilities are enabled for the agent.
    ttsModel String No The Text-to-Speech model to use.
    selectedVoice String No The specific voice to use for TTS.
    transcriptionModel String No The transcription model to use for voice input.
    speakFirstOutgoing String No Determines if the agent speaks first in outgoing calls.
    allowOutgoingCalls Boolean No Whether the agent is allowed to make outgoing calls.
    allowIncomingCalls Boolean No Whether the agent is allowed to receive incoming calls.
    allowGroupParticipation Boolean No Whether the agent can participate in group conversations.
    forkNewInstanceForCalls Boolean No Whether to fork a new agent instance for each call.
    enableDeepWork Boolean No Whether the agent can engage in deep work.
    capabilities Object No Configuration for the agent's capabilities.
    capabilities.computer.browserAccess Boolean No Whether the agent has browser access.
    capabilities.computer.terminalAccess Boolean No Whether the agent has terminal access.
    capabilities.search.enabled Boolean No Whether the agent has search capabilities.
    capabilities.search.connectors Array<String> No List of search connectors the agent can use.
    capabilities.documentation.accessWorkspace Boolean No Whether the agent can access the workspace documentation.
    capabilities.documentation.modifyWorkspace Boolean No Whether the agent can modify the workspace documentation.
    capabilities.documentation.createOwn Boolean No Whether the agent can create its own documentation.
    capabilities.tasks.accessWorkspace Boolean No Whether the agent can access tasks in the workspace.
    capabilities.tasks.modifyWorkspace Boolean No Whether the agent can modify tasks in the workspace.
    capabilities.tasks.createOwn Boolean No Whether the agent can create its own tasks.
    role String No The role of the agent.
    tools Array<String> No A list of tool names the agent can use.
    fileContext String No The file context for the agent.
  • Response:
    {
      "success": true,
      "data": {
        "_id": "string",
        "name": "string",
        "description": "string",
        "agentClass": "string",
        "promptSource": "string",
        "promptText": "string",
        "promptFile": "string",
        "saveChatHistory": "boolean",
        "communicationModes": [
          "string"
        ],
        "personalityEnabled": "boolean",
        "personality": {
          "profession": "string",
          "style": "string",
          "gender": "string",
          "verbosity": "string",
          "defaultMood": "string",
          "adaptMood": "boolean",
          "notes": "string"
        },
        "voiceEnabled": "boolean",
        "ttsModel": "string",
        "selectedVoice": "string",
        "transcriptionModel": "string",
        "speakFirstOutgoing": "string",
        "allowOutgoingCalls": "boolean",
        "allowIncomingCalls": "boolean",
        "allowGroupParticipation": "boolean",
        "forkNewInstanceForCalls": "boolean",
        "enableDeepWork": "boolean",
        "capabilities": {
          "computer": {
            "browserAccess": "boolean",
            "terminalAccess": "boolean"
          },
          "search": {
            "enabled": "boolean",
            "connectors": [
              "string"
            ]
          },
          "documentation": {
            "accessWorkspace": "boolean",
            "modifyWorkspace": "boolean",
            "createOwn": "boolean"
          },
          "tasks": {
            "accessWorkspace": "boolean",
            "modifyWorkspace": "boolean",
            "createOwn": "boolean"
          }
        },
        "role": "string",
        "tools": [
          "string"
        ],
        "fileContext": "string",
        "messagingContactId": "string",
        "avatarUrl": "string",
        "realtime": "boolean",
        "userId": "string",
        "subscriptionId": "string",
        "createdAt": "Date",
        "updatedAt": "Date",
        "projectId": "string"
      }
    }
  • Example (cURL):
    curl -X POST https://api.example.com/api/rpc \
      -H "Content-Type: application/json" \
      -H "X-API-Key: YOUR_API_KEY" \
      -d '{
        "method": "AgentConfigRpc.update",
        "params": {
          "_id": "654321098765432109876543",
          "description": "Updated description for the agent."
        }
      }'

POST /api/rpc (Method: AgentConfigRpc.delete)

  • Description: Deletes an agent configuration.
  • Request Body:
    {
      "method": "AgentConfigRpc.delete",
      "params": {
        "_id": "string"
      }
    }
  • Parameters:
    Name Type Required Description
    _id String Yes The unique identifier of the agent configuration to delete.
  • Response:
    {
      "success": true,
      "data": {
        "success": "boolean"
      }
    }
  • Example (cURL):
    curl -X POST https://api.example.com/api/rpc \
      -H "Content-Type: application/json" \
      -H "X-API-Key: YOUR_API_KEY" \
      -d '{
        "method": "AgentConfigRpc.delete",
        "params": {
          "_id": "654321098765432109876543"
        }
      }'

POST /api/rpc (Method: AgentConfigRpc.getData)

  • Description: Retrieves agent configurations.
  • Request Body:
    {
      "method": "AgentConfigRpc.getData",
      "params": {
        "filter": {
          "projectId": "string"
        },
        "sort": {},
        "page": "number",
        "pageSize": "number"
      }
    }
  • Parameters:
    Name Type Required Description
    filter Object No An object to filter the agent configurations.
    filter.projectId String No Filters agents by project ID. Can be null for global agents.
    sort Object No An object to specify the sorting order.
    page Number No The page number for pagination (defaults to 1).
    pageSize Number No The number of items per page (defaults to 25).
  • Response:
    {
      "success": true,
      "data": {
        "data": [
          {
            "_id": "string",
            "name": "string",
            "description": "string",
            "agentClass": "string",
            "promptSource": "string",
            "promptText": "string",
            "promptFile": "string",
            "saveChatHistory": "boolean",
            "communicationModes": [
              "string"
            ],
            "personalityEnabled": "boolean",
            "personality": {
              "profession": "string",
              "style": "string",
              "gender": "string",
              "verbosity": "string",
              "defaultMood": "string",
              "adaptMood": "boolean",
              "notes": "string"
            },
            "voiceEnabled": "boolean",
            "ttsModel": "string",
            "selectedVoice": "string",
            "transcriptionModel": "string",
            "speakFirstOutgoing": "string",
            "allowOutgoingCalls": "boolean",
            "allowIncomingCalls": "boolean",
            "allowGroupParticipation": "boolean",
            "forkNewInstanceForCalls": "boolean",
            "enableDeepWork": "boolean",
            "capabilities": {
              "computer": {
                "browserAccess": "boolean",
                "terminalAccess": "boolean"
              },
              "search": {
                "enabled": "boolean",
                "connectors": [
                  "string"
                ]
              },
              "documentation": {
                "accessWorkspace": "boolean",
                "modifyWorkspace": "boolean",
                "createOwn": "boolean"
              },
              "tasks": {
                "accessWorkspace": "boolean",
                "modifyWorkspace": "boolean",
                "createOwn": "boolean"
              }
            },
            "role": "string",
            "tools": [
              "string"
            ],
            "fileContext": "string",
            "messagingContactId": "string",
            "avatarUrl": "string",
            "realtime": "boolean",
            "userId": "string",
            "subscriptionId": "string",
            "createdAt": "Date",
            "updatedAt": "Date",
            "projectId": "string"
          }
        ],
        "totalCount": "number"
      }
    }
  • Example (cURL):
    curl -X POST https://api.example.com/api/rpc \
      -H "Content-Type: application/json" \
      -H "X-API-Key: YOUR_API_KEY" \
      -d '{
        "method": "AgentConfigRpc.getData",
        "params": {
          "filter": {
            "projectId": "myProjectId"
          },
          "page": 1,
          "pageSize": 10
        }
      }'

POST /api/rpc (Method: AgentConfigRpc.findById)

  • Description: Retrieves a specific agent configuration by ID.
  • Request Body:
    {
      "method": "AgentConfigRpc.findById",
      "params": {
        "_id": "string"
      }
    }
  • Parameters:
    Name Type Required Description
    _id String Yes The unique identifier of the agent configuration.
  • Response:
    {
      "success": true,
      "data": {
        "_id": "string",
        "name": "string",
        "description": "string",
        "agentClass": "string",
        "promptSource": "string",
        "promptText": "string",
        "promptFile": "string",
        "saveChatHistory": "boolean",
        "communicationModes": [
          "string"
        ],
        "personalityEnabled": "boolean",
        "personality": {
          "profession": "string",
          "style": "string",
          "gender": "string",
          "verbosity": "string",
          "defaultMood": "string",
          "adaptMood": "boolean",
          "notes": "string"
        },
        "voiceEnabled": "boolean",
        "ttsModel": "string",
        "selectedVoice": "string",
        "transcriptionModel": "string",
        "speakFirstOutgoing": "string",
        "allowOutgoingCalls": "boolean",
        "allowIncomingCalls": "boolean",
        "allowGroupParticipation": "boolean",
        "forkNewInstanceForCalls": "boolean",
        "enableDeepWork": "boolean",
        "capabilities": {
          "computer": {
            "browserAccess": "boolean",
            "terminalAccess": "boolean"
          },
          "search": {
            "enabled": "boolean",
            "connectors": [
              "string"
            ]
          },
          "documentation": {
            "accessWorkspace": "boolean",
            "modifyWorkspace": "boolean",
            "createOwn": "boolean"
          },
          "tasks": {
            "accessWorkspace": "boolean",
            "modifyWorkspace": "boolean",
            "createOwn": "boolean"
          }
        },
        "role": "string",
        "tools": [
          "string"
        ],
        "fileContext": "string",
        "messagingContactId": "string",
        "avatarUrl": "string",
        "realtime": "boolean",
        "userId": "string",
        "subscriptionId": "string",
        "createdAt": "Date",
        "updatedAt": "Date",
        "projectId": "string"
      }
    }
  • Example (cURL):
    curl -X POST https://api.example.com/api/rpc \
      -H "Content-Type: application/json" \
      -H "X-API-Key: YOUR_API_KEY" \
      -d '{
        "method": "AgentConfigRpc.findById",
        "params": {
          "_id": "654321098765432109876543"
        }
      }'

POST /api/rpc (Method: AgentConfigRpc.getAvailableAgentTools)

  • Description: Gets a list of all available tools for agent configuration.
  • Request Body:
    {
      "method": "AgentConfigRpc.getAvailableAgentTools",
      "params": {}
    }
  • Parameters:
    Name Type Required Description
  • Response:
    {
      "success": true,
      "data": [
        {
          "value": "string",
          "label": "string"
        }
      ]
    }
  • Example (cURL):
    curl -X POST https://api.example.com/api/rpc \
      -H "Content-Type: application/json" \
      -H "X-API-Key: YOUR_API_KEY" \
      -d '{
        "method": "AgentConfigRpc.getAvailableAgentTools",
        "params": {}
      }'

POST /api/rpc (Method: AgentConfigRpc.getAvatarUploadKey)

  • Description: Gets an upload key for an agent's avatar.
  • Request Body:
    {
      "method": "AgentConfigRpc.getAvatarUploadKey",
      "params": {
        "agentConfigId": "string"
      }
    }
  • Parameters:
    Name Type Required Description
    agentConfigId String Yes The ID of the agent configuration for which to get an avatar upload key.
  • Response:
    {
      "success": true,
      "data": {
        "uploadKey": "string",
        "uploadUrl": "string",
        "maxFileSize": "number",
        "fileTypes": [
          "string"
        ]
      }
    }
  • Example (cURL):
    curl -X POST https://api.example.com/api/rpc \
      -H "Content-Type: application/json" \
      -H "X-API-Key: YOUR_API_KEY" \
      -d '{
        "method": "AgentConfigRpc.getAvatarUploadKey",
        "params": {
          "agentConfigId": "654321098765432109876543"
        }
      }'

POST /api/rpc (Method: AgentConfigRpc.updateAgentAvatar)

  • Description: Updates an agent's avatar path after successful upload.
  • Request Body:
    {
      "method": "AgentConfigRpc.updateAgentAvatar",
      "params": {
        "agentConfigId": "string",
        "uploadKey": "string"
      }
    }
  • Parameters:
    Name Type Required Description
    agentConfigId String Yes The ID of the agent configuration to update the avatar for.
    uploadKey String Yes The upload key received from getAvatarUploadKey.
  • Response:
    {
      "success": true,
      "data": {
        "_id": "string",
        "name": "string",
        "description": "string",
        "agentClass": "string",
        "promptSource": "string",
        "promptText": "string",
        "promptFile": "string",
        "saveChatHistory": "boolean",
        "communicationModes": [
          "string"
        ],
        "personalityEnabled": "boolean",
        "personality": {
          "profession": "string",
          "style": "string",
          "gender": "string",
          "verbosity": "string",
          "defaultMood": "string",
          "adaptMood": "boolean",
          "notes": "string"
        },
        "voiceEnabled": "boolean",
        "ttsModel": "string",
        "selectedVoice": "string",
        "transcriptionModel": "string",
        "speakFirstOutgoing": "string",
        "allowOutgoingCalls": "boolean",
        "allowIncomingCalls": "boolean",
        "allowGroupParticipation": "boolean",
        "forkNewInstanceForCalls": "boolean",
        "enableDeepWork": "boolean",
        "capabilities": {
          "computer": {
            "browserAccess": "boolean",
            "terminalAccess": "boolean"
          },
          "search": {
            "enabled": "boolean",
            "connectors": [
              "string"
            ]
          },
          "documentation": {
            "accessWorkspace": "boolean",
            "modifyWorkspace": "boolean",
            "createOwn": "boolean"
          },
          "tasks": {
            "accessWorkspace": "boolean",
            "modifyWorkspace": "boolean",
            "createOwn": "boolean"
          }
        },
        "role": "string",
        "tools": [
          "string"
        ],
        "fileContext": "string",
        "messagingContactId": "string",
        "avatarUrl": "string",
        "realtime": "boolean",
        "userId": "string",
        "subscriptionId": "string",
        "createdAt": "Date",
        "updatedAt": "Date",
        "projectId": "string"
      }
    }
  • Example (cURL):
    curl -X POST https://api.example.com/api/rpc \
      -H "Content-Type: application/json" \
      -H "X-API-Key: YOUR_API_KEY" \
      -d '{
        "method": "AgentConfigRpc.updateAgentAvatar",
        "params": {
          "agentConfigId": "654321098765432109876543",
          "uploadKey": "some-upload-key-abc-123"
        }
      }'