Atomically adds a connected agent to the agent.
Atomically adds a connected integration to the agent.
Atomically adds a connected knowledge base to the agent.
Atomically adds a function to the agent.
Atomically adds a global glossary to the agent's glossaryIds.
Atomically adds an ontology to the agent's ontologyIds.
Sends a prompt and returns a full string response.
The text prompt to send to the agent.
Optionaloptions: AiAskOptions<T>
Optional parameters for the AI ask request.
OptionaljobId: string
(Optional) A unique identifier for this request. Use it with squid.jobs().awaitJob(jobId) or
squid.jobs().getJob(jobId) to track progress. Make sure each job ID is both unique and kept private—anyone who
knows it can look up the job’s status.
Sends a prompt and not wait for the result - the result can be tracked using the job ID
(squid.jobs().awaitJob(jobId) or squid.jobs().getJob(jobId)). The result is of type AiAskResponse which contains the response string and optional annotations. @param prompt The text prompt to send to the agent. @param jobId A unique identifier for this request. Use it with squid.jobs().awaitJob(jobId)or squid.jobs().getJob(jobId)`
to track progress. Make sure each job ID is both unique and kept private—anyone who knows it can look up the job’s status.
Optionaloptions: AiAskOptions<T>
Optional parameters for the AI ask request.
Sends a prompt and returns the string response and file annotations.
The text prompt to send to the agent.
Optionaloptions: AiAskOptions<T>
Optional parameters for the AI ask request.
OptionaljobId: string
(Optional) A unique identifier for this request. Use it with squid.jobs().awaitJob(jobId) or
squid.jobs().getJob(jobId) to track progress. Make sure each job ID is both unique and kept private—anyone who
knows it can look up the job’s status.
Returns the answer, annotations, routing information, and optional validation verdict.
Optionaloptions: AiAskOptions<T>OptionaljobId: stringSends a prompt and gets both text and voice response from the agent.
The text prompt to send to the agent.
Optionaloptions: AiAskOptionsWithVoice<T>
Optional parameters for the AI ask request.
OptionaljobId: string
(Optional) A unique identifier for this request. Use it with squid.jobs().awaitJob(jobId) or
squid.jobs().getJob(jobId) to track progress. Make sure each job ID is both unique and kept private—anyone who
knows it can look up the job’s status.
Returns a page of the agent's audit log, newest first: the prompts it received and the changes made to it.
Entries are recorded only while the agent has auditLog on, and listing them needs the app API key.
Uses an AI builder agent to modify this agent based on a natural language request. Requires an API Key. The builder can update instructions, connect/disconnect integrations, add/remove functions, connect other agents, manage knowledge bases, and configure guardrails.
A natural language description of what you want to build or change.
OptionalmemoryId: string
Optional memory ID for conversation history. If not provided, defaults to 'no-memory' (no persistence).
Optionaloptions: BuildAgentOptions
Optional configuration for the build request.
Options for the agent builder.
OptionalcanManageIntegrations?: booleanWhether the caller has permission to create or update integrations. Defaults to false.
A string describing what changes were made.
Sends a prompt to the agent and receives streamed text responses.
The text prompt to send to the agent.
Optionaloptions: AiChatOptionsWithoutVoice<T>
Optional parameters for the AI ask request.
OptionaljobId: string
(Optional) A unique identifier for this request. Use it with squid.jobs().awaitJob(jobId) or
squid.jobs().getJob(jobId) to track progress. Make sure each job ID is both unique and kept private—anyone who
knows it can look up the job’s status.
Deletes the AI agent. Does not fail if the agent does not exist.
Deletes an automation of the agent. Does not fail if it does not exist. Requires the app API key.
Deletes the custom guardrails for the agent.
Deletes a specific revision.
The revision number to delete
AI-generates the MCP server and ask tool descriptions for the agent based on its
instructions and connected resources. Returns the descriptions without persisting them —
save them with updateMcpServer. Requires an API key.
Retrieves metadata and configuration of the AI agent.
Fetches the default api key for the agent
the api key if one exists
Returns an automation of the agent, or undefined when it has none with that ID. Requires the app API key.
Returns a list of all chat history messages with the given 'memoryId'. Includes both user and & AI messages.
Lists the agent's automations, oldest first: the prompts it runs on a schedule or when an event is emitted. Requires the app API key.
Lists all revisions (history) of the agent.
the list of revisions sorted by newest first
Observes live status messages from the agent.
OptionaljobId: string
The job ID to filter status updates for a specific job. If not provided, all status updates for the agent are observed.
Submits a feedback string for the agent. Requires an API Key. This feedback may update the agent's instructions, connected integrations, and may be forwarded to connected agents.
The feedback to provide for the agent.
Regenerates the api key for the agent. Will throw an error if the agent does not exist.
the new api key
Atomically removes a connected agent from the agent.
Atomically removes a connected integration from the agent.
Atomically removes a connected knowledge base from the agent.
Atomically removes a function from the agent.
Atomically removes a glossary from the agent's glossaryIds.
Atomically removes an ontology from the agent's ontologyIds.
Restores the agent to a previous revision. This will create a new revision with the current state before restoring.
The revision number to restore to
Starts a run of an automation now, whether or not it is enabled, and returns the job of the run. Requires the app API key.
Sets the agent's description.
Sets a value at a specific path within the agent's options.
Turns an automation on or off, leaving the rest of its definition as it is. Turning a schedule automation on sets its next run from now. Requires the app API key.
Transcribes audio and sends it to the agent for response.
The audio file to transcribe and send to the agent.
Optionaloptions: AiAskOptions<T>
Optional parameters for the AI ask request.
OptionaljobId: string
(Optional) A unique identifier for this request. Use it with squid.jobs().awaitJob(jobId) or
squid.jobs().getJob(jobId) to track progress. Make sure each job ID is both unique and kept private—anyone who
knows it can look up the job’s status.
Transcribes audio and gets both text and voice response from the agent.
The audio file to transcribe and send to the agent.
Optionaloptions: AiAskOptionsWithVoice<T>
Optional parameters for the AI ask request.
OptionaljobId: string
(Optional) A unique identifier for this request. Use it with squid.jobs().awaitJob(jobId) or
squid.jobs().getJob(jobId) to track progress. Make sure each job ID is both unique and kept private—anyone who
knows it can look up the job’s status.
Transcribes the given file and performs a chat interaction.
The audio file to transcribe and send to the agent.
Optionaloptions: AiChatOptionsWithoutVoice
Optional parameters for the AI ask request.
OptionaljobId: string
(Optional) A unique identifier for this request. Use it with squid.jobs().awaitJob(jobId) or
squid.jobs().getJob(jobId) to track progress. Make sure each job ID is both unique and kept private—anyone who
knows it can look up the job’s status.
Updates the list of agents connected to this agent.
Updates the agent's custom guardrails with the provided custom guardrail.
Updates the agent's guardrails with the provided options.
Updates the agent's instruction prompt.
Updates the agent's MCP server configuration, controlling whether the agent is exposed as an
MCP server at /mcp/<agentId>. Requires an API key.
Changes the AI model used by the agent.
Merges privacy settings. Scopes select input, context, output or tool arguments. A null classifierModel restores the default model.
Replaces prompt injection settings. Omit the model to use the default model.
Creates or updates the AI agent with the provided parameters.
Creates an automation of the agent, or replaces the one with the same id. A schedule automation runs the
agent with its prompt on a cron schedule; an event automation runs it whenever an event of its type is
emitted with squid.events().emit, with the event appended to the prompt. Requires the app API key.
AiAgentReference provides methods for managing AI agents, including retrieving, updating, and deleting agents, handling agent contexts, and interacting with chat or voice-based AI functionalities.