Cody connects to a Nagent workspace with an API key. Once it is connected, agents can call 21 Cody actions, such as "Create Conversation", "Create Document" and "Create Document From File". Nothing is enabled on connect: each action is allowed one at a time, and an action with side effects runs or waits for a person according to the agent's level.
Every operation an agent can call against Cody, with input parameters and output schema.
CODY_CREATE_CONVERSATIONTool to create a new conversation with a specified bot. Use when starting a new conversation thread with optional focus mode to limit bot's knowledge base to specific documents.
Input parameters
The conversation name.
The bot identifier to use for this conversation.
List of document IDs to enable focus mode. Only documents that exist in the folders the bot has access to are allowed. Maximum 1,000 elements.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_CREATE_DOCUMENTTool to create a new document with text or HTML content in Cody AI. Use when you need to add documents to Cody's knowledge base with up to 768 KB of content.
Input parameters
The document name.
Up to 768 KB of text or HTML content for the document. This field is required.
ID of the folder to store the document. This field is required.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_CREATE_DOCUMENT_FROM_FILETool to create a document by uploading a file (up to 100 MB). Supports txt, md, rtf, pdf, ppt, pptx, pptm, doc, docx, docm formats. Use when you need to add file-based documents to Cody's knowledge base. The file is processed asynchronously.
Input parameters
The key received after uploading a file via the /uploads/signed-url endpoint. This key identifies the uploaded file to be converted into a document.
ID of the destination folder for the document. This is required by the API.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_CREATE_DOCUMENT_FROM_WEBPAGETool to create a document from a publicly accessible webpage URL. Use when you need to import content from a webpage into Cody AI. The webpage must be accessible without login. If request fails, ensure the URL is publicly accessible and not blocked by a firewall.
Input parameters
Valid and publicly accessible webpage URL. The webpage must be accessible without login or authentication.
The folder identifier where the document will be stored.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_CREATE_FOLDERTool to create a new folder in Cody AI for organizing content. Use when you need to create a folder to organize documents or conversations.
Input parameters
The name of the folder to create.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_DELETE_CONVERSATIONTool to delete a conversation by its ID. Use when you need to permanently remove a conversation from the system.
Input parameters
ID of the conversation to delete
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_DELETE_DOCUMENTTool to delete a document by id. Use when removing a document that is no longer needed.
Input parameters
The document identifier to delete
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_GET_CONVERSATIONTool to fetch a conversation by its ID from Cody AI. Use when you need to retrieve details about a specific conversation. Supports optional includes parameter to filter response to list document IDs.
Input parameters
The unique identifier of the conversation to retrieve.
Filters response to list document IDs the conversation focuses on. Accepts value: 'document_ids'.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_GET_DOCUMENTTool to retrieve a specific document by its identifier from Cody AI. Use when you need to get details about a particular document including its status, content URL, and metadata.
Input parameters
The unique identifier of the document to retrieve.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_GET_FOLDERTool to retrieve a specific folder by its identifier. Use when you need to get details about a folder.
Input parameters
The unique identifier of the folder to retrieve.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_GET_MESSAGETool to fetch a specific message by its ID from Cody AI. Use when you need to retrieve details about a particular message, with optional includes for sources or usage metrics.
Input parameters
The unique identifier of the message to retrieve.
Extra attributes to include in the response. Accepted values are 'sources' (to include source documents) or 'usage' (to include token and credit consumption metrics). Separate multiple values with commas.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_GET_UPLOADS_SIGNED_URLTool to get an AWS S3 signed upload URL for file uploads. Use when you need to obtain a signed URL to upload a file to Cody's storage.
Input parameters
Original file name you want to upload, must contain the file extension.
MIME content type of the file.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_LIST_BOTSTool to get all bots with optional keyword filtering. Use when you need to retrieve the list of available bots in a Cody account.
Input parameters
Page number for paginated results. Defaults to 1 if not specified.
Keyword to filter the list of bots to only those that at least partially match the bot name.
Number of results per page. Defaults to 15 if not specified.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_LIST_CONVERSATIONSTool to get all conversations with optional filtering by bot, keyword, or includes. Use when you need to retrieve conversation history, filter by bot, search by name, or get document associations.
Input parameters
Page number for paginated results. Defaults to 1 if not specified.
Filters conversations to those using a specific bot. Provide the bot's unique identifier.
Filters conversations by partial match against conversation names. Case-insensitive search.
When set to 'document_ids', returns document IDs the conversation focuses on. Use this to get additional context about conversations.
Number of results per page. Defaults to 15 if not specified.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_LIST_DOCUMENTSTool to retrieve all documents from Cody AI account with optional filtering. Use when you need to list documents by folder, conversation, or search by keyword. Returns document details including learning status and content URL.
Input parameters
Page number for paginated results. Defaults to 1 if not specified.
Keyword to filter the list to documents that partially match the name. Use for searching documents by name.
Number of results per page. Defaults to 15 if not specified.
Id of the folder to list documents for. Use to filter documents by folder.
Id of the conversation to only list documents the conversation is focused on. Use to filter documents by conversation.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_LIST_FOLDERSTool to retrieve all folders with optional keyword filtering. Use when you need to list or search for folders in the account.
Input parameters
Page number for paginated results. Defaults to 1 if not specified.
Keyword to filter the list to folders that partially match the name.
Number of results per page. Defaults to 15 if not specified.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_LIST_MESSAGESTool to retrieve a paginated list of messages from Cody, optionally filtered by conversation. Use when you need to list messages, with optional filtering by conversation_id and extra attributes (sources or usage).
Input parameters
Page number for paginated results. Defaults to 1 if not specified.
Extra attributes to include in the response. Accepted values are 'sources' (to include source documents) or 'usage' (to include token and credit consumption metrics). Separate multiple values with commas.
Number of results per page. Defaults to 10 if not specified.
Filters results to messages within a specific conversation. Provide the conversation ID to narrow down results.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_SEND_MESSAGETool to send a message to Cody AI and receive an AI-generated response. Use when you need to send a user message to a conversation and get the AI's reply.
Input parameters
User message text to send (maximum 2000 characters).
Identifier for the conversation thread to send the message to.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_SEND_MESSAGE_FOR_STREAMTool to send a message to Cody AI and receive a Server-Sent Events (SSE) stream URL for the AI response. Use when you need streaming responses instead of waiting for the complete message. The response contains a stream_url that can be used to connect to the SSE stream and receive the AI's response in real-time chunks.
Input parameters
The message content to send to the AI (maximum 2000 characters).
Controls response format. When false (default), returns 200 with stream URL in JSON. When true, returns 302 redirect to stream URL.
ID of the conversation to send the message to.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_UPDATE_CONVERSATIONTool to update a conversation by its ID including name, bot_id, and document_ids. Use when you need to modify an existing conversation's properties.
Input parameters
The unique identifier of the conversation to update.
The conversation name to update.
The bot associated with this conversation.
Document IDs to limit the bot's knowledge base. Only documents that exist in the folders the bot has access to are allowed. Maximum 1,000 elements.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CODY_UPDATE_FOLDERTool to update a folder by its ID. Use when you need to modify an existing folder's name.
Input parameters
The unique identifier of the folder to update.
The new name for the folder.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
Agents can call 21 Cody actions on Nagent, including "Create Conversation", "Create Document" and "Create Document From File". Create Conversation: Create a new conversation with a specified bot. Each action is listed on this page with its input parameters and its output.
Cody connects with an API key, under your workspace's own connection. Nothing is enabled on connect: each action is allowed one at a time and can be scoped to the agents that need it.
Create Conversation takes 2 required inputs: name and bot_id. It also takes 1 optional input: document_ids. It returns data, error and successful.