Returns the agent with the provided ID.
agentId required | string |
squid .ai() .agent('resume-agent') .get() .then(agent => { console.log(agent); });
{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "isPublic": true,
- "auditLog": true,
- "options": {
- "maxTokens": 0.1,
- "chatId": "string",
- "disableHistory": true,
- "disableContext": true,
- "includeReference": true,
- "responseFormat": "text",
- "smoothTyping": true,
- "agentContext": { },
- "functions": [
- "string"
], - "instructions": "string",
- "contextMetadataFilter": {
- "property1": {
- "$eq": 0.1
}, - "property2": {
- "$eq": 0.1
}
}, - "voiceOptions": {
- "modelName": "tts-1",
- "voice": "alloy",
- "responseFormat": "mp3",
- "speed": 0.1
}, - "connectedAgents": [
- {
- "agentId": "string",
- "description": "string"
}
], - "connectedIntegrations": [
- {
- "integrationId": "string",
- "integrationType": "active_directory",
- "description": "string",
- "instructions": "string"
}
], - "quotas": {
- "maxAiCallStackSize": 0.1
}, - "includeMetadata": true,
- "temperature": 0.1,
- "guardrails": {
- "custom": "string",
- "disablePii": true,
- "professionalTone": true,
- "offTopicAnswers": true,
- "disableProfanity": true
}, - "model": "gemini-1.5-pro",
- "groundingWithWebSearch": true
}
}
Creates or updates the AI agent with the provided parameters.
id required | string (AiAgentId) ID of AI agent. Also known as AI profile id. |
description | string An optional description of the agent's purpose or capabilities. |
isPublic | boolean Indicates whether the agent is publicly accessible; defaults to false. |
auditLog | boolean Enables audit logging for the agent's activities if true; defaults to false. |
GeminiChatOptions (object) or OpenAiReasoningChatOptions (object) or OpenAiChatOptions (object) or AnthropicChatOptions (object) (ApiAiAgentChatOptions) |
{- "id": "string",
- "description": "string",
- "isPublic": true,
- "auditLog": true,
- "options": {
- "maxTokens": 0.1,
- "chatId": "string",
- "disableHistory": true,
- "disableContext": true,
- "includeReference": true,
- "responseFormat": "text",
- "smoothTyping": true,
- "agentContext": { },
- "functions": [
- "string"
], - "instructions": "string",
- "contextMetadataFilter": {
- "property1": {
- "$eq": 0.1
}, - "property2": {
- "$eq": 0.1
}
}, - "voiceOptions": {
- "modelName": "tts-1",
- "voice": "alloy",
- "responseFormat": "mp3",
- "speed": 0.1
}, - "connectedAgents": [
- {
- "agentId": "string",
- "description": "string"
}
], - "connectedIntegrations": [
- {
- "integrationId": "string",
- "integrationType": "active_directory",
- "description": "string",
- "instructions": "string"
}
], - "quotas": {
- "maxAiCallStackSize": 0.1
}, - "includeMetadata": true,
- "temperature": 0.1,
- "guardrails": {
- "custom": "string",
- "disablePii": true,
- "professionalTone": true,
- "offTopicAnswers": true,
- "disableProfanity": true
}, - "model": "gemini-1.5-pro",
- "groundingWithWebSearch": true
}
}
Adds or updates multiple agent contexts (knowledge). If some of the contexts are of type 'file', a corresponding file should be uploaded.
agentId required | string The ID of the agent to add the contexts to. |
contexts required | string A JSON string representing an array of AgentContextRequest objects. |
files | Array of strings <binary> [ items <binary > ] The context files to upload. |
void squid .ai() .agent('resume-agent') .upsertContexts( [ { contextId: 'ctx1', type: 'text', text: 'Some knowledge', title: 'Text knowledge', }, { contextId: 'ctx2', type: 'file' }, ], [new File(['file content'], 'file.txt')], );
Deletes multiple agent contexts (knowledge) from the agent by their IDs.
agentId required | string (AiAgentId) ID of AI agent. Also known as AI profile id. |
contextIds required | Array of strings |
{- "agentId": "string",
- "contextIds": [
- "string"
]
}
Returns a context (knowledge) of the agent by its ID.
agentId required | string |
contextId required | string |
squid .ai() .agent('resume-agent') .getContext('ctx1') .then(context => { console.log(context); });
{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "agentId": "string",
- "type": "text",
- "title": "string",
- "text": "string",
- "preview": true,
- "sizeBytes": 0.1,
- "metadata": { }
}
Changes the AI model used by the agent.
agentId required | string |
model required | string (AiChatModelName) Enum: "gemini-1.5-pro" "gemini-2.0-flash" "gpt-4o" "gpt-4o-mini" "o1" "o1-mini" "o3" "o3-mini" "o4-mini" "claude-3-5-haiku-latest" "claude-3-5-sonnet-latest" "claude-3-7-sonnet-latest" |
{- "agentId": "string",
- "model": "gemini-1.5-pro"
}
Updates the list of agents connected to this agent.
agentId required | string |
required | Array of objects (AiConnectedAgentMetadata) |
{- "agentId": "string",
- "connectedAgents": [
- {
- "agentId": "string",
- "description": "string"
}
]
}
Lists all contexts associated with the agent.
agentId required | string |
squid .ai() .agent('resume-agent') .listContexts() .then(contexts => { console.log(contexts); });
{- "contexts": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "agentId": "string",
- "type": "text",
- "title": "string",
- "text": "string",
- "preview": true,
- "sizeBytes": 0.1,
- "metadata": { }
}
]
}
Updates the agent's guardrails settings.
agentId required | string |
required | object (GuardrailsOptions) Options for applying guardrails to AI responses to enforce specific constraints. |
{- "agentId": "string",
- "guardrails": {
- "custom": "string",
- "disablePii": true,
- "professionalTone": true,
- "offTopicAnswers": true,
- "disableProfanity": true
}
}
Update custom guardrails for the agent.
agentId required | string |
customGuardrail required | string |
{- "agentId": "string",
- "customGuardrail": "string"
}
Sends a prompt and returns a full text answer.
agentId required | string |
prompt required | string |
GeminiChatOptions (object) or OpenAiReasoningChatOptions (object) or OpenAiChatOptions (object) or AnthropicChatOptions (object) (ApiAiAgentChatOptions) |
{- "agentId": "string",
- "prompt": "string",
- "options": {
- "maxTokens": 0.1,
- "chatId": "string",
- "disableHistory": true,
- "disableContext": true,
- "includeReference": true,
- "responseFormat": "text",
- "smoothTyping": true,
- "agentContext": { },
- "functions": [
- "string"
], - "instructions": "string",
- "contextMetadataFilter": {
- "property1": {
- "$eq": 0.1
}, - "property2": {
- "$eq": 0.1
}
}, - "voiceOptions": {
- "modelName": "tts-1",
- "voice": "alloy",
- "responseFormat": "mp3",
- "speed": 0.1
}, - "connectedAgents": [
- {
- "agentId": "string",
- "description": "string"
}
], - "connectedIntegrations": [
- {
- "integrationId": "string",
- "integrationType": "active_directory",
- "description": "string",
- "instructions": "string"
}
], - "quotas": {
- "maxAiCallStackSize": 0.1
}, - "includeMetadata": true,
- "temperature": 0.1,
- "guardrails": {
- "custom": "string",
- "disablePii": true,
- "professionalTone": true,
- "offTopicAnswers": true,
- "disableProfanity": true
}, - "model": "gemini-1.5-pro",
- "groundingWithWebSearch": true
}
}
{- "responseString": "string"
}
Performs a semantic search using the agent's knowledge base.
agentId required | string |
required | object (AiSearchOptions) The options for the AI agent search method. |
{- "agentId": "string",
- "options": {
- "prompt": "string",
- "contextMetadataFilter": {
- "property1": {
- "$eq": 0.1
}, - "property2": {
- "$eq": 0.1
}
}, - "limit": 0.1
}
}
{- "chunks": [
- {
- "data": "string",
- "metadata": { },
- "score": 0.1
}
]
}
Retrieves matchmaker details.
matchMakerId required | string The ID of the matchmaker to retrieve. --squidCodeSampleFile ./src/code-samples/matchmaking/matchmaker-getMatchMaker.ts,Client SDK |
{- "matchMaker": {
- "id": "string",
- "description": "string",
- "categories": [
- {
- "id": "string",
- "description": "string"
}
]
}
}
Creates a new matchmaker.
The matchmaker object to create.
--squidCodeSampleFile ./src/code-samples/matchmaking/matchmaker-create.ts,Client SDK
id required | string The unique identifier of the matchmaker. |
description required | string A description aiding the AI in understanding the matchmaker's domain. |
required | Array of objects (MmCategory) An array of categories defining the types of entities that can be matched. |
{- "id": "string",
- "description": "string",
- "categories": [
- {
- "id": "string",
- "description": "string"
}
]
}
{- "id": "string",
- "description": "string",
- "categories": [
- {
- "id": "string",
- "description": "string"
}
]
}
squid .ai() .matchMaking() .listMatchMakers() .then(matchmakers => { console.log(matchmakers); });
{- "matchMakers": [
- {
- "id": "string",
- "description": "string",
- "categories": [
- {
- "id": "string",
- "description": "string"
}
]
}
]
}
Deletes an existing matchmaker by its ID.
The request object containing the matchmaker ID to delete.
--squidCodeSampleFile ./src/code-samples/matchmaking/matchmaker-delete.ts,Client SDK
matchMakerId required | string |
{- "matchMakerId": "string"
}
Inserts a new entity into the specified matchmaker.
The request object containing the matchmaker ID and entities to insert.
--squidCodeSampleFile ./src/code-samples/matchmaking/matchmaker-insertManyEntities.ts,Client SDK
matchMakerId required | string |
required | Array of objects (MmEntity) |
{- "matchMakerId": "string",
- "entities": [
- {
- "id": "string",
- "content": "string",
- "categoryId": "string",
- "metadata": { }
}
]
}
Deletes a specific entity from the matchmaker.
The request object containing the matchmaker ID and entity ID to delete.
matchMakerId required | string |
entityId required | string |
{- "matchMakerId": "string",
- "entityId": "string"
}
Finds matches for an entity already inserted in the matchmaker.
The request object containing the matchmaker ID, entity ID, and options for finding matches.
matchMakerId required | string |
entityId required | string |
required | object (MmFindMatchesOptions) Represents options for finding matches in the matchmaker system. |
{- "matchMakerId": "string",
- "entityId": "string",
- "options": {
- "metadataFilter": {
- "property1": {
- "$eq": 0.1
}, - "property2": {
- "$eq": 0.1
}
}, - "limit": 0.1,
- "matchToCategoryId": "string"
}
}
{- "matches": [
- {
- "id": "string",
- "content": "string",
- "categoryId": "string",
- "metadata": { },
- "score": 0.1,
- "reasoning": "string"
}
]
}
Finds matches for an entity not yet inserted into the matchmaker.
The request object containing the matchmaker ID, entity, and options for finding matches.
matchMakerId required | string |
required | object (Omit_MmEntity.metadata-or-id_) From T, pick a set of properties whose keys are in the union K |
required | object (MmFindMatchesOptions) Represents options for finding matches in the matchmaker system. |
{- "matchMakerId": "string",
- "entity": {
- "content": "string",
- "categoryId": "string"
}, - "options": {
- "metadataFilter": {
- "property1": {
- "$eq": 0.1
}, - "property2": {
- "$eq": 0.1
}
}, - "limit": 0.1,
- "matchToCategoryId": "string"
}
}
{- "matches": [
- {
- "id": "string",
- "content": "string",
- "categoryId": "string",
- "metadata": { },
- "score": 0.1,
- "reasoning": "string"
}
]
}
Lists entities in the specified category within the matchmaker.
The request object containing the matchmaker ID, category ID, and options for listing entities.
matchMakerId required | string |
categoryId required | string |
required | object (MmListEntitiesOptions) Represents options for listing entities in the matchmaker system.
|
{- "matchMakerId": "string",
- "categoryId": "string",
- "options": {
- "metadataFilter": {
- "property1": {
- "$eq": 0.1
}, - "property2": {
- "$eq": 0.1
}
}, - "limit": 0.1
}
}
{- "entities": [
- {
- "id": "string",
- "content": "string",
- "categoryId": "string",
- "metadata": { }
}
]
}
Retrieves a specific entity from the matchmaker.
matchMakerId required | string The ID of the matchmaker. |
entityId required | string The ID of the entity to retrieve. |
squid .ai() .matchMaking() .getMatchMaker('resume-and-job-description') .then(matchmaker => { if (!matchmaker) return; return matchmaker.getEntity('resumeId1'); });
{- "entity": {
- "id": "string",
- "content": "string",
- "categoryId": "string",
- "metadata": { }
}
}
Generates an image using AI and returns a url to the generated image. The url will be available for one hour.
The request object containing the prompt and options for image generation.
prompt required | string |
required | DallEOptions (object) or StableDiffusionCoreOptions (object) or FluxOptions (object) (AiGenerateImageOptions) |
{- "prompt": "string",
- "options": {
- "modelName": "dall-e-3",
- "quality": "hd",
- "size": "1024x1024",
- "numberOfImagesToGenerate": 1
}
}
"string"
Generates an image using AI and returns a url to the generated image. The url will be available for one hour.
file required | string <binary> The image file to be processed. |
void squid .ai() .image() .removeBackground(new File(['<Actual file content>'], 'file.png'));
"string"
Transcribes the spoken content of an uploaded audio file into text.
file required | string <binary> The audio file to transcribe. |
optionsJson required | string A JSON string representing a AiAudioTranscribeOptions object. |
void squid.ai().audio().createSpeech('Create a speech of a men talking with his son', { modelName: 'tts-1', });
"string"
Converts text into synthesized speech and returns an audio file URL. The URL will be available for one hour.
The request object containing the input text and options for speech synthesis.
input required | string |
required | object (AiAudioCreateSpeechOptions) Options for creating speech using OpenAI's text-to-speech models. |
{- "input": "string",
- "options": {
- "modelName": "tts-1",
- "voice": "alloy",
- "responseFormat": "mp3",
- "speed": 0.1
}
}
Search the web using AI. Returns a response containing Markdown text and cited URLs.
The request object containing the search query.
query required | string The search query. |
{- "query": "string"
}
{- "markdownText": "string",
- "citedUrls": [
- {
- "url": "string",
- "title": "string"
}
]
}
Fetch content from a URL. Returns the content in Markdown format.
The request object containing the URL to fetch content from.
url required | string The URL to fetch content from. |
{- "url": "string"
}
{- "markdownText": "string"
}