Console Login

API Reference

Classes

AmazonBedrockSupportedModels

Initializers

using Xpander.AI.Sdk;

new AmazonBedrockSupportedModels();

Constants

Name Type Description
AnthropicClaude35Sonnet20240620 string No description.
AnthropicClaude3Haiku20240307 string No description.
CohereCommandR string No description.
CohereCommandRPlus string No description.
MetaLlama31405bInstruct string No description.
MetaLlama3170bInstruct string No description.
MetaLlama318bInstruct string No description.
MistralMistralLarge2402 string No description.
MistralMistralLarge2407 string No description.
MistralMistralSmall2402 string No description.

AnthropicClaude35Sonnet20240620Required
public string AnthropicClaude35Sonnet20240620 { get; }
  • Type: string

AnthropicClaude3Haiku20240307Required
public string AnthropicClaude3Haiku20240307 { get; }
  • Type: string

CohereCommandRRequired
public string CohereCommandR { get; }
  • Type: string

CohereCommandRPlusRequired
public string CohereCommandRPlus { get; }
  • Type: string

MetaLlama31405bInstructRequired
public string MetaLlama31405bInstruct { get; }
  • Type: string

MetaLlama3170bInstructRequired
public string MetaLlama3170bInstruct { get; }
  • Type: string

MetaLlama318bInstructRequired
public string MetaLlama318bInstruct { get; }
  • Type: string

MistralMistralLarge2402Required
public string MistralMistralLarge2402 { get; }
  • Type: string

MistralMistralLarge2407Required
public string MistralMistralLarge2407 { get; }
  • Type: string

MistralMistralSmall2402Required
public string MistralMistralSmall2402 { get; }
  • Type: string

NvidiaNIMSupportedModels

Initializers

using Xpander.AI.Sdk;

new NvidiaNIMSupportedModels();

Constants

Name Type Description
Llama3170bInstruct string No description.

Llama3170bInstructRequired
public string Llama3170bInstruct { get; }
  • Type: string

OpenAISupportedModels

Initializers

using Xpander.AI.Sdk;

new OpenAISupportedModels();

Constants

Name Type Description
Gpt4 string No description.
Gpt4O string No description.
Gpt4OMini string No description.

Gpt4Required
public string Gpt4 { get; }
  • Type: string

Gpt4ORequired
public string Gpt4O { get; }
  • Type: string

Gpt4OMiniRequired
public string Gpt4OMini { get; }
  • Type: string

ToolResponse

Initializers

using Xpander.AI.Sdk;

new ToolResponse(string ToolCallId, string Role, string Name, string ResponseMessage, Newtonsoft.Json.Linq.JObject FilteredTool, string PayloadRequest, object LocalTool = null);
Name Type Description
ToolCallId string - The ID of the tool call.
Role string - The role in the response.
Name string - The name of the tool.
ResponseMessage string - The response message from the tool.
FilteredTool Newtonsoft.Json.Linq.JObject - The filtered tool object.
PayloadRequest string - The request payload that sent to tool.
LocalTool object No description.

ToolCallIdRequired
  • Type: string

The ID of the tool call.


RoleRequired
  • Type: string

The role in the response.


NameRequired
  • Type: string

The name of the tool.


ResponseMessageRequired
  • Type: string

The response message from the tool.


FilteredToolRequired
  • Type: Newtonsoft.Json.Linq.JObject

The filtered tool object.


PayloadRequestRequired
  • Type: string

The request payload that sent to tool.


LocalToolOptional
  • Type: object

Methods

Name Description
ToJSON Converts the ToolResponse instance to a JSON object.

ToJSON
private Newtonsoft.Json.Linq.JObject ToJSON()

Converts the ToolResponse instance to a JSON object.

Static Functions

Name Description
FromJSON Creates a ToolResponse instance from a JSON object.

FromJSON
using Xpander.AI.Sdk;

ToolResponse.FromJSON(object Json);

Creates a ToolResponse instance from a JSON object.

JsonRequired
  • Type: object

The JSON object to create the instance from.


Properties

Name Type Description
RawResponse object Gets the response message.
FilteredTool Newtonsoft.Json.Linq.JObject The filtered tool object.
Name string The name of the tool.
PayloadRequest string The request payload that sent to tool.
ResponseMessage string The response message from the tool.
Role string The role in the response.
ToolCallId string The ID of the tool call.
LocalTool object No description.

RawResponseRequired
public object RawResponse { get; }
  • Type: object

Gets the response message.


FilteredToolRequired
public Newtonsoft.Json.Linq.JObject FilteredTool { get; }
  • Type: Newtonsoft.Json.Linq.JObject

The filtered tool object.


NameRequired
public string Name { get; }
  • Type: string

The name of the tool.


PayloadRequestRequired
public string PayloadRequest { get; }
  • Type: string

The request payload that sent to tool.


ResponseMessageRequired
public string ResponseMessage { get; }
  • Type: string

The response message from the tool.


RoleRequired
public string Role { get; }
  • Type: string

The role in the response.


ToolCallIdRequired
public string ToolCallId { get; }
  • Type: string

The ID of the tool call.


LocalToolOptional
public object LocalTool { get; }
  • Type: object

XpanderClient

Class representing the Xpander client.

Initializers

using Xpander.AI.Sdk;

new XpanderClient(string AgentKey, string AgentUrl, LLMProvider LlmProvider, ILocalTool[] LocalTools = null);
Name Type Description
AgentKey string - The API key for the agent.
AgentUrl string - The URL for the agent.
LlmProvider LLMProvider - The LLM provider to use.
LocalTools ILocalTool[] No description.

AgentKeyRequired
  • Type: string

The API key for the agent.


AgentUrlRequired
  • Type: string

The URL for the agent.


LlmProviderRequired

The LLM provider to use.


LocalToolsOptional

Methods

Name Description
AddLocalTools No description.
LoadXpanderTools Loads the tools available from the Xpander agent.
Tools Retrieves the tools for the current or specified LLM provider.
XpanderSingleToolInvoke Invokes a single tool with the given tool ID and payload.
XpanderToolCall Invokes the tools based on the tool selector response.

AddLocalTools
private void AddLocalTools(ILocalTool[] Tools)
ToolsRequired

LoadXpanderTools
private object[] LoadXpanderTools()

Loads the tools available from the Xpander agent.

Tools
private object Tools(LLMProvider LlmProvider = null)

Retrieves the tools for the current or specified LLM provider.

LlmProviderOptional

(Optional) The LLM provider to use.


XpanderSingleToolInvoke
private string XpanderSingleToolInvoke(string ToolId, object Payload = null)

Invokes a single tool with the given tool ID and payload.

ToolIdRequired
  • Type: string

The ID of the tool to invoke.


PayloadOptional
  • Type: object

The payload to pass to the tool.


XpanderToolCall
private ToolResponse[] XpanderToolCall(object ToolSelectorResponse, string LlmProvider = null)

Invokes the tools based on the tool selector response.

ToolSelectorResponseRequired
  • Type: object

The response from the tool selector.


LlmProviderOptional
  • Type: string

(Optional) The LLM provider to use.


Properties

Name Type Description
ValidProviders string[] Provides a list of valid LLM providers.
ToolsNamesMapping System.Collections.Generic.IDictionary Retrieves the tool names mapping for the current LLM provider.
AgentKey string No description.
AgentUrl string No description.
LocalTools ILocalTool[] No description.
ToolsCache object No description.

ValidProvidersRequired
public string[] ValidProviders { get; }
  • Type: string[]

Provides a list of valid LLM providers.


ToolsNamesMappingRequired
public System.Collections.Generic.IDictionary<string, string> ToolsNamesMapping { get; }
  • Type: System.Collections.Generic.IDictionary

Retrieves the tool names mapping for the current LLM provider.


AgentKeyRequired
public string AgentKey { get; }
  • Type: string

AgentUrlRequired
public string AgentUrl { get; }
  • Type: string

LocalToolsRequired
public ILocalTool[] LocalTools { get; }

ToolsCacheRequired
public object ToolsCache { get; }
  • Type: object

Protocols

IBedrockTool

Interface representing a Bedrock tool.

Properties

Name Type Description
ToolSpec IBedrockToolSpec The tool specification of the Bedrock tool.
Execute object Function to execute the Bedrock tool.

ToolSpecRequired
public IBedrockToolSpec ToolSpec { get; set; }

The tool specification of the Bedrock tool.


ExecuteOptional
public object Execute { get; set; }
  • Type: object

Function to execute the Bedrock tool.


IBedrockToolOutput

Properties

Name Type Description
ToolSpec IBedrockToolSpec The tool specification of the Bedrock tool.
Execute object Function to execute the Bedrock tool.

ToolSpecRequired
public IBedrockToolSpec ToolSpec { get; }

The tool specification of the Bedrock tool.


ExecuteOptional
public object Execute { get; }
  • Type: object

Function to execute the Bedrock tool.


IBedrockToolSpec

Interface representing a Bedrock tool specification.

Properties

Name Type Description
Description string The description of the Bedrock tool.
InputSchema IBedrockToolSpecInputSchema Input schema of the Bedrock tool.
Name string The name of the Bedrock tool.

DescriptionRequired
public string Description { get; set; }
  • Type: string

The description of the Bedrock tool.


InputSchemaRequired
public IBedrockToolSpecInputSchema InputSchema { get; set; }

Input schema of the Bedrock tool.


NameRequired
public string Name { get; set; }
  • Type: string

The name of the Bedrock tool.


IBedrockToolSpecInputSchema

Interface representing the input schema for a Bedrock tool specification.

Properties

Name Type Description
Json System.Collections.Generic.IDictionaryIToolParameter> JSON schema of the tool parameters.

JsonRequired
public System.Collections.Generic.IDictionary<string, IToolParameter> Json { get; set; }
  • Type: System.Collections.Generic.IDictionaryIToolParameter>

JSON schema of the tool parameters.


ILLMProviderHandler

Interface representing a LLM (Large Language Model) provider handler.

Methods

Name Description
GetTools Retrieves tools.
InvokeTools Invokes tools based on the tool selector response.
SingleToolInvoke Invokes a single tool with the provided payload.

GetTools
private object[] GetTools(bool Functionize = null)

Retrieves tools.

FunctionizeOptional
  • Type: bool

Whether to functionize the tools.


InvokeTools
private object InvokeTools(object ToolSelectorResponse)

Invokes tools based on the tool selector response.

ToolSelectorResponseRequired
  • Type: object

The response from the tool selector.


SingleToolInvoke
private string SingleToolInvoke(string ToolId, object Payload)

Invokes a single tool with the provided payload.

ToolIdRequired
  • Type: string

The ID of the tool to invoke.


PayloadRequired
  • Type: object

The payload to send to the tool.


Properties

Name Type Description
ToolsNamesMapping System.Collections.Generic.IDictionary Mapping of tool names.

ToolsNamesMappingOptional
public System.Collections.Generic.IDictionary<string, string> ToolsNamesMapping { get; set; }
  • Type: System.Collections.Generic.IDictionary

Mapping of tool names.


ILocalTool

Properties

Name Type Description
Function ILocalToolFunction No description.
Type string No description.

FunctionRequired
public ILocalToolFunction Function { get; }

TypeRequired
public string Type { get; }
  • Type: string

ILocalToolFunction

Properties

Name Type Description
Description string No description.
Name string No description.
Parameters object No description.

DescriptionRequired
public string Description { get; }
  • Type: string

NameRequired
public string Name { get; }
  • Type: string

ParametersRequired
public object Parameters { get; }
  • Type: object

IMessage

Interface representing a message.

Properties

Name Type Description
Content string The content of the message.
Role string The role of the message sender.

ContentRequired
public string Content { get; set; }
  • Type: string

The content of the message.


RoleRequired
public string Role { get; set; }
  • Type: string

The role of the message sender.


IOpenAIToolFunctionOutput

Properties

Name Type Description
Description string The description of the tool.
Name string The name of the tool.
Execute object Function to execute the Bedrock tool.
Func object Function to execute the tool.
Parameters IToolParameter Parameters of the tool.

DescriptionRequired
public string Description { get; }
  • Type: string

The description of the tool.


NameRequired
public string Name { get; }
  • Type: string

The name of the tool.


ExecuteOptional
public object Execute { get; }
  • Type: object

Function to execute the Bedrock tool.


FuncOptional
public object Func { get; }
  • Type: object

Function to execute the tool.


ParametersOptional
public IToolParameter Parameters { get; }

Parameters of the tool.


IOpenAIToolOutput

Properties

Name Type Description
Function IOpenAIToolFunctionOutput No description.
Type string No description.

FunctionRequired
public IOpenAIToolFunctionOutput Function { get; }

TypeRequired
public string Type { get; }
  • Type: string

ITool

Interface representing a tool.

Properties

Name Type Description
Description string The description of the tool.
Name string The name of the tool.
Func object Function to execute the tool.
Parameters System.Collections.Generic.IDictionaryIToolParameter> Parameters of the tool.

DescriptionRequired
public string Description { get; set; }
  • Type: string

The description of the tool.


NameRequired
public string Name { get; set; }
  • Type: string

The name of the tool.


FuncOptional
public object Func { get; set; }
  • Type: object

Function to execute the tool.


ParametersOptional
public System.Collections.Generic.IDictionary<string, IToolParameter> Parameters { get; set; }
  • Type: System.Collections.Generic.IDictionaryIToolParameter>

Parameters of the tool.


IToolParameter

Interface representing a tool parameter.

Properties

Name Type Description
Properties System.Collections.Generic.IDictionaryIToolParameter> Properties of the parameter.
Type string The type of the parameter.
Required string[] List of required properties.

PropertiesRequired
public System.Collections.Generic.IDictionary<string, IToolParameter> Properties { get; set; }
  • Type: System.Collections.Generic.IDictionaryIToolParameter>

Properties of the parameter.


TypeRequired
public string Type { get; set; }
  • Type: string

The type of the parameter.


RequiredOptional
public string[] Required { get; set; }
  • Type: string[]

List of required properties.


IToolResponse

Properties

Name Type Description
FilteredTool Newtonsoft.Json.Linq.JObject The filtered tool object.
Name string The name of the tool.
PayloadRequest string The request payload that sent to tool.
ResponseMessage string The response message from the tool.
Role string The role in the response.
ToolCallId string The ID of the tool call.

FilteredToolRequired
public Newtonsoft.Json.Linq.JObject FilteredTool { get; set; }
  • Type: Newtonsoft.Json.Linq.JObject

The filtered tool object.


NameRequired
public string Name { get; set; }
  • Type: string

The name of the tool.


PayloadRequestRequired
public string PayloadRequest { get; set; }
  • Type: string

The request payload that sent to tool.


ResponseMessageRequired
public string ResponseMessage { get; set; }
  • Type: string

The response message from the tool.


RoleRequired
public string Role { get; set; }
  • Type: string

The role in the response.


ToolCallIdRequired
public string ToolCallId { get; set; }
  • Type: string

The ID of the tool call.


IToolResponsePayload

Properties

Name Type Description
Property1 string A string property for the tool response payload.
Property2 double A numeric property for the tool response payload.

Property1Required
public string Property1 { get; set; }
  • Type: string

A string property for the tool response payload.


Property2Required
public double Property2 { get; set; }
  • Type: double

A numeric property for the tool response payload.


Enums

LLMProvider

Enum representing different Large Language Model (LLM) providers.

Members

Name Description
LANG_CHAIN Represents the 'langchain' provider.
OPEN_AI Represents the 'openai' provider.
NVIDIA_NIM Represents the 'nvidiaNim' provider.
AMAZON_BEDROCK Represents the 'amazonBedrock' provider.

LANG_CHAIN

Represents the 'langchain' provider.


OPEN_AI

Represents the 'openai' provider.


NVIDIA_NIM

Represents the 'nvidiaNim' provider.


AMAZON_BEDROCK

Represents the 'amazonBedrock' provider.