Agent Template

Manage Agent Templates

Listing available agent templates

get

Retrieves agent templates which can be later use as a base for custom agents.

Required scopes

  • ai.agent_read

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant name.

Note: The tenant name should always be provided in lowercase.

Query parameters
qstringOptional

A standard query parameter is used to search for specific values.

See: Standard Practices - Query parameter

pageSizestringOptional

The number of documents to be retrieved per page.

pageNumberstringOptional

The page number to be retrieved. The size of the pages should be specified by the pageSize parameter.

sortstringOptional

List of properties used to sort the results, separated by colons.

fieldsstringOptional

Fields to be returned in the response.

expandstring · enumOptional

Fields to be expanded in the response. It means that instead of the object IDs, the whole objects are returned in the response.

Possible values:
Header parameters
X-Total-CountbooleanOptional

Flag indicating whether the total number of retrieved results should be returned.

Accept-LanguagestringOptional

List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields.

  • If the header is set to a particular language or a list of languages, all localized fields are retrieved as strings.
  • If the header is set to *, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved in the default language defined in the Configuration Service.
Responses
200

List of available agent templates.

application/json
get
/ai-service/{tenant}/agentic/templates
GET /ai-service/{tenant}/agentic/templates HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "123",
    "name": {
      "en": "Support Agent"
    },
    "description": {
      "en": "Support agent template"
    },
    "userPrompt": "Use get-order tool to fetch order.",
    "templatePrompt": "You are an support agent which helps users with their requests, which using following tools: {{user_prompt}}",
    "type": "SUPPORT",
    "enabled": true,
    "tags": [
      "productivity"
    ],
    "icon": "fa-productivity",
    "mcpServers": [
      {
        "domain": "order",
        "type": "predefined",
        "tools": [
          "get-orders",
          "get-order"
        ]
      }
    ],
    "nativeTools": [
      {
        "type": "slack",
        "name": "Slack Tool",
        "config": {
          "teamId": "T0445953"
        }
      }
    ]
  }
]

Searching agent templates

post

Searches for agent templates based on the provided query.

Required scopes

  • ai.agent_read

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant name.

Note: The tenant name should always be provided in lowercase.

Query parameters
pageSizestringOptional

The number of documents to be retrieved per page.

pageNumberstringOptional

The page number to be retrieved. The size of the pages should be specified by the pageSize parameter.

sortstringOptional

List of properties used to sort the results, separated by colons.

fieldsstringOptional

Fields to be returned in the response.

expandstring · enumOptional

Fields to be expanded in the response. It means that instead of the object IDs, the whole objects are returned in the response.

Possible values:
Header parameters
X-Total-CountbooleanOptional

Flag indicating whether the total number of retrieved results should be returned.

Accept-LanguagestringOptional

List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields.

  • If the header is set to a particular language or a list of languages, all localized fields are retrieved as strings.
  • If the header is set to *, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved in the default language defined in the Configuration Service.
Body
qstringOptional

A standard query parameter is used to search for specific values.

See: Standard Practices - Query parameter

Responses
200

List of available agent templates.

application/json
post
/ai-service/{tenant}/agentic/templates/search
POST /ai-service/{tenant}/agentic/templates/search HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "q": "name:~Support"
}
[
  {
    "id": "123",
    "name": {
      "en": "Support Agent"
    },
    "description": {
      "en": "Support agent template"
    },
    "userPrompt": "Use get-order tool to fetch order.",
    "templatePrompt": "You are an support agent which helps users with their requests, which using following tools: {{user_prompt}}",
    "type": "SUPPORT",
    "enabled": true,
    "tags": [
      "productivity"
    ],
    "icon": "fa-productivity",
    "mcpServers": [
      {
        "domain": "order",
        "type": "predefined",
        "tools": [
          "get-orders",
          "get-order"
        ]
      }
    ],
    "nativeTools": [
      {
        "type": "slack",
        "name": "Slack Tool",
        "config": {
          "teamId": "T0445953"
        }
      }
    ]
  }
]

Creating agent instance based on a template

post

Creates an instance of the agent based of the given agent template.

Info: Only active templates can be cloned.

Required scopes

  • ai.agent_manage

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant name.

Note: The tenant name should always be provided in lowercase.

templateIdstringRequired
Header parameters
Content-LanguagestringOptional

List of languages in which localized fields in the request body are provided.

  • If the header is set to *, the localized fields should be provided as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is set to a specific language, the localized fields should be provided as strings.
  • If the header is empty, the endpoint will assume that the localized fields are provided in the default language defined in the Configuration Service.

Note: You can provide the localized fields only in languages defined in the Configuration Service. In case the fields are provided in languages that are not defined in the Configuration Service, the request is rejected.

Body
all ofOptional
Responses
201

ID of the created agent.

application/json
post
/ai-service/{tenant}/agentic/templates/{templateId}/agent
POST /ai-service/{tenant}/agentic/templates/{templateId}/agent HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 247

{
  "name": {
    "en": "Complaint Agent"
  },
  "description": {
    "de": "Agent which is responsible for reading emails and base on that resolve the customer's complaints"
  },
  "userPrompt": "Use get-order tool to fetch order.",
  "id": "a81bc81b-dead-4e5d-abff-90865d1e13b1"
}
{
  "id": "a81bc81b-dead-4e5d-abff-90865d1e13b1"
}

Last updated

Was this helpful?