Reminix TypeScript SDK - v0.7.1
    Preparing search index...
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Chat with an agent

      Have a conversational interaction with an agent. This endpoint maintains conversation context through the messages array, allowing for multi-turn conversations.

      Use cases:*

      • Customer support chatbots
      • AI assistants with memory
      • Multi-step question answering
      • Conversational agents that need context

      Message format:* Follows OpenAI-compliant message structure with support for:

      • system, user, assistant, and tool roles
      • Multimodal content (text + images)
      • Tool/function calling

      Streaming:* Set stream: true in the request body to receive Server-Sent Events (SSE) stream with incremental chunks. Perfect for ChatGPT-like real-time chat interfaces.

      Parameters

      • name: string

        Unique, URL-safe agent name within the project

      • request: {
            context?: {
                conversation_id?: string;
                custom?: { [key: string]: unknown };
                user_id?: string;
            };
            messages: {
                content: | string
                | { [key: string]: unknown }
                | {
                    image_url?: { url: string };
                    text?: string;
                    type: "text" | "image_url";
                }[];
                name?: string;
                role: "assistant"
                | "system"
                | "user"
                | "tool";
                tool_call_id?: string;
            }[];
            stream: boolean;
        }

        Request body

        • Optionalcontext?: {
              conversation_id?: string;
              custom?: { [key: string]: unknown };
              user_id?: string;
          }
          • Optionalconversation_id?: string

            ID to track multi-turn conversations

          • Optionalcustom?: { [key: string]: unknown }

            Additional custom context fields

          • Optionaluser_id?: string

            ID of the user making the request

        • messages: {
              content:
                  | string
                  | { [key: string]: unknown }
                  | {
                      image_url?: { url: string };
                      text?: string;
                      type: "text" | "image_url";
                  }[];
              name?: string;
              role: "assistant"
              | "system"
              | "user"
              | "tool";
              tool_call_id?: string;
          }[]

          Conversation history. Must include at least one message.

        • stream: boolean

          Whether to stream the response as SSE.

          false
          

      Returns Promise<
          {
              message: {
                  content: unknown;
                  role: "assistant";
                  tool_calls?: {
                      function: { arguments: string; name: string };
                      id: string;
                      type: "function";
                  }[];
              };
          },
      >

      Chat response successful

      const request: Request = {
      messages: [],
      stream: false,
      context: "example"
      };

      const result = await client.agents.chat(
      "example",
      request
      );
      console.log(result);

      Bad Request - Invalid request body

      Unauthorized - Invalid or missing API key

      Agent or deployment not found

      Internal Server Error

      If a network error occurs

    • Invoke an agent

      Execute a one-shot task with an agent. This endpoint is designed for task-oriented operations where you provide input and receive a complete output.

      Use cases:*

      • Data analysis and processing
      • Content generation (with streaming for long outputs)
      • One-time operations that don't require conversation history
      • API-like operations

      Streaming:* Set stream: true in the request body to receive Server-Sent Events (SSE) stream with incremental chunks. Useful for long-running tasks or real-time progress updates.

      Parameters

      • name: string

        Unique, URL-safe agent name within the project

      • request: {
            context?: {
                conversation_id?: string;
                custom?: { [key: string]: unknown };
                user_id?: string;
            };
            input: { [key: string]: unknown };
            stream: boolean;
        }

        Request body

        • Optionalcontext?: {
              conversation_id?: string;
              custom?: { [key: string]: unknown };
              user_id?: string;
          }
          • Optionalconversation_id?: string

            ID to track multi-turn conversations

          • Optionalcustom?: { [key: string]: unknown }

            Additional custom context fields

          • Optionaluser_id?: string

            ID of the user making the request

        • input: { [key: string]: unknown }

          Input data for the agent. Structure depends on agent implementation.

        • stream: boolean

          Whether to stream the response as SSE.

          false
          

      Returns Promise<{ output?: unknown }>

      Agent invocation successful

      const request: Request = {
      input: {},
      stream: false,
      context: "example"
      };

      const result = await client.agents.invoke(
      "example",
      request
      );
      console.log(result);

      Bad Request - Invalid request body

      Unauthorized - Invalid or missing API key

      Agent or deployment not found

      Internal Server Error

      If a network error occurs