### Example Agent Behavior Source: https://docs.getcargo.ai/reference/agents/defining-the-prompt Outlines the steps and actions the agent should take, guiding its planning phase. Clearly name each action and its purpose. ```text 1. Use the "Company-Lookup" action to retrieve company data from the URL 2. Check the company against our ICP criteria in the Knowledge Base 3. Assign a qualification score: "High Fit", "Medium Fit", or "No Fit" 4. Provide a 2-3 sentence explanation of your reasoning ``` -------------------------------- ### Install Cargo CLI Source: https://docs.getcargo.ai/cli/overview Install the Cargo CLI globally using npm. ```bash npm install -g @cargo-ai/cli ``` -------------------------------- ### Python: Complex Calculations Example Source: https://docs.getcargo.ai/reference/actions/python Placeholder for a Python snippet demonstrating complex calculations, accessing deal size, contract length, and enterprise status from the start node. ```python deal_size = nodes["start"]["deal_size"] contract_length = nodes["start"]["contract_length"] is_enterprise = nodes["start"]["is_enterprise"] ``` -------------------------------- ### Install Cargo CLI and Login Source: https://docs.getcargo.ai/cli/skills Installs the Cargo CLI globally and logs in using an API token. Ensure your API token is stored securely. ```bash npm install -g @cargo-ai/cli cargo-ai login --token cargo-ai whoami ``` -------------------------------- ### Lead Routing by Segment Example Source: https://docs.getcargo.ai/reference/actions/switch An example workflow demonstrating lead routing based on company size and lead score using a Switch node. ```text Case | Condition | Route to Enterprise | {{nodes.enrich.employees >= 1000 && nodes.score.value >= 60}} | Enterprise AEs Mid-Market | {{nodes.enrich.employees >= 200 && nodes.score.value >= 50}} | Mid-Market SDRs High-Intent | {{nodes.score.value >= 80}} | Inbound team SMB | {{nodes.enrich.employees >= 20}} | SMB automation Catch-all | {{true}} | Nurture campaign ``` -------------------------------- ### Task Assignment Example Source: https://docs.getcargo.ai/integration/microsoft-teams An example message format for assigning a task, detailing the lead, the action required, and the due date. ```plaintext 📋 Task Assigned Lead: {{first_name}} {{last_name}} at {{company_name}} Action: {{task_description}} Due: {{due_date}} Please follow up within 24 hours. ``` -------------------------------- ### Example Query with Database Scope Source: https://docs.getcargo.ai/reference/models/querying-data An example of selecting data from a Cargo model table using the database scope naming convention. ```sql SELECT * FROM CARGO_DB.datasets_crm.models_companies ``` -------------------------------- ### HTTP Call - Slack-like Webhook Example Source: https://docs.getcargo.ai/integration/http Example of making a POST request with a JSON body to a Slack-like webhook. Supports template expressions for dynamic content. ```text URL: https://hooks.example.com/services/xxx/yyy/zzz Method: POST Body format: JSON Body: { "text": "New lead: {{first_name}} {{last_name}} from {{company}}", "channel": "#sales-alerts" } ``` -------------------------------- ### Cargo Tool URL Path Example Source: https://docs.getcargo.ai/reference/tools/embed-in-crm Example of the path format required for the 'CARGOPATH' in the OpenAPI schema. This should be the path portion of your Cargo Tool URL. ```text /v1/tools/e276dc32-aca1-4136-bbe7-dce879346c58/execute ``` -------------------------------- ### HubSpot Deal Capacity Model Example Source: https://docs.getcargo.ai/reference/revenue-organization/allocating-leads This example demonstrates setting up a capacity model using HubSpot deals. It includes filtering open deals and mapping them to owners via their HubSpot ID. ```text Model: Deals / hubspot__deals Filter: dealstage not in (closedwon, closedlost) and owner match to {{member.ids.hubspot}} ``` -------------------------------- ### Clone and Run Dummy Integration Server Source: https://docs.getcargo.ai/integration/custom-integration Clones the dummy integration repository and installs its dependencies to set up a local development server for testing external integrations. ```bash git clone https://github.com/getcargohq/dummy-integration.git cd dummy-integration npm install npm run dev ``` -------------------------------- ### Catch-all Path Example Source: https://docs.getcargo.ai/reference/actions/switch Demonstrates creating a catch-all route using `{{true}}` for handling unspecified sources. ```handlebars Case 1: {{nodes.start.source == "demo"}} → Demo flow Case 2: {{nodes.start.source == "trial"}} → Trial flow Case 3: {{nodes.start.source == "referral"}} → Referral flow Case 4: {{true}} → General flow (catch-all) ``` -------------------------------- ### Get Custom Integration Response Source: https://docs.getcargo.ai/integration/custom-integration Example response when retrieving a specific custom integration. It provides details about the requested integration, including its UUID, kind, base URL, and creation timestamp. ```json { "connector": { "uuid": "ci_abc123", "kind": "external", "baseUrl": "https://your-integration-server.com", "createdAt": "2025-01-01T00:00:00Z" } } ``` -------------------------------- ### List Models API Request Example Source: https://docs.getcargo.ai/api-reference/introduction Demonstrates how to list all available models using a cURL command. Ensure you replace 'YOUR_API_TOKEN' with your actual API token. ```bash curl -X GET "https://api.getcargo.io/v1/storage/models/list" \ -H "Authorization: Bearer YOUR_API_TOKEN" ``` -------------------------------- ### Integration Server Manifest Response Source: https://docs.getcargo.ai/integration/custom-integration Example response for the GET /manifest endpoint of an integration server. This JSON describes the integration's capabilities, configuration schemas, rate limits, actions, extractors, and autocompletes. ```json { "name": "My Integration", "description": "A custom integration for my service", "icon": "...", "color": "#6366F1", "url": "https://myservice.com", "connector": { "config": { "jsonSchema": { "type": "object", "properties": { "apiKey": { "title": "API Key", "type": "string" } }, "required": ["apiKey"] }, "uiSchema": {} }, "rateLimit": { "unit": "minute", "max": 60 } }, "actions": { "createRecord": { "name": "Create Record", "description": "Creates a new record in the service", "config": { "jsonSchema": { "type": "object", "properties": { "name": { "title": "Name", "type": "string" } }, "required": ["name"] }, "uiSchema": {} } } }, "extractors": { "fetchRecords": { "name": "Fetch Records", "description": "Fetches records from the service", "config": { "jsonSchema": {}, "uiSchema": {} }, "mode": { "kind": "fetch", "isIncremental": false }, "preview": "records" } }, "autocompletes": { "listOptions": { "params": { "jsonSchema": {} }, "cacheExpirationInSeconds": 300 } } } ``` -------------------------------- ### Get message Source: https://docs.getcargo.ai/llms.txt Get a message by UUID. ```APIDOC ## GET /messages/{uuid} ### Description Retrieve a specific message using its UUID. ### Method GET ### Endpoint /messages/{uuid} ### Parameters #### Path Parameters - **uuid** (string) - Required - The UUID of the message to retrieve. ``` -------------------------------- ### Get file Source: https://docs.getcargo.ai/llms.txt Get an AI file by UUID. ```APIDOC ## GET /files/{uuid} ### Description Retrieve an AI file by its UUID. ### Method GET ### Endpoint /files/{uuid} ### Parameters #### Path Parameters - **uuid** (string) - Required - The UUID of the file to retrieve. ``` -------------------------------- ### Example CSV for Bulk Tool Run Source: https://docs.getcargo.ai/reference/tools/triggering-a-tool Upload a CSV file with headers matching your tool's input field names for bulk processing. ```csv company_domain,contact_email acme.com,john@acme.com globex.io,jane@globex.io ``` -------------------------------- ### Get agent Source: https://docs.getcargo.ai/llms.txt Get an AI agent by UUID. ```APIDOC ## GET /agents/{uuid} ### Description Get an AI agent by its unique identifier (UUID). ### Method GET ### Endpoint /agents/{uuid} ### Parameters #### Path Parameters - **uuid** (string) - Required - The UUID of the agent to retrieve. ``` -------------------------------- ### Get dynamic schema Source: https://docs.getcargo.ai/llms.txt Get the dynamic schema for a specific connector. ```APIDOC ## GET /connection/connectors/{uuid}/dynamic-schema ### Description Retrieves the dynamic schema associated with a specific connector. ### Method GET ### Endpoint /connection/connectors/{uuid}/dynamic-schema ### Parameters #### Path Parameters - **uuid** (string) - Required - The UUID of the connector for which to get the schema. ``` -------------------------------- ### Get context repository Source: https://docs.getcargo.ai/api-reference/context--repository/get-context-repository Get the context repository configuration for the current workspace. ```APIDOC ## GET /context/repository ### Description Get the context repository configuration for the current workspace. ### Method GET ### Endpoint /context/repository ### Parameters ### Request Example ### Response #### Success Response (200) - **repository** (object) - The context repository configuration. - **uuid** (string) - **workspaceUuid** (string) - **source** (object) - Specifies the source of the repository. - **kind** (string) - Must be 'managed' for managed sources. - **kind** (string) - Must be 'custom' for custom sources. - **connectorUuid** (string) - Required if kind is 'custom'. - **repositoryOwner** (string) - Required if kind is 'custom'. - **repositoryName** (string) - Required if kind is 'custom'. - **defaultBranch** (string) - Required if kind is 'custom'. - **createdAt** (string) - **updatedAt** (string) #### Response Example { "repository": { "uuid": "string", "workspaceUuid": "string", "source": { "kind": "managed" }, "createdAt": "string", "updatedAt": "string" } } #### Error Response - **400**: Bad request - **401**: Unauthorized - **404**: Not found - **500**: Internal server error ``` -------------------------------- ### Switch Case Ordering (Correct) Source: https://docs.getcargo.ai/reference/actions/switch Demonstrates the correct order for Switch cases, starting with the most specific conditions. ```text Case 1: score >= 90 → Executes for 90+ Case 2: score >= 70 → Executes for 70-89 Case 3: score >= 50 → Executes for 50-69 Case 4: {{true}} → Executes for < 50 ``` -------------------------------- ### Get Document Source: https://docs.getcargo.ai/api-reference/ai--documents/get-document Fetches a single AI document by its UUID. This is a GET request to the /ai/documents/{uuid} endpoint. ```APIDOC ## GET /ai/documents/{uuid} ### Description Get an AI document by UUID. ### Method GET ### Endpoint /ai/documents/{uuid} ### Parameters #### Path Parameters - **uuid** (string) - Required - Document identifier. Must be a valid UUID. ### Response #### Success Response (200) - **document** (object) - Document details. - **uuid** (string) - Document identifier. - **workspaceUuid** (string) - The UUID of the workspace the document belongs to. - **userUuid** (string) - The UUID of the user who owns the document. - **title** (string | null) - The title of the document. - **content** (string) - The content of the document. - **kind** (string) - The type of the document (e.g., text, code, sheet, image). - **createdAt** (string) - The timestamp when the document was created. - **deletedAt** (string | null) - The timestamp when the document was deleted, if applicable. #### Response Example ```json { "document": { "uuid": "123e4567-e89b-12d3-a456-426614174000", "workspaceUuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "userUuid": "fedcba09-8765-4321-fedc-ba0987654321", "title": "Example Document Title", "content": "This is the content of the document.", "kind": "text", "createdAt": "2023-10-27T10:00:00Z", "deletedAt": null } } ``` ``` -------------------------------- ### Bootstrap a New Cargo Workspace Source: https://docs.getcargo.ai/cli/cookbook This sequence of commands sets up a new Cargo workspace, including creating folders, defining storage models and columns, establishing relationships, configuring connectors, and deploying an AI agent. It covers workspace management, storage, connections, and AI agent creation. ```bash # 1. Workspace — create folders for organization cargo-ai workspaceManagement folder create --name "Enrichment" --emoji-slug "sparkles" --kind tool cargo-ai workspaceManagement folder create --name "Scoring" --emoji-slug "chart-bar" --kind play # 2. Storage — create models and columns cargo-ai storage dataset list # → datasetUuid cargo-ai storage model create --slug companies --name "Companies" --dataset-uuid --extractor-slug csv --config '{}' cargo-ai storage model create --slug contacts --name "Contacts" --dataset-uuid --extractor-slug csv --config '{}' cargo-ai storage column create --model-uuid \ --column '{"slug":"domain","type":"string","label":"Domain","kind":"custom"}' cargo-ai storage column create --model-uuid \ --column '{"slug":"employee_count","type":"number","label":"Employees","kind":"custom"}' cargo-ai storage column create --model-uuid \ --column '{"slug":"email","type":"string","label":"Email","kind":"custom"}' # 3. Set relationship: Contacts → Companies cargo-ai storage relationship set \ --from-model-uuid \ --to-model-uuid # 4. Connection — create HubSpot connector cargo-ai connection connector create \ --integration-slug hubspot \ --slug hubspot_prod \ --name "HubSpot - Production" # 5. AI — create and deploy scoring agent cargo-ai ai agent create --name "Lead Scorer" --icon-color green --icon-face "📊" cargo-ai ai release update-draft --agent-uuid \ --system-prompt "Score leads from 1–10 based on company fit." \ --language-model-slug gpt-4o-mini \ --temperature 0.0 cargo-ai ai release deploy-draft --agent-uuid \ --integration-slug openai --language-model-slug gpt-4o-mini \ --actions '[]' --resources '[]' --capabilities '[]' \ --suggested-actions '[]' --mcp-clients '[]' \ --description "Initial scoring agent" ``` -------------------------------- ### Batch Creation Response Source: https://docs.getcargo.ai/reference/actions/using-actions This is an example of a response after successfully creating a batch. ```json { "batch": { "uuid": "batch_abc123", "status": "running" } } ``` -------------------------------- ### Error Response Example (Reason) Source: https://docs.getcargo.ai/api-reference/introduction Provides an example of a JSON error response specifying the reason for the error, such as 'modelNotFound'. ```json { "reason": "modelNotFound" } ``` -------------------------------- ### Get Segment by ID Source: https://docs.getcargo.ai/api-reference/segmentation--segments/get-segment Fetches a segment's details using its UUID. This is a GET request to the /segments/{segmentUuid} endpoint. ```APIDOC ## GET /segments/{segmentUuid} ### Description Retrieves the details of a specific segment identified by its UUID. ### Method GET ### Endpoint /segments/{segmentUuid} ### Parameters #### Path Parameters - **segmentUuid** (string) - Required - The unique identifier of the segment to retrieve. ### Response #### Success Response (200) - **uuid** (string) - The unique identifier of the segment. - **name** (string) - The name of the segment. - **description** (string) - A description of the segment. - **createdAt** (string) - The timestamp when the segment was created. - **updatedAt** (string) - The timestamp when the segment was last updated. #### Response Example ```json { "uuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "High Value Customers", "description": "Customers with a lifetime value over $1000", "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### Example Natural Language Prompt for Cargo Skills Source: https://docs.getcargo.ai/cli/skills Demonstrates how a natural language prompt can be translated into Cargo CLI commands for orchestrating plays. ```bash "Trigger the MQL scoring play on all leads added this week." → cargo-ai orchestration play list → cargo-ai orchestration batch create --workflow-uuid \ --data '{"kind":"segment","segmentUuid":""}' \ --wait-until-finished ``` -------------------------------- ### Get Connector by UUID Source: https://docs.getcargo.ai/api-reference/connection--connectors/get-connector Fetches a connector's details using its UUID. This is a GET request to the /connection/connectors/{uuid} endpoint. ```APIDOC ## GET /connection/connectors/{uuid} ### Description Get a connector by UUID. ### Method GET ### Endpoint /connection/connectors/{uuid} ### Parameters #### Path Parameters - **uuid** (string) - Required - Connector identifier. Must be a valid UUID. ### Response #### Success Response (200) - **connector** (object) - Connector details. - **uuid** (string) - **workspaceUuid** (string) - **userUuid** (string) - **name** (string) - **slug** (string) - **rateLimit** (object | null) - **unit** (string) - Enum: "day", "hour", "minute", "second" - **max** (number) - **cacheTtlMilliseconds** (number | null) - **integrationSlug** (string) - **playsCount** (number) - **toolsCount** (number) - **modelsCount** (number) - **createdAt** (string) - **updatedAt** (string) - **deletedAt** (string | null) - **useCredits** (boolean) - **config** (object | null) ``` -------------------------------- ### Basic SQL Query Example Source: https://docs.getcargo.ai/reference/models/querying-data A simple SQL query to retrieve specific columns from a Cargo data model, filtering by a funding amount. ```sql SELECT company, website, funding_amt, funding_type FROM CARGO_DB.datasets_file.models_abm_raw WHERE funding_amt > 1000000 ``` -------------------------------- ### Get folder by UUID Source: https://docs.getcargo.ai/api-reference/workspace-management--folders/get-folder Fetches a folder's details using its unique UUID. This is a GET request to the /workspaceManagement/folders/{uuid} endpoint. ```APIDOC ## GET /workspaceManagement/folders/{uuid} ### Description Get a folder by UUID. ### Method GET ### Endpoint /workspaceManagement/folders/{uuid} ### Parameters #### Path Parameters - **uuid** (string) - Required - Folder identifier. ### Response #### Success Response (200) - **folder** (object) - Contains the folder details. - **uuid** (string) - The unique identifier of the folder. - **parentUuid** (string | null) - The UUID of the parent folder, or null if it's a top-level folder. - **kind** (string) - The type of the folder (e.g., play, tool, agent, file). - **workspaceUuid** (string) - The UUID of the workspace the folder belongs to. - **name** (string) - The name of the folder. - **emojiSlug** (string) - An emoji representation for the folder. - **isReadOnly** (boolean) - Indicates if the folder is read-only. - **createdAt** (string) - The timestamp when the folder was created. - **updatedAt** (string) - The timestamp when the folder was last updated. - **deletedAt** (string | null) - The timestamp when the folder was deleted, or null if not deleted. #### Response Example ```json { "folder": { "uuid": "018a7a7a-7a7a-7a7a-7a7a-7a7a7a7a7a7a", "parentUuid": null, "kind": "play", "workspaceUuid": "018a7a7a-7a7a-7a7a-7a7a-7a7a7a7a7a7b", "name": "My Play Folder", "emojiSlug": "🚀", "isReadOnly": false, "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T10:00:00Z", "deletedAt": null } } ``` ``` -------------------------------- ### Tool Execution Response Source: https://docs.getcargo.ai/reference/actions/using-actions This is an example of a successful response after executing a tool. ```json { "status": "success", "createdAt": "2024-01-15T10:30:00Z", "finishedAt": "2024-01-15T10:30:05Z", "input": { "company_domain": "acme.com", "contact_email": "jane@acme.com" }, "output": { "company_name": "Acme Inc", "employee_count": 250 } } ``` -------------------------------- ### Create an AI Agent Source: https://docs.getcargo.ai/cli/cookbook Initiates the creation of a new AI agent. This command sets up the basic agent resource with a name, icon, and description. ```bash # Step 1: Create the agent cargo-ai ai agent create \ --name "ICP Lead Scorer" \ --icon-color green \ --icon-face "📊" \ --description "Scores leads based on ICP fit from 1 to 10" ``` -------------------------------- ### Create Setup Intent Source: https://docs.getcargo.ai/api-reference/billing--subscription/create-setup-intent Initiates a Stripe setup intent to facilitate the addition of a payment method. This is a POST request to the /billing/subscription/setupIntent endpoint. ```APIDOC ## POST /billing/subscription/setupIntent ### Description Create a Stripe setup intent for adding payment method ### Method POST ### Endpoint https://api.getcargo.io/v1/billing/subscription/setupIntent ### Response #### Success Response (200) - **setupIntent** (object) - Payment setup intent details. - **clientSecret** (string) - The client secret for the setup intent. #### Response Example ```json { "setupIntent": { "clientSecret": "seti_1P... } } ``` #### Error Responses - **400**: Bad request - **401**: Unauthorized - **404**: Not found - **500**: Internal server error ``` -------------------------------- ### List integrations Source: https://docs.getcargo.ai/llms.txt List all available integrations. ```APIDOC ## GET /connection/integrations ### Description Lists all available integrations that can be connected. ### Method GET ### Endpoint /connection/integrations ``` -------------------------------- ### Get Workspace by UUID Source: https://docs.getcargo.ai/api-reference/workspace-management--workspaces/get-workspace Fetches a workspace's details using its unique identifier (UUID). This is a GET request to the /workspaceManagement/workspaces/{uuid} endpoint. ```APIDOC ## GET /workspaceManagement/workspaces/{uuid} ### Description Get a workspace by UUID ### Method GET ### Endpoint /workspaceManagement/workspaces/{uuid} ### Parameters #### Path Parameters - **uuid** (string) - Required - Resource UUID ### Response #### Success Response (200) - **workspace** (object) - Description of the workspace object - **uuid** (string) - The unique identifier of the workspace. - **name** (string) - The name of the workspace. - **allowedEmailDomains** (array) - A list of email domains allowed for the workspace. - **temporalNamespace** (string) - The temporal namespace associated with the workspace. - **temporalTaskQueuePrefix** (string | null) - The prefix for temporal task queues. - **openAiVectorStoreId** (string | null) - The OpenAI vector store ID. - **syncs** (array) - A list of sync configurations. - **domain** (string) - The domain of the sync (e.g., connection, orchestration). - **temporalScheduleWorkflowId** (string) - The temporal schedule workflow ID. - **cron** (string) - The cron expression for the sync schedule. - **createdAt** (string) - The timestamp when the workspace was created. - **updatedAt** (string) - The timestamp when the workspace was last updated. - **logoUrl** (string | null) - The URL of the workspace logo. - **metadata** (object | null) - Additional metadata about the workspace. - **mainGoal** (array) - The main goals of the workspace. - **salesRepCount** (string) - The number of sales representatives. - **gtmStackList** (array) - The GTM stack list. - **referralSource** (array) - The referral sources. - **chromeExtensionMasterAgentUuid** (string | null) - The UUID of the master agent for the Chrome extension. - **chromeExtensionAvailableAgentUuids** (array | null) - A list of available agent UUIDs for the Chrome extension. - **defaultRoleUuid** (string | null) - The UUID of the default role. #### Response Example { "workspace": { "uuid": "string", "name": "string", "allowedEmailDomains": [ "string" ], "temporalNamespace": "string", "temporalTaskQueuePrefix": "string", "openAiVectorStoreId": "string", "syncs": [ { "domain": "connection", "temporalScheduleWorkflowId": "string", "cron": "string" } ], "createdAt": "string", "updatedAt": "string", "logoUrl": "string", "metadata": { "mainGoal": [ "string" ], "salesRepCount": "string", "gtmStackList": [ "string" ], "referralSource": [ "string" ] }, "chromeExtensionMasterAgentUuid": "string", "chromeExtensionAvailableAgentUuids": [ "string" ], "defaultRoleUuid": "string" } } ``` -------------------------------- ### Execute a Tool (Single Run) Source: https://docs.getcargo.ai/reference/actions/using-actions Use this endpoint to execute a single tool in real-time. The execution will time out if it exceeds 5 minutes. ```bash curl -X POST https://api.getcargo.io/v1/tools/{tool_uuid}/execute \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "company_domain": "acme.com", "contact_email": "jane@acme.com" }' ```