Ejento AI API Documentation

website·Indexed 32 days ago

https://api.ejento.ai

Developer documentation for the Ejento AI platform, featuring guides and API references for building AI-powered chat applications. Includes detailed instructions on authentication via JWT and Azure AD, agent management, chat thread integration, corpora handling, and voice call API integration. Provides resources for managing permission sets, staging and publishing agents, and migrating to updated response and indexing APIs.

Tokens
89.1K
Snippets
306
Records
582
Agent score
50%

What's inside Ejento AI

  1. Overview of Ejento Workflow API capabilities

    The Ejento Workflow API provides a comprehensive set of endpoints to manage the lifecycle of AI workflows and their interactions. Key capabilities include:

    • Workflow Management: Create, retrieve, update, and delete workflows.
    • Execution: Stream AI-generated responses from specific workflows using Server-Sent Events (SSE), which can incorporate predefined data sources.
    • Conversation Tracking: Manage chat threads and individual chat responses associated with workflows.
    • Quality Assurance: Create and retrieve feedback and reviews for specific workflow responses.
    • Data Retrieval: Filter and paginate through workflows and their corresponding responses.
  2. Overview of Ejento AI Permission Sets

    Permission Sets are reusable access profiles that grant fine-grained, scoped control over organization resources: agents, corpora, and workflows. They define who can view, edit, delete, publish, and create these resources. Members inherit the combined access of all assigned permission sets, resolving to the union of their scopes.
  3. Retrieve a specific team by ID

    Use the 'Get a Team' endpoint to retrieve detailed information about a specific team using its team_id.
  4. Retrieve an Agent Evaluation Dataset

    Use the GET /api/v2/agents/{agent_id}/evaluation-datasets/{dataset_public_id} endpoint to retrieve detailed information about a specific evaluation dataset linked to an agent. This includes the dataset's name, description, associated questions, and metadata.
    curl -X GET "https://{{your-server-name}}/api/v2/agents/{agent_id}/evaluation-datasets/{dataset_public_id}"
      -H "Ocp-Apim-Subscription-Key: {{your-api-key}}"
      -H "Authorization: Bearer {{your-access-token}}"
  5. Understand the Agent Staging and Production workflow

    Agents utilize two distinct environments to prevent incomplete or broken configurations from reaching end-users:

    • Staging: A private workspace for editors to experiment, iterate, and prepare changes. Edits made here do not affect the live agent.
    • Production: The live configuration seen by end-users and agent integrations. Changes only reach Production after a formal publish action.
  6. User object schema for Agent lists

    The AgentList_User object provides details about users associated with agents, including their email and organizational affiliation.
    {
      "id": "integer (readOnly)",
      "email": "string (email format, max 254)",
      "first_name": "string (max 30, nullable)",
      "last_name": "string (max 30, nullable)",
      "organization": "integer (nullable)"
    }
  7. Understand Ejento token types and usage

    Ejento uses two distinct types of tokens that are not interchangeable. Both have a default validity of 7 days and must be sent in the Authorization: Bearer <token> header.

    1. Authentication App Access Token (JWT): Used exclusively for calling protected Authentication endpoints.
    2. Ejento Access Token: Used for all Ejento Platform APIs other than the authentication endpoints.
  8. Monitor agent analytics and costs

    Track the performance and operational cost of your AI agents:

    • Usage Overview: Use Agent Summary Statistics for general performance and usage metrics.
    • Traffic Tracking: Use Query Count Data to monitor the volume of queries handled by the agent.
    • Financial Monitoring: Use Cost & Token Usage to track token consumption and associated costs.
  9. Retrieve detailed agent evaluation run information

    Use the GET /api/v2/agents/{agent_id}/evaluation-runs/{evaluation_public_id} endpoint to retrieve detailed information about a specific evaluation run linked to an agent. This includes query results, evaluation metrics, and the LLM configuration used during the run.
    curl -X GET "https://<api-domain>/api/v2/agents/{agent_id}/evaluation-runs/{evaluation_public_id}" \
      -H "Ocp-Apim-Subscription-Key: {{your-api-key}}" \
      -H "Authorization: Bearer {{your-access-token}}"
  10. Manage Corpora using the Ejento AI API

    The Ejento AI API provides a suite of endpoints for managing corpora (collections of related documents). Available operations include:

    • Lifecycle Management: Create a new corpus, retrieve detailed metadata for a specific corpus using its corpus_id, update existing metadata, or permanently delete a corpus.
    • Discovery: Retrieve a comprehensive list of all available corpus entries.
    • Organization: Annotate or tag a corpus by adding or removing tags.
    • Agent Integration: Retrieve all agents linked to a specific corpus or identify the default primary agent associated with a corpus.
  11. Understand the Agent-Corpus Connection response schemas

    The /api/v2/agents/{agent_id}/corpora endpoint returns detailed information about agents and their associated corpora. The response utilizes several custom serializers to structure the data:

    • Agent Details (HVAgentCustomSerializer_V2): Contains the agent's id, agent_name, agent_type, instructions (array), domain, prefix_prompt, alias, is_deleted status, and llm_config.
    • Instructions (HVInstructionCustomSerializer_V2): Each instruction object includes the instruction text, id, created_by, modified_by, and timestamps (created_on, modified_on).
    • Indexing Mode (HVIndexingModeCustomSerializer_V2): Defines the indexing strategy used, with the mode property accepting one of three values: exhaustive, moderate, or basic.
    • Organization (HVOrganizationCustomSerializer_V2): Provides the organization's id and org_name.
    • Agent Type (HVAgentTypeCustomSerializer_V2): Provides the id and name of the agent type.
  12. Create a Recent Agent: Request Schema

    To create a Recent Agent via the POST /api/v2/agents/{agent_id}/recents endpoint, the request body must include several required fields. The agent configuration includes details about the user, agent type, instructions, project, and voice settings.
    {
      "id": "integer",
      "created_by": "string",
      "modified_by": "string",
      "created_on": "string (date-time)",
      "modified_on": "string (date-time)",
      "user": "AgentRecent_User object",
      "agent_type": "AgentRecent_AgentType object",
      "instructions": "AgentRecent_Instruction object",
      "project": "AgentRecent_Project object",
      "connected_tool_names": [],
      "tags": [],
      "character_voice": "AgentRecent_CharacterVoice object",
      "pattern": "Pattern object",
      "agent_name": "string",
      "industry_area": "string"
    }