{
  "schemaVersion": "1.0",
  "item": {
    "slug": "nex",
    "name": "Nex.ai",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/najmuzzaman-mohammad/nex",
    "canonicalUrl": "https://clawhub.ai/najmuzzaman-mohammad/nex",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/nex",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=nex",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "scripts/nex-api.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/nex"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/nex",
    "agentPageUrl": "https://openagent3.xyz/skills/nex/agent",
    "manifestUrl": "https://openagent3.xyz/skills/nex/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/nex/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Nex - Real-time Organizational Context for AI Agents",
        "body": "Nex shares real-time organizational context with your AI agent: query your context graph, process conversations, receive live insights, and manage the underlying records, schemas, relationships, tasks, and notes."
      },
      {
        "title": "Setup",
        "body": "Get your API key from https://app.nex.ai/settings/developer\nAdd to ~/.openclaw/openclaw.json:\n{\n  \"skills\": {\n    \"entries\": {\n      \"nex\": {\n        \"enabled\": true,\n        \"env\": {\n          \"NEX_API_KEY\": \"sk-your_key_here\"\n        }\n      }\n    }\n  }\n}"
      },
      {
        "title": "Security & Privacy",
        "body": "All API calls are routed through a validated wrapper script (scripts/nex-api.sh)\nThe wrapper validates that all requests go to https://app.nex.ai/api/developers only\nAPI key is read from $NEX_API_KEY environment variable (never from prompts)\nJSON request bodies are passed via stdin (printf '%s' pipe) to avoid shell injection\nThe wrapper uses set -euo pipefail for safe shell execution\n\nIMPORTANT — Safe command construction:\n\nNEVER interpolate user-supplied text directly into the shell command string\nALWAYS use printf '%s' '{...}' to pipe JSON via stdin — printf '%s' does not interpret escape sequences or variables in the format argument\nIf user input must appear in a JSON body, construct the JSON object using jq: jq -n --arg q \"user text\" '{query: $q}'\nThe examples below use hardcoded JSON for clarity — when building commands with dynamic values, always use the jq construction pattern above"
      },
      {
        "title": "External Endpoints",
        "body": "URL PatternMethodsData Senthttps://app.nex.ai/api/developers/v1/*GET, POST, PUT, PATCH, DELETEContext queries, records, insights, text content"
      },
      {
        "title": "How to Make API Calls",
        "body": "CRITICAL: The Nex API can take 10-60 seconds to respond. You MUST set timeout: 120 on every exec tool call.\n\nAll API calls go through the wrapper script at {baseDir}/scripts/nex-api.sh:\n\nGET request:\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET /v1/objects\",\n  \"timeout\": 120\n}\n\nPOST with JSON body (pipe body via stdin):\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"query\\\":\\\"What do I know about John?\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/context/ask\",\n  \"timeout\": 120\n}\n\nGET with jq post-processing (pipe output through jq):\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/insights?last=1h' | jq '[.insights[] | {type, content}]'\",\n  \"timeout\": 120\n}\n\nSSE stream:\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh sse /v1/insights/stream\",\n  \"timeout\": 120\n}"
      },
      {
        "title": "Handling Large Responses",
        "body": "Nex API responses (especially Insights and List Records) can be 10KB-100KB+. The exec tool may truncate output. You MUST handle this properly.\n\nPipe output through jq to extract only what you need:\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/insights?last=1h' | jq '[.insights[] | {type, content, confidence_level, who: .target.hint}]'\",\n  \"timeout\": 120\n}\n\nRules for processing API output:\n\nValidate JSON before parsing. If the response doesn't start with { or [, the output may be truncated — retry with a smaller page size or time window.\nUse jq to keep responses small. Pipe output through jq to extract only the fields you need.\nPresent insights to the user for review. Summarize what was returned and let the user decide which insights to act on."
      },
      {
        "title": "API Scopes",
        "body": "Each API key has scopes that control access. Request the scopes you need when creating your key at https://app.nex.ai/settings/developer\n\nScopeGrants Access Toobject.readList objects, view schema, get object definitionsobject.writeCreate/update/delete object definitions and attributesrecord.readGet, list, search records, timelinerecord.writeCreate, update, upsert, delete recordslist.readView lists and list definitionslist.member.readView list memberslist.member.writeAdd, update, delete list membersrelationship.readRead relationship definitionsrelationship.writeCreate/delete relationship definitions and instancestask.readRead taskstask.writeCreate/update/delete tasksnote.readRead notesnote.writeCreate/update/delete notesinsight.streamInsights REST + SSE stream"
      },
      {
        "title": "Choosing the Right API",
        "body": "Before calling an endpoint, decide which approach fits:\n\nSituationUseWhyYou have structured data with known fields (name, email, company)Create/Update RecordDeterministic, exact field mappingYou have unstructured text (meeting notes, email, conversation)ProcessText APIAI extracts entities, creates/updates records, AND generates insights automaticallyYou're unsure which attributes to pass or the data is messyProcessText APILet AI figure out the entities and relationships -- it also discovers things you'd missYou know the exact object slug and want a filtered listAI List JobNatural language query against a known object typeYou're not sure which object type to query, or the question is open-endedAsk APISearches across all entity types and the full context graphYou need to read/export specific records by ID or with paginationGet/List RecordsDirect data accessYou want to find records by name across all typesSearch APIFast text search across all object types\n\nKey insight: ProcessText does everything Create/Update Record does, plus it extracts relationships, generates insights, and handles ambiguity. Prefer ProcessText when working with conversational or unstructured data. Only use the deterministic Record APIs when you have clean, structured data with known attribute slugs."
      },
      {
        "title": "Schema Management",
        "body": "Create Object Definition\n\nCreate a new custom object type.\n\nEndpoint: POST /v1/objects\nScope: object.write\n\nRequest body:\n\nFieldTypeRequiredDescriptionnamestringyesDisplay namename_pluralstringnoPlural display nameslugstringyesURL-safe identifierdescriptionstringnoDescriptiontypestringno\"person\", \"company\", \"custom\", \"deal\" (default: \"custom\")\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"name\\\":\\\"Project\\\",\\\"name_plural\\\":\\\"Projects\\\",\\\"slug\\\":\\\"project\\\",\\\"description\\\":\\\"Project tracker\\\",\\\"type\\\":\\\"custom\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/objects\",\n  \"timeout\": 120\n}\n\nGet Object Definition\n\nGet a single object definition with its attributes.\n\nEndpoint: GET /v1/objects/{slug}\nScope: object.read\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET /v1/objects/project\",\n  \"timeout\": 120\n}\n\nList Objects\n\nDiscover available object types (person, company, etc.) and their attribute schemas. Call this first to learn what fields are available before creating or querying records.\n\nEndpoint: GET /v1/objects\nScope: object.read\n\nQuery Parameters:\n\ninclude_attributes (boolean, optional) -- Set true to include attribute definitions\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/objects?include_attributes=true'\",\n  \"timeout\": 120\n}\n\nResponse:\n\n{\n  \"data\": [\n    {\n      \"id\": \"123\",\n      \"slug\": \"person\",\n      \"name\": \"Person\",\n      \"name_plural\": \"People\",\n      \"type\": \"object\",\n      \"description\": \"A contact or person\",\n      \"attributes\": [\n        {\n          \"id\": \"1\",\n          \"slug\": \"name\",\n          \"name\": \"Name\",\n          \"type\": \"name\",\n          \"options\": {\n            \"is_required\": true,\n            \"is_unique\": false,\n            \"is_multi_value\": false\n          }\n        }\n      ]\n    }\n  ]\n}\n\nUpdate Object Definition\n\nUpdate an existing object definition.\n\nEndpoint: PATCH /v1/objects/{slug}\nScope: object.write\n\nRequest body (all fields optional):\n\nFieldTypeDescriptionnamestringNew display namename_pluralstringNew plural namedescriptionstringNew description\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"name\\\":\\\"Updated Project\\\",\\\"description\\\":\\\"Updated description\\\"}' | bash {baseDir}/scripts/nex-api.sh PATCH /v1/objects/project\",\n  \"timeout\": 120\n}\n\nDelete Object Definition\n\nDelete an object definition and all its records.\n\nEndpoint: DELETE /v1/objects/{slug}\nScope: object.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/objects/project\",\n  \"timeout\": 120\n}\n\nCreate Attribute Definition\n\nAdd a new attribute to an object type.\n\nEndpoint: POST /v1/objects/{slug}/attributes\nScope: object.write\n\nRequest body:\n\nFieldTypeRequiredDescriptionnamestringyesDisplay nameslugstringyesURL-safe identifiertypestringyes\"text\", \"number\", \"email\", \"phone\", \"url\", \"date\", \"boolean\", \"currency\", \"location\", \"select\", \"social_profile\", \"domain\", \"full_name\"descriptionstringnoDescriptionoptionsobjectnois_required, is_unique, is_multi_value, use_raw_format, is_whole_number, select_options\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"name\\\":\\\"Status\\\",\\\"slug\\\":\\\"status\\\",\\\"type\\\":\\\"select\\\",\\\"description\\\":\\\"Current status\\\",\\\"options\\\":{\\\"is_required\\\":true,\\\"select_options\\\":[{\\\"name\\\":\\\"Open\\\"},{\\\"name\\\":\\\"In Progress\\\"},{\\\"name\\\":\\\"Done\\\"}]}}' | bash {baseDir}/scripts/nex-api.sh POST /v1/objects/project/attributes\",\n  \"timeout\": 120\n}\n\nUpdate Attribute Definition\n\nUpdate an existing attribute definition.\n\nEndpoint: PATCH /v1/objects/{slug}/attributes/{attr_id}\nScope: object.write\n\nRequest body (all fields optional):\n\nFieldTypeDescriptionnamestringNew display namedescriptionstringNew descriptionoptionsobjectis_required, select_options, use_raw_format, is_whole_number\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"name\\\":\\\"Updated Status\\\",\\\"options\\\":{\\\"is_required\\\":false}}' | bash {baseDir}/scripts/nex-api.sh PATCH /v1/objects/project/attributes/456\",\n  \"timeout\": 120\n}\n\nDelete Attribute Definition\n\nRemove an attribute from an object type.\n\nEndpoint: DELETE /v1/objects/{slug}/attributes/{attr_id}\nScope: object.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/objects/project/attributes/456\",\n  \"timeout\": 120\n}"
      },
      {
        "title": "Records",
        "body": "Prefer ProcessText over these endpoints when your input is unstructured text (conversation transcripts, meeting notes, emails). ProcessText automatically creates and updates records, extracts relationships, and generates insights -- all from raw text. Use the endpoints below only when you have clean, structured data with known attribute slugs and values.\n\nCreate Record\n\nCreate a new record for an object type.\n\nEndpoint: POST /v1/objects/{slug}\nScope: record.write\n\nRequest body:\n\nattributes (required) -- Must include name (string or object). Additional fields depend on the object schema.\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"attributes\\\":{\\\"name\\\":{\\\"first_name\\\":\\\"Jane\\\",\\\"last_name\\\":\\\"Doe\\\"},\\\"email\\\":\\\"jane@example.com\\\",\\\"company\\\":\\\"Acme Corp\\\"}}' | bash {baseDir}/scripts/nex-api.sh POST /v1/objects/person\",\n  \"timeout\": 120\n}\n\nResponse:\n\n{\n  \"id\": \"789\",\n  \"object_id\": \"123\",\n  \"type\": \"person\",\n  \"workspace_id\": \"111\",\n  \"attributes\": {\n    \"name\": {\"first_name\": \"Jane\", \"last_name\": \"Doe\"},\n    \"email\": \"jane@example.com\",\n    \"company\": \"Acme Corp\"\n  },\n  \"created_at\": \"2026-02-11T10:00:00Z\",\n  \"updated_at\": \"2026-02-11T10:00:00Z\"\n}\n\nUpsert Record\n\nCreate a record if it doesn't exist, or update it if a match is found on the specified attribute.\n\nEndpoint: PUT /v1/objects/{slug}\nScope: record.write\n\nRequest body:\n\nattributes (required) -- Must include name when creating\nmatching_attribute (required) -- Slug or ID of the attribute to match on (e.g., email)\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"matching_attribute\\\":\\\"email\\\",\\\"attributes\\\":{\\\"name\\\":\\\"Jane Doe\\\",\\\"email\\\":\\\"jane@example.com\\\",\\\"job_title\\\":\\\"VP of Sales\\\"}}' | bash {baseDir}/scripts/nex-api.sh PUT /v1/objects/person\",\n  \"timeout\": 120\n}\n\nGet Record\n\nRetrieve a specific record by its ID.\n\nEndpoint: GET /v1/records/{record_id}\nScope: record.read\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET /v1/records/789\",\n  \"timeout\": 120\n}\n\nUpdate Record\n\nUpdate specific attributes on an existing record. Only the provided attributes are changed.\n\nEndpoint: PATCH /v1/records/{record_id}\nScope: record.write\n\nRequest body:\n\nattributes -- Object with the fields to update\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"attributes\\\":{\\\"job_title\\\":\\\"CTO\\\",\\\"phone\\\":\\\"+1-555-0123\\\"}}' | bash {baseDir}/scripts/nex-api.sh PATCH /v1/records/789\",\n  \"timeout\": 120\n}\n\nDelete Record\n\nPermanently delete a record.\n\nEndpoint: DELETE /v1/records/{record_id}\nScope: record.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/records/789\",\n  \"timeout\": 120\n}\n\nList Records\n\nList records for an object type with optional filtering, sorting, and pagination.\n\nEndpoint: POST /v1/objects/{slug}/records\nScope: record.read\n\nRequest body:\n\nattributes -- Which attributes to return: \"all\", \"primary\", \"none\", or a custom object\nlimit (integer) -- Number of records to return\noffset (integer) -- Pagination offset\nsort -- Object with attribute (slug) and direction (\"asc\" or \"desc\")\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"attributes\\\":\\\"all\\\",\\\"limit\\\":10,\\\"offset\\\":0,\\\"sort\\\":{\\\"attribute\\\":\\\"updated_at\\\",\\\"direction\\\":\\\"desc\\\"}}' | bash {baseDir}/scripts/nex-api.sh POST /v1/objects/person/records\",\n  \"timeout\": 120\n}\n\nResponse:\n\n{\n  \"data\": [\n    {\n      \"id\": \"789\",\n      \"type\": \"person\",\n      \"attributes\": {\"name\": \"Jane Doe\", \"email\": \"jane@example.com\"},\n      \"created_at\": \"2026-02-11T10:00:00Z\",\n      \"updated_at\": \"2026-02-11T10:00:00Z\"\n    }\n  ],\n  \"total\": 42,\n  \"limit\": 10,\n  \"offset\": 0\n}\n\nGet Record Timeline\n\nGet paginated timeline events for a record (tasks, notes, attribute changes, etc.).\n\nEndpoint: GET /v1/records/{record_id}/timeline\nScope: record.read\n\nQuery Parameters:\n\nlimit (int) -- Max events (1-100, default: 50)\ncursor (string) -- Pagination cursor from previous response\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/records/1001/timeline?limit=20'\",\n  \"timeout\": 120\n}\n\nResponse:\n\n{\n  \"data\": [\n    {\n      \"id\": \"5000\",\n      \"resource_type\": \"task\",\n      \"resource_id\": \"800\",\n      \"event_type\": \"created\",\n      \"event_payload\": {\n        \"task\": {\"id\": \"800\", \"title\": \"Follow up\", \"priority\": \"high\"}\n      },\n      \"event_timestamp\": \"2026-02-13T10:00:00Z\",\n      \"created_by\": \"developer_api\"\n    }\n  ],\n  \"has_next_page\": true,\n  \"next_cursor\": \"4999\"\n}\n\nResource types: entity, task, note, list_item, attribute\nEvent types: created, updated, deleted, archived"
      },
      {
        "title": "Relationships",
        "body": "Create Relationship Definition\n\nDefine a relationship type between two object types.\n\nEndpoint: POST /v1/relationships\nScope: relationship.write\n\nRequest body:\n\nFieldTypeRequiredDescriptiontypestringyes\"one_to_one\", \"one_to_many\", \"many_to_many\"entity_definition_1_idstringyesFirst object definition IDentity_definition_2_idstringyesSecond object definition IDentity_1_to_2_predicatestringnoLabel for 1->2 directionentity_2_to_1_predicatestringnoLabel for 2->1 direction\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"type\\\":\\\"one_to_many\\\",\\\"entity_definition_1_id\\\":\\\"123\\\",\\\"entity_definition_2_id\\\":\\\"456\\\",\\\"entity_1_to_2_predicate\\\":\\\"has\\\",\\\"entity_2_to_1_predicate\\\":\\\"belongs to\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/relationships\",\n  \"timeout\": 120\n}\n\nResponse:\n\n{\n  \"id\": \"789\",\n  \"type\": \"one_to_many\",\n  \"entity_definition_1_id\": \"123\",\n  \"entity_definition_2_id\": \"456\",\n  \"entity_1_to_2_predicate\": \"has\",\n  \"entity_2_to_1_predicate\": \"belongs to\",\n  \"created_at\": \"2026-02-13T10:00:00Z\"\n}\n\nList Relationship Definitions\n\nGet all relationship definitions in the workspace.\n\nEndpoint: GET /v1/relationships\nScope: relationship.read\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET /v1/relationships\",\n  \"timeout\": 120\n}\n\nDelete Relationship Definition\n\nRemove a relationship definition.\n\nEndpoint: DELETE /v1/relationships/{id}\nScope: relationship.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/relationships/789\",\n  \"timeout\": 120\n}\n\nCreate Relationship Instance\n\nLink two records using an existing relationship definition.\n\nEndpoint: POST /v1/records/{record_id}/relationships\nScope: relationship.write\n\nRequest body:\n\nFieldTypeRequiredDescriptiondefinition_idstringyesRelationship definition IDentity_1_idstringyesFirst record IDentity_2_idstringyesSecond record ID\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"definition_id\\\":\\\"789\\\",\\\"entity_1_id\\\":\\\"1001\\\",\\\"entity_2_id\\\":\\\"2002\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/records/1001/relationships\",\n  \"timeout\": 120\n}\n\nDelete Relationship Instance\n\nRemove a relationship between two records.\n\nEndpoint: DELETE /v1/records/{record_id}/relationships/{relationship_id}\nScope: relationship.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/records/1001/relationships/5001\",\n  \"timeout\": 120\n}"
      },
      {
        "title": "Lists",
        "body": "List Object Lists\n\nGet all lists associated with an object type.\n\nEndpoint: GET /v1/objects/{slug}/lists\nScope: list.read\n\nParameters:\n\nslug (path) -- Object type slug (e.g., person, company)\ninclude_attributes (query, optional) -- Include attribute definitions\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/objects/person/lists?include_attributes=true'\",\n  \"timeout\": 120\n}\n\nResponse:\n\n{\n  \"data\": [\n    {\n      \"id\": \"456\",\n      \"slug\": \"vip-contacts\",\n      \"name\": \"VIP Contacts\",\n      \"type\": \"list\",\n      \"attributes\": []\n    }\n  ]\n}\n\nCreate List\n\nCreate a new list under an object type.\n\nEndpoint: POST /v1/objects/{slug}/lists\nScope: object.write\n\nRequest body:\n\nFieldTypeRequiredDescriptionnamestringyesList display namename_pluralstringnoPlural nameslugstringyesURL-safe identifierdescriptionstringnoDescription\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"name\\\":\\\"VIP Contacts\\\",\\\"slug\\\":\\\"vip-contacts\\\",\\\"description\\\":\\\"High-value contacts\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/objects/contact/lists\",\n  \"timeout\": 120\n}\n\nGet List\n\nGet a list definition by ID.\n\nEndpoint: GET /v1/lists/{id}\nScope: list.read\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET /v1/lists/300\",\n  \"timeout\": 120\n}\n\nDelete List\n\nDelete a list definition.\n\nEndpoint: DELETE /v1/lists/{id}\nScope: object.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/lists/300\",\n  \"timeout\": 120\n}\n\nAdd List Member\n\nAdd an existing record to a list.\n\nEndpoint: POST /v1/lists/{id}\nScope: list.member.write\n\nRequest body:\n\nparent_id (required) -- ID of the existing record to add\nattributes (optional) -- List-specific attribute values\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"parent_id\\\":\\\"789\\\",\\\"attributes\\\":{\\\"status\\\":\\\"active\\\"}}' | bash {baseDir}/scripts/nex-api.sh POST /v1/lists/456\",\n  \"timeout\": 120\n}\n\nUpsert List Member\n\nAdd a record to a list, or update its list-specific attributes if already a member.\n\nEndpoint: PUT /v1/lists/{id}\nScope: list.member.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"parent_id\\\":\\\"789\\\",\\\"attributes\\\":{\\\"priority\\\":\\\"high\\\"}}' | bash {baseDir}/scripts/nex-api.sh PUT /v1/lists/456\",\n  \"timeout\": 120\n}\n\nList Records in a List\n\nGet paginated records from a specific list.\n\nEndpoint: POST /v1/lists/{id}/records\nScope: list.member.read\n\nRequest body: Same as List Records (attributes, limit, offset, sort)\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"attributes\\\":\\\"all\\\",\\\"limit\\\":20}' | bash {baseDir}/scripts/nex-api.sh POST /v1/lists/456/records\",\n  \"timeout\": 120\n}\n\nUpdate List Record\n\nUpdate list-specific attributes for a record within a list.\n\nEndpoint: PATCH /v1/lists/{id}/records/{record_id}\nScope: list.member.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"attributes\\\":{\\\"status\\\":\\\"closed-won\\\"}}' | bash {baseDir}/scripts/nex-api.sh PATCH /v1/lists/456/records/789\",\n  \"timeout\": 120\n}\n\nDelete List Record\n\nRemove a record from a list.\n\nEndpoint: DELETE /v1/lists/{id}/records/{record_id}\nScope: record.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/lists/300/records/4001\",\n  \"timeout\": 120\n}"
      },
      {
        "title": "Tasks",
        "body": "Create Task\n\nCreate a new task, optionally linked to records and assigned to users.\n\nEndpoint: POST /v1/tasks\nScope: task.write\n\nRequest body:\n\nFieldTypeRequiredDescriptiontitlestringyesTask title (non-empty)descriptionstringnoTask descriptionprioritystringno\"low\", \"medium\", \"high\", \"urgent\" (default: \"unspecified\")due_datestring (RFC3339)noDue dateentity_idsstring[]noAssociated record IDsassignee_idsstring[]noAssigned user IDs\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"title\\\":\\\"Follow up with client\\\",\\\"description\\\":\\\"Discuss contract renewal\\\",\\\"priority\\\":\\\"high\\\",\\\"due_date\\\":\\\"2026-03-01T09:00:00Z\\\",\\\"entity_ids\\\":[\\\"1001\\\",\\\"1002\\\"],\\\"assignee_ids\\\":[\\\"50\\\"]}' | bash {baseDir}/scripts/nex-api.sh POST /v1/tasks\",\n  \"timeout\": 120\n}\n\nResponse:\n\n{\n  \"id\": \"800\",\n  \"title\": \"Follow up with client\",\n  \"description\": \"Discuss contract renewal\",\n  \"priority\": \"high\",\n  \"due_date\": \"2026-03-01T09:00:00Z\",\n  \"assignee_ids\": [\"50\"],\n  \"entity_ids\": [\"1001\", \"1002\"],\n  \"created_by\": \"developer_api\",\n  \"created_at\": \"2026-02-13T10:00:00Z\"\n}\n\nList Tasks\n\nList tasks with optional filtering.\n\nEndpoint: GET /v1/tasks\nScope: task.read\n\nQuery Parameters:\n\nParamTypeDescriptionentity_idstringFilter by associated recordassignee_idstringFilter by assigneesearchstringSearch task titlesis_completedbooltrue/falselimitintMax results (1-500, default: 100)offsetintPagination offset (default: 0)\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/tasks?entity_id=1001&is_completed=false&limit=20'\",\n  \"timeout\": 120\n}\n\nResponse:\n\n{\n  \"data\": [],\n  \"has_more\": true,\n  \"total\": 47,\n  \"next_offset\": 20\n}\n\nGet Task\n\nGet a single task by ID.\n\nEndpoint: GET /v1/tasks/{task_id}\nScope: task.read\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET /v1/tasks/800\",\n  \"timeout\": 120\n}\n\nUpdate Task\n\nUpdate a task's fields. All fields are optional.\n\nEndpoint: PATCH /v1/tasks/{task_id}\nScope: task.write\n\nRequest body (all fields optional):\n\nFieldTypeDescriptiontitlestringNew title (cannot be empty)descriptionstringNew description (empty string clears it)prioritystringNew priority (empty string clears it)due_datestring (RFC3339)New due dateis_completedboolMark complete/incompleteentity_idsstring[]Replace associated recordsassignee_idsstring[]Replace assignees\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"priority\\\":\\\"urgent\\\",\\\"is_completed\\\":true}' | bash {baseDir}/scripts/nex-api.sh PATCH /v1/tasks/800\",\n  \"timeout\": 120\n}\n\nDelete Task\n\nArchive a task (soft delete).\n\nEndpoint: DELETE /v1/tasks/{task_id}\nScope: task.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/tasks/800\",\n  \"timeout\": 120\n}"
      },
      {
        "title": "Notes",
        "body": "Create Note\n\nCreate a new note, optionally linked to a record.\n\nEndpoint: POST /v1/notes\nScope: note.write\n\nRequest body:\n\nFieldTypeRequiredDescriptiontitlestringyesNote title (non-empty)contentstringnoNote body textentity_idstringnoAssociated record ID\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"title\\\":\\\"Meeting notes\\\",\\\"content\\\":\\\"Discussed Q3 roadmap...\\\",\\\"entity_id\\\":\\\"1001\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/notes\",\n  \"timeout\": 120\n}\n\nResponse:\n\n{\n  \"id\": \"900\",\n  \"title\": \"Meeting notes\",\n  \"content\": \"Discussed Q3 roadmap...\",\n  \"entity_id\": \"1001\",\n  \"created_by\": \"developer_api\",\n  \"created_at\": \"2026-02-13T10:00:00Z\"\n}\n\nList Notes\n\nList notes, optionally filtered by associated record.\n\nEndpoint: GET /v1/notes\nScope: note.read\n\nQuery Parameters:\n\nParamTypeDescriptionentity_idstringFilter notes by associated record\n\nResponse capped at 200 notes max.\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/notes?entity_id=1001'\",\n  \"timeout\": 120\n}\n\nGet Note\n\nGet a single note by ID.\n\nEndpoint: GET /v1/notes/{note_id}\nScope: note.read\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET /v1/notes/900\",\n  \"timeout\": 120\n}\n\nUpdate Note\n\nUpdate a note's fields.\n\nEndpoint: PATCH /v1/notes/{note_id}\nScope: note.write\n\nRequest body (all fields optional):\n\nFieldTypeDescriptiontitlestringNew titlecontentstringNew contententity_idstringChange associated record\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"title\\\":\\\"Updated meeting notes\\\",\\\"content\\\":\\\"Added action items...\\\"}' | bash {baseDir}/scripts/nex-api.sh PATCH /v1/notes/900\",\n  \"timeout\": 120\n}\n\nDelete Note\n\nArchive a note (soft delete).\n\nEndpoint: DELETE /v1/notes/{note_id}\nScope: note.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/notes/900\",\n  \"timeout\": 120\n}"
      },
      {
        "title": "Search",
        "body": "Search Records\n\nSearch records by name across all object types.\n\nEndpoint: POST /v1/search\nScope: record.read\n\nRequest body:\n\nFieldTypeRequiredDescriptionquerystringyesSearch query (1-500 chars)\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"query\\\":\\\"john doe\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/search\",\n  \"timeout\": 120\n}\n\nResponse:\n\n{\n  \"results\": {\n    \"person\": [\n      {\n        \"id\": \"1001\",\n        \"primary_value\": \"John Doe\",\n        \"matched_value\": \"John Doe\",\n        \"score\": 0.95,\n        \"entity_definition_id\": \"10\"\n      }\n    ],\n    \"company\": [\n      {\n        \"id\": \"2001\",\n        \"primary_value\": \"Doe Industries\",\n        \"matched_value\": \"Doe Industries\",\n        \"score\": 0.72,\n        \"entity_definition_id\": \"11\"\n      }\n    ]\n  },\n  \"errored_search_types\": []\n}\n\nResults are grouped by object type (e.g., \"person\", \"company\", \"deal\"). If some search types fail, partial results are returned with errored_search_types listing which types had errors."
      },
      {
        "title": "Context & AI",
        "body": "Query Context (Ask API)\n\nUse this when you need to recall information about contacts, companies, or relationships.\n\nEndpoint: POST /v1/context/ask\nScope: record.read\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"query\\\":\\\"What do I know about John Smith?\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/context/ask\",\n  \"timeout\": 120\n}\n\nResponse:\n\n{\n  \"answer\": \"John Smith is a VP of Sales at Acme Corp...\",\n  \"entities_considered\": [\n    {\"id\": 123, \"name\": \"John Smith\", \"type\": \"contact\"}\n  ],\n  \"signals_used\": [\n    {\"id\": 456, \"content\": \"Met at conference last month\"}\n  ],\n  \"metadata\": {\n    \"query_type\": \"entity_specific\"\n  }\n}\n\nExample queries:\n\n\"Who are my most engaged contacts this week?\"\n\"What companies are we working with in the healthcare sector?\"\n\"What was discussed in my last meeting with Sarah?\"\n\nAdd Context (ProcessText API)\n\nUse this to ingest new information from conversations, meeting notes, or other text.\n\nEndpoint: POST /v1/context/text\nScope: record.write\n\nRequest body:\n\ncontent (required) -- The text to process\ncontext (optional) -- Additional context about the text (e.g., \"Sales call notes\")\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"content\\\":\\\"Had a great call with John Smith from Acme Corp.\\\",\\\"context\\\":\\\"Sales call notes\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/context/text\",\n  \"timeout\": 120\n}\n\nResponse:\n\n{\n  \"artifact_id\": \"abc123\"\n}\n\nAfter calling ProcessText, use Get Artifact Status to check processing results.\n\nGet Artifact Status\n\nCheck the processing status and results after calling ProcessText.\n\nEndpoint: GET /v1/context/artifacts/{artifact_id}\nScope: record.read\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET /v1/context/artifacts/abc123\",\n  \"timeout\": 120\n}\n\nResponse:\n\n{\n  \"operation_id\": 48066188026052610,\n  \"status\": \"completed\",\n  \"result\": {\n    \"entities_extracted\": [\n      {\"name\": \"John Smith\", \"type\": \"PERSON\", \"action\": \"created\"},\n      {\"name\": \"Acme Corp\", \"type\": \"COMPANY\", \"action\": \"updated\"}\n    ],\n    \"entities_created\": 1,\n    \"entities_updated\": 1,\n    \"relationships\": 1,\n    \"insights\": [\n      {\"content\": \"Acme Corp expanding to APAC\", \"confidence\": 0.85}\n    ],\n    \"tasks\": []\n  },\n  \"created_at\": \"2026-02-05T10:30:00Z\",\n  \"completed_at\": \"2026-02-05T10:30:15Z\"\n}\n\nStatus values: pending, processing, completed, failed\n\nTypical workflow:\n\nCall ProcessText -> get artifact_id\nPoll Get Artifact Status every 2-5 seconds\nStop when status is completed or failed\nReport the extracted entities and insights to the user\n\nCreate AI List Job\n\nUse natural language to search your context graph and generate a curated list of contacts or companies. Use this when you know the object type (contact or company) and want AI to filter and rank matches. If you're unsure which object type applies or the question is open-ended, use the Ask API instead.\n\nEndpoint: POST /v1/context/list/jobs\nScope: list.member.write\n\nRequest body:\n\nquery (required) -- Natural language search query\nobject_type (optional) -- \"contact\" or \"company\" (default: \"contact\")\nlimit (optional) -- Number of results (default: 50, max: 100)\ninclude_attributes (optional) -- Include all entity attribute values (default: false)\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"query\\\":\\\"high priority contacts in enterprise deals\\\",\\\"object_type\\\":\\\"contact\\\",\\\"limit\\\":20,\\\"include_attributes\\\":true}' | bash {baseDir}/scripts/nex-api.sh POST /v1/context/list/jobs\",\n  \"timeout\": 120\n}\n\nResponse:\n\n{\n  \"message\": {\n    \"job_id\": \"12345678901234567\",\n    \"status\": \"pending\"\n  }\n}\n\nGet AI List Job Status\n\nCheck status and results of an AI list generation job. Poll until status is completed or failed.\n\nEndpoint: GET /v1/context/list/jobs/{job_id}\nScope: list.member.read\n\nQuery Parameters:\n\ninclude_attributes (boolean, optional) -- Include full attributes for each entity\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/context/list/jobs/12345678901234567?include_attributes=true'\",\n  \"timeout\": 120\n}\n\nResponse (completed):\n\n{\n  \"message\": {\n    \"job_id\": \"12345678901234567\",\n    \"status\": \"completed\",\n    \"created_at\": \"2026-02-11T10:00:00Z\",\n    \"count\": 5,\n    \"query_interpretation\": \"Finding contacts involved in enterprise-level deals marked as high priority\",\n    \"entities\": [\n      {\n        \"id\": \"789\",\n        \"name\": \"Jane Doe\",\n        \"type\": \"contact\",\n        \"reason\": \"Lead on $500K enterprise deal with Acme Corp, marked high priority\",\n        \"highlights\": [\n          \"Contract negotiation in progress\",\n          \"Budget approved Q1 2026\",\n          \"Executive sponsor confirmed\"\n        ],\n        \"attributes\": {}\n      }\n    ]\n  }\n}\n\nStatus values: pending, processing, completed, failed\n\nTypical workflow:\n\nCreate job with natural language query -> get job_id\nPoll Get AI List Job Status every 2-5 seconds\nStop when status is completed or failed\nPresent the matched entities with reasons and highlights"
      },
      {
        "title": "Insights",
        "body": "Get Insights (REST)\n\nQuery insights by time window. Supports two modes.\n\nEndpoint: GET /v1/insights\nScope: insight.stream\n\nQuery Parameters:\n\nlast -- Duration window, e.g., 30m, 2h, 1h30m\nfrom + to -- UTC time range in RFC3339 format\nlimit (optional) -- Max results (default: 20, max: 100)\n\nIf neither last nor from/to is specified, returns the most recent insights (default 20).\n\nLast 30 minutes:\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/insights?last=30m'\",\n  \"timeout\": 120\n}\n\nBetween two dates:\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/insights?from=2026-02-07T00:00:00Z&to=2026-02-08T00:00:00Z'\",\n  \"timeout\": 120\n}\n\nRecommended: Pipe through jq to extract a summary (responses can be 10-100KB+):\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/insights?last=1h' | jq '{insight_count: (.insights | length), insights: [.insights[] | {type, content, confidence_level, who: .target.hint, entity_type: .target.entity_type}]}'\",\n  \"timeout\": 120\n}\n\nWhen to use:\n\nWhen polling periodically instead of maintaining SSE connection\nTo get current insight state on startup\nAs fallback when SSE connection drops\nTo review insights from a specific time period\n\nNotable insight categories (summarize for user review):\n\nNew contacts or companies\nOpportunities, risks, or milestones\nMeetings scheduled or occurred\nRelationship changes\nHigh-confidence insights (confidence_level of \"high\" or \"very_high\")\n\nReal-time Insight Stream (SSE)\n\nReceive insights as they are discovered in real time.\n\nEndpoint: GET /v1/insights/stream\nScope: insight.stream\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh sse /v1/insights/stream\",\n  \"timeout\": 120\n}\n\nConnection behavior:\n\nServer sends : connected workspace_id=... token_id=... on connection\nRecent insights are replayed immediately via insight.replay events (up to 20)\nKeepalive comments (: keepalive) sent every 30 seconds\nReal-time events arrive as: event: insight.batch.created\\ndata: {...}\\n\\n\n\nEvent payload structure:\n\n{\n  \"workspace\": {\n    \"name\": \"Acme Corp\",\n    \"slug\": \"acme\",\n    \"business_info\": {\"name\": \"Acme Corp\", \"domain\": \"acme.com\"}\n  },\n  \"insights\": [{\n    \"type\": \"opportunity\",\n    \"type_description\": \"A potential business opportunity\",\n    \"content\": \"Budget approval expected next quarter\",\n    \"confidence\": 0.85,\n    \"confidence_level\": \"high\",\n    \"target\": {\n      \"type\": \"entity\",\n      \"entity_type\": \"person\",\n      \"hint\": \"John Smith\",\n      \"signals\": [{\"type\": \"email\", \"value\": \"john@acme.com\"}]\n    },\n    \"evidence\": [{\n      \"excerpt\": \"We should have budget approval by Q2\",\n      \"artifact\": {\"type\": \"email\", \"subject\": \"RE: Proposal\"}\n    }]\n  }],\n  \"insight_count\": 1,\n  \"emitted_at\": \"2026-02-05T10:30:00Z\"\n}\n\nInsight types: opportunity, risk, relationship, preference, milestone, activity, characteristic, role_detail\n\nWhen to use: Keep the SSE connection open in the background during active conversations. For one-off queries, use the Ask API instead."
      },
      {
        "title": "Error Handling",
        "body": "Status CodeMeaningAction400Invalid requestCheck request body and parameters401Invalid API keyCheck NEX_API_KEY is set correctly403Missing scopeVerify API key has the required scope404Not foundCheck the record/object/list ID exists429Rate limitedWait and retry with exponential backoff500Server errorRetry after a brief delay"
      },
      {
        "title": "When to Use Nex",
        "body": "Good use cases:\n\nBefore responding to a message, query for context about the person\nAfter a conversation, process the transcript to update the context graph\nWhen asked about relationships or history with contacts/companies\nCreating or updating records from conversation context\nBuilding targeted lists from your contact database\nLooking up record details before a meeting\nCreating tasks and notes to track follow-ups\nSearching across all record types to find specific people or companies\nDefining custom object schemas and relationships for your workspace\n\nNot for:\n\nGeneral knowledge questions (use web search)\nReal-time calendar/scheduling (use calendar tools)\nBulk data entry that requires the full Nex UI"
      }
    ],
    "body": "Nex - Real-time Organizational Context for AI Agents\n\nNex shares real-time organizational context with your AI agent: query your context graph, process conversations, receive live insights, and manage the underlying records, schemas, relationships, tasks, and notes.\n\nSetup\nGet your API key from https://app.nex.ai/settings/developer\nAdd to ~/.openclaw/openclaw.json:\n{\n  \"skills\": {\n    \"entries\": {\n      \"nex\": {\n        \"enabled\": true,\n        \"env\": {\n          \"NEX_API_KEY\": \"sk-your_key_here\"\n        }\n      }\n    }\n  }\n}\n\nSecurity & Privacy\nAll API calls are routed through a validated wrapper script (scripts/nex-api.sh)\nThe wrapper validates that all requests go to https://app.nex.ai/api/developers only\nAPI key is read from $NEX_API_KEY environment variable (never from prompts)\nJSON request bodies are passed via stdin (printf '%s' pipe) to avoid shell injection\nThe wrapper uses set -euo pipefail for safe shell execution\n\nIMPORTANT — Safe command construction:\n\nNEVER interpolate user-supplied text directly into the shell command string\nALWAYS use printf '%s' '{...}' to pipe JSON via stdin — printf '%s' does not interpret escape sequences or variables in the format argument\nIf user input must appear in a JSON body, construct the JSON object using jq: jq -n --arg q \"user text\" '{query: $q}'\nThe examples below use hardcoded JSON for clarity — when building commands with dynamic values, always use the jq construction pattern above\nExternal Endpoints\nURL Pattern\tMethods\tData Sent\nhttps://app.nex.ai/api/developers/v1/*\tGET, POST, PUT, PATCH, DELETE\tContext queries, records, insights, text content\nHow to Make API Calls\n\nCRITICAL: The Nex API can take 10-60 seconds to respond. You MUST set timeout: 120 on every exec tool call.\n\nAll API calls go through the wrapper script at {baseDir}/scripts/nex-api.sh:\n\nGET request:\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET /v1/objects\",\n  \"timeout\": 120\n}\n\n\nPOST with JSON body (pipe body via stdin):\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"query\\\":\\\"What do I know about John?\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/context/ask\",\n  \"timeout\": 120\n}\n\n\nGET with jq post-processing (pipe output through jq):\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/insights?last=1h' | jq '[.insights[] | {type, content}]'\",\n  \"timeout\": 120\n}\n\n\nSSE stream:\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh sse /v1/insights/stream\",\n  \"timeout\": 120\n}\n\nHandling Large Responses\n\nNex API responses (especially Insights and List Records) can be 10KB-100KB+. The exec tool may truncate output. You MUST handle this properly.\n\nPipe output through jq to extract only what you need:\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/insights?last=1h' | jq '[.insights[] | {type, content, confidence_level, who: .target.hint}]'\",\n  \"timeout\": 120\n}\n\n\nRules for processing API output:\n\nValidate JSON before parsing. If the response doesn't start with { or [, the output may be truncated — retry with a smaller page size or time window.\nUse jq to keep responses small. Pipe output through jq to extract only the fields you need.\nPresent insights to the user for review. Summarize what was returned and let the user decide which insights to act on.\nAPI Scopes\n\nEach API key has scopes that control access. Request the scopes you need when creating your key at https://app.nex.ai/settings/developer\n\nScope\tGrants Access To\nobject.read\tList objects, view schema, get object definitions\nobject.write\tCreate/update/delete object definitions and attributes\nrecord.read\tGet, list, search records, timeline\nrecord.write\tCreate, update, upsert, delete records\nlist.read\tView lists and list definitions\nlist.member.read\tView list members\nlist.member.write\tAdd, update, delete list members\nrelationship.read\tRead relationship definitions\nrelationship.write\tCreate/delete relationship definitions and instances\ntask.read\tRead tasks\ntask.write\tCreate/update/delete tasks\nnote.read\tRead notes\nnote.write\tCreate/update/delete notes\ninsight.stream\tInsights REST + SSE stream\nChoosing the Right API\n\nBefore calling an endpoint, decide which approach fits:\n\nSituation\tUse\tWhy\nYou have structured data with known fields (name, email, company)\tCreate/Update Record\tDeterministic, exact field mapping\nYou have unstructured text (meeting notes, email, conversation)\tProcessText API\tAI extracts entities, creates/updates records, AND generates insights automatically\nYou're unsure which attributes to pass or the data is messy\tProcessText API\tLet AI figure out the entities and relationships -- it also discovers things you'd miss\nYou know the exact object slug and want a filtered list\tAI List Job\tNatural language query against a known object type\nYou're not sure which object type to query, or the question is open-ended\tAsk API\tSearches across all entity types and the full context graph\nYou need to read/export specific records by ID or with pagination\tGet/List Records\tDirect data access\nYou want to find records by name across all types\tSearch API\tFast text search across all object types\n\nKey insight: ProcessText does everything Create/Update Record does, plus it extracts relationships, generates insights, and handles ambiguity. Prefer ProcessText when working with conversational or unstructured data. Only use the deterministic Record APIs when you have clean, structured data with known attribute slugs.\n\nCapabilities\nSchema Management\nCreate Object Definition\n\nCreate a new custom object type.\n\nEndpoint: POST /v1/objects Scope: object.write\n\nRequest body:\n\nField\tType\tRequired\tDescription\nname\tstring\tyes\tDisplay name\nname_plural\tstring\tno\tPlural display name\nslug\tstring\tyes\tURL-safe identifier\ndescription\tstring\tno\tDescription\ntype\tstring\tno\t\"person\", \"company\", \"custom\", \"deal\" (default: \"custom\")\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"name\\\":\\\"Project\\\",\\\"name_plural\\\":\\\"Projects\\\",\\\"slug\\\":\\\"project\\\",\\\"description\\\":\\\"Project tracker\\\",\\\"type\\\":\\\"custom\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/objects\",\n  \"timeout\": 120\n}\n\nGet Object Definition\n\nGet a single object definition with its attributes.\n\nEndpoint: GET /v1/objects/{slug} Scope: object.read\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET /v1/objects/project\",\n  \"timeout\": 120\n}\n\nList Objects\n\nDiscover available object types (person, company, etc.) and their attribute schemas. Call this first to learn what fields are available before creating or querying records.\n\nEndpoint: GET /v1/objects Scope: object.read\n\nQuery Parameters:\n\ninclude_attributes (boolean, optional) -- Set true to include attribute definitions\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/objects?include_attributes=true'\",\n  \"timeout\": 120\n}\n\n\nResponse:\n\n{\n  \"data\": [\n    {\n      \"id\": \"123\",\n      \"slug\": \"person\",\n      \"name\": \"Person\",\n      \"name_plural\": \"People\",\n      \"type\": \"object\",\n      \"description\": \"A contact or person\",\n      \"attributes\": [\n        {\n          \"id\": \"1\",\n          \"slug\": \"name\",\n          \"name\": \"Name\",\n          \"type\": \"name\",\n          \"options\": {\n            \"is_required\": true,\n            \"is_unique\": false,\n            \"is_multi_value\": false\n          }\n        }\n      ]\n    }\n  ]\n}\n\nUpdate Object Definition\n\nUpdate an existing object definition.\n\nEndpoint: PATCH /v1/objects/{slug} Scope: object.write\n\nRequest body (all fields optional):\n\nField\tType\tDescription\nname\tstring\tNew display name\nname_plural\tstring\tNew plural name\ndescription\tstring\tNew description\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"name\\\":\\\"Updated Project\\\",\\\"description\\\":\\\"Updated description\\\"}' | bash {baseDir}/scripts/nex-api.sh PATCH /v1/objects/project\",\n  \"timeout\": 120\n}\n\nDelete Object Definition\n\nDelete an object definition and all its records.\n\nEndpoint: DELETE /v1/objects/{slug} Scope: object.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/objects/project\",\n  \"timeout\": 120\n}\n\nCreate Attribute Definition\n\nAdd a new attribute to an object type.\n\nEndpoint: POST /v1/objects/{slug}/attributes Scope: object.write\n\nRequest body:\n\nField\tType\tRequired\tDescription\nname\tstring\tyes\tDisplay name\nslug\tstring\tyes\tURL-safe identifier\ntype\tstring\tyes\t\"text\", \"number\", \"email\", \"phone\", \"url\", \"date\", \"boolean\", \"currency\", \"location\", \"select\", \"social_profile\", \"domain\", \"full_name\"\ndescription\tstring\tno\tDescription\noptions\tobject\tno\tis_required, is_unique, is_multi_value, use_raw_format, is_whole_number, select_options\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"name\\\":\\\"Status\\\",\\\"slug\\\":\\\"status\\\",\\\"type\\\":\\\"select\\\",\\\"description\\\":\\\"Current status\\\",\\\"options\\\":{\\\"is_required\\\":true,\\\"select_options\\\":[{\\\"name\\\":\\\"Open\\\"},{\\\"name\\\":\\\"In Progress\\\"},{\\\"name\\\":\\\"Done\\\"}]}}' | bash {baseDir}/scripts/nex-api.sh POST /v1/objects/project/attributes\",\n  \"timeout\": 120\n}\n\nUpdate Attribute Definition\n\nUpdate an existing attribute definition.\n\nEndpoint: PATCH /v1/objects/{slug}/attributes/{attr_id} Scope: object.write\n\nRequest body (all fields optional):\n\nField\tType\tDescription\nname\tstring\tNew display name\ndescription\tstring\tNew description\noptions\tobject\tis_required, select_options, use_raw_format, is_whole_number\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"name\\\":\\\"Updated Status\\\",\\\"options\\\":{\\\"is_required\\\":false}}' | bash {baseDir}/scripts/nex-api.sh PATCH /v1/objects/project/attributes/456\",\n  \"timeout\": 120\n}\n\nDelete Attribute Definition\n\nRemove an attribute from an object type.\n\nEndpoint: DELETE /v1/objects/{slug}/attributes/{attr_id} Scope: object.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/objects/project/attributes/456\",\n  \"timeout\": 120\n}\n\nRecords\n\nPrefer ProcessText over these endpoints when your input is unstructured text (conversation transcripts, meeting notes, emails). ProcessText automatically creates and updates records, extracts relationships, and generates insights -- all from raw text. Use the endpoints below only when you have clean, structured data with known attribute slugs and values.\n\nCreate Record\n\nCreate a new record for an object type.\n\nEndpoint: POST /v1/objects/{slug} Scope: record.write\n\nRequest body:\n\nattributes (required) -- Must include name (string or object). Additional fields depend on the object schema.\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"attributes\\\":{\\\"name\\\":{\\\"first_name\\\":\\\"Jane\\\",\\\"last_name\\\":\\\"Doe\\\"},\\\"email\\\":\\\"jane@example.com\\\",\\\"company\\\":\\\"Acme Corp\\\"}}' | bash {baseDir}/scripts/nex-api.sh POST /v1/objects/person\",\n  \"timeout\": 120\n}\n\n\nResponse:\n\n{\n  \"id\": \"789\",\n  \"object_id\": \"123\",\n  \"type\": \"person\",\n  \"workspace_id\": \"111\",\n  \"attributes\": {\n    \"name\": {\"first_name\": \"Jane\", \"last_name\": \"Doe\"},\n    \"email\": \"jane@example.com\",\n    \"company\": \"Acme Corp\"\n  },\n  \"created_at\": \"2026-02-11T10:00:00Z\",\n  \"updated_at\": \"2026-02-11T10:00:00Z\"\n}\n\nUpsert Record\n\nCreate a record if it doesn't exist, or update it if a match is found on the specified attribute.\n\nEndpoint: PUT /v1/objects/{slug} Scope: record.write\n\nRequest body:\n\nattributes (required) -- Must include name when creating\nmatching_attribute (required) -- Slug or ID of the attribute to match on (e.g., email)\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"matching_attribute\\\":\\\"email\\\",\\\"attributes\\\":{\\\"name\\\":\\\"Jane Doe\\\",\\\"email\\\":\\\"jane@example.com\\\",\\\"job_title\\\":\\\"VP of Sales\\\"}}' | bash {baseDir}/scripts/nex-api.sh PUT /v1/objects/person\",\n  \"timeout\": 120\n}\n\nGet Record\n\nRetrieve a specific record by its ID.\n\nEndpoint: GET /v1/records/{record_id} Scope: record.read\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET /v1/records/789\",\n  \"timeout\": 120\n}\n\nUpdate Record\n\nUpdate specific attributes on an existing record. Only the provided attributes are changed.\n\nEndpoint: PATCH /v1/records/{record_id} Scope: record.write\n\nRequest body:\n\nattributes -- Object with the fields to update\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"attributes\\\":{\\\"job_title\\\":\\\"CTO\\\",\\\"phone\\\":\\\"+1-555-0123\\\"}}' | bash {baseDir}/scripts/nex-api.sh PATCH /v1/records/789\",\n  \"timeout\": 120\n}\n\nDelete Record\n\nPermanently delete a record.\n\nEndpoint: DELETE /v1/records/{record_id} Scope: record.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/records/789\",\n  \"timeout\": 120\n}\n\nList Records\n\nList records for an object type with optional filtering, sorting, and pagination.\n\nEndpoint: POST /v1/objects/{slug}/records Scope: record.read\n\nRequest body:\n\nattributes -- Which attributes to return: \"all\", \"primary\", \"none\", or a custom object\nlimit (integer) -- Number of records to return\noffset (integer) -- Pagination offset\nsort -- Object with attribute (slug) and direction (\"asc\" or \"desc\")\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"attributes\\\":\\\"all\\\",\\\"limit\\\":10,\\\"offset\\\":0,\\\"sort\\\":{\\\"attribute\\\":\\\"updated_at\\\",\\\"direction\\\":\\\"desc\\\"}}' | bash {baseDir}/scripts/nex-api.sh POST /v1/objects/person/records\",\n  \"timeout\": 120\n}\n\n\nResponse:\n\n{\n  \"data\": [\n    {\n      \"id\": \"789\",\n      \"type\": \"person\",\n      \"attributes\": {\"name\": \"Jane Doe\", \"email\": \"jane@example.com\"},\n      \"created_at\": \"2026-02-11T10:00:00Z\",\n      \"updated_at\": \"2026-02-11T10:00:00Z\"\n    }\n  ],\n  \"total\": 42,\n  \"limit\": 10,\n  \"offset\": 0\n}\n\nGet Record Timeline\n\nGet paginated timeline events for a record (tasks, notes, attribute changes, etc.).\n\nEndpoint: GET /v1/records/{record_id}/timeline Scope: record.read\n\nQuery Parameters:\n\nlimit (int) -- Max events (1-100, default: 50)\ncursor (string) -- Pagination cursor from previous response\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/records/1001/timeline?limit=20'\",\n  \"timeout\": 120\n}\n\n\nResponse:\n\n{\n  \"data\": [\n    {\n      \"id\": \"5000\",\n      \"resource_type\": \"task\",\n      \"resource_id\": \"800\",\n      \"event_type\": \"created\",\n      \"event_payload\": {\n        \"task\": {\"id\": \"800\", \"title\": \"Follow up\", \"priority\": \"high\"}\n      },\n      \"event_timestamp\": \"2026-02-13T10:00:00Z\",\n      \"created_by\": \"developer_api\"\n    }\n  ],\n  \"has_next_page\": true,\n  \"next_cursor\": \"4999\"\n}\n\n\nResource types: entity, task, note, list_item, attribute Event types: created, updated, deleted, archived\n\nRelationships\nCreate Relationship Definition\n\nDefine a relationship type between two object types.\n\nEndpoint: POST /v1/relationships Scope: relationship.write\n\nRequest body:\n\nField\tType\tRequired\tDescription\ntype\tstring\tyes\t\"one_to_one\", \"one_to_many\", \"many_to_many\"\nentity_definition_1_id\tstring\tyes\tFirst object definition ID\nentity_definition_2_id\tstring\tyes\tSecond object definition ID\nentity_1_to_2_predicate\tstring\tno\tLabel for 1->2 direction\nentity_2_to_1_predicate\tstring\tno\tLabel for 2->1 direction\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"type\\\":\\\"one_to_many\\\",\\\"entity_definition_1_id\\\":\\\"123\\\",\\\"entity_definition_2_id\\\":\\\"456\\\",\\\"entity_1_to_2_predicate\\\":\\\"has\\\",\\\"entity_2_to_1_predicate\\\":\\\"belongs to\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/relationships\",\n  \"timeout\": 120\n}\n\n\nResponse:\n\n{\n  \"id\": \"789\",\n  \"type\": \"one_to_many\",\n  \"entity_definition_1_id\": \"123\",\n  \"entity_definition_2_id\": \"456\",\n  \"entity_1_to_2_predicate\": \"has\",\n  \"entity_2_to_1_predicate\": \"belongs to\",\n  \"created_at\": \"2026-02-13T10:00:00Z\"\n}\n\nList Relationship Definitions\n\nGet all relationship definitions in the workspace.\n\nEndpoint: GET /v1/relationships Scope: relationship.read\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET /v1/relationships\",\n  \"timeout\": 120\n}\n\nDelete Relationship Definition\n\nRemove a relationship definition.\n\nEndpoint: DELETE /v1/relationships/{id} Scope: relationship.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/relationships/789\",\n  \"timeout\": 120\n}\n\nCreate Relationship Instance\n\nLink two records using an existing relationship definition.\n\nEndpoint: POST /v1/records/{record_id}/relationships Scope: relationship.write\n\nRequest body:\n\nField\tType\tRequired\tDescription\ndefinition_id\tstring\tyes\tRelationship definition ID\nentity_1_id\tstring\tyes\tFirst record ID\nentity_2_id\tstring\tyes\tSecond record ID\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"definition_id\\\":\\\"789\\\",\\\"entity_1_id\\\":\\\"1001\\\",\\\"entity_2_id\\\":\\\"2002\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/records/1001/relationships\",\n  \"timeout\": 120\n}\n\nDelete Relationship Instance\n\nRemove a relationship between two records.\n\nEndpoint: DELETE /v1/records/{record_id}/relationships/{relationship_id} Scope: relationship.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/records/1001/relationships/5001\",\n  \"timeout\": 120\n}\n\nLists\nList Object Lists\n\nGet all lists associated with an object type.\n\nEndpoint: GET /v1/objects/{slug}/lists Scope: list.read\n\nParameters:\n\nslug (path) -- Object type slug (e.g., person, company)\ninclude_attributes (query, optional) -- Include attribute definitions\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/objects/person/lists?include_attributes=true'\",\n  \"timeout\": 120\n}\n\n\nResponse:\n\n{\n  \"data\": [\n    {\n      \"id\": \"456\",\n      \"slug\": \"vip-contacts\",\n      \"name\": \"VIP Contacts\",\n      \"type\": \"list\",\n      \"attributes\": []\n    }\n  ]\n}\n\nCreate List\n\nCreate a new list under an object type.\n\nEndpoint: POST /v1/objects/{slug}/lists Scope: object.write\n\nRequest body:\n\nField\tType\tRequired\tDescription\nname\tstring\tyes\tList display name\nname_plural\tstring\tno\tPlural name\nslug\tstring\tyes\tURL-safe identifier\ndescription\tstring\tno\tDescription\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"name\\\":\\\"VIP Contacts\\\",\\\"slug\\\":\\\"vip-contacts\\\",\\\"description\\\":\\\"High-value contacts\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/objects/contact/lists\",\n  \"timeout\": 120\n}\n\nGet List\n\nGet a list definition by ID.\n\nEndpoint: GET /v1/lists/{id} Scope: list.read\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET /v1/lists/300\",\n  \"timeout\": 120\n}\n\nDelete List\n\nDelete a list definition.\n\nEndpoint: DELETE /v1/lists/{id} Scope: object.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/lists/300\",\n  \"timeout\": 120\n}\n\nAdd List Member\n\nAdd an existing record to a list.\n\nEndpoint: POST /v1/lists/{id} Scope: list.member.write\n\nRequest body:\n\nparent_id (required) -- ID of the existing record to add\nattributes (optional) -- List-specific attribute values\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"parent_id\\\":\\\"789\\\",\\\"attributes\\\":{\\\"status\\\":\\\"active\\\"}}' | bash {baseDir}/scripts/nex-api.sh POST /v1/lists/456\",\n  \"timeout\": 120\n}\n\nUpsert List Member\n\nAdd a record to a list, or update its list-specific attributes if already a member.\n\nEndpoint: PUT /v1/lists/{id} Scope: list.member.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"parent_id\\\":\\\"789\\\",\\\"attributes\\\":{\\\"priority\\\":\\\"high\\\"}}' | bash {baseDir}/scripts/nex-api.sh PUT /v1/lists/456\",\n  \"timeout\": 120\n}\n\nList Records in a List\n\nGet paginated records from a specific list.\n\nEndpoint: POST /v1/lists/{id}/records Scope: list.member.read\n\nRequest body: Same as List Records (attributes, limit, offset, sort)\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"attributes\\\":\\\"all\\\",\\\"limit\\\":20}' | bash {baseDir}/scripts/nex-api.sh POST /v1/lists/456/records\",\n  \"timeout\": 120\n}\n\nUpdate List Record\n\nUpdate list-specific attributes for a record within a list.\n\nEndpoint: PATCH /v1/lists/{id}/records/{record_id} Scope: list.member.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"attributes\\\":{\\\"status\\\":\\\"closed-won\\\"}}' | bash {baseDir}/scripts/nex-api.sh PATCH /v1/lists/456/records/789\",\n  \"timeout\": 120\n}\n\nDelete List Record\n\nRemove a record from a list.\n\nEndpoint: DELETE /v1/lists/{id}/records/{record_id} Scope: record.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/lists/300/records/4001\",\n  \"timeout\": 120\n}\n\nTasks\nCreate Task\n\nCreate a new task, optionally linked to records and assigned to users.\n\nEndpoint: POST /v1/tasks Scope: task.write\n\nRequest body:\n\nField\tType\tRequired\tDescription\ntitle\tstring\tyes\tTask title (non-empty)\ndescription\tstring\tno\tTask description\npriority\tstring\tno\t\"low\", \"medium\", \"high\", \"urgent\" (default: \"unspecified\")\ndue_date\tstring (RFC3339)\tno\tDue date\nentity_ids\tstring[]\tno\tAssociated record IDs\nassignee_ids\tstring[]\tno\tAssigned user IDs\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"title\\\":\\\"Follow up with client\\\",\\\"description\\\":\\\"Discuss contract renewal\\\",\\\"priority\\\":\\\"high\\\",\\\"due_date\\\":\\\"2026-03-01T09:00:00Z\\\",\\\"entity_ids\\\":[\\\"1001\\\",\\\"1002\\\"],\\\"assignee_ids\\\":[\\\"50\\\"]}' | bash {baseDir}/scripts/nex-api.sh POST /v1/tasks\",\n  \"timeout\": 120\n}\n\n\nResponse:\n\n{\n  \"id\": \"800\",\n  \"title\": \"Follow up with client\",\n  \"description\": \"Discuss contract renewal\",\n  \"priority\": \"high\",\n  \"due_date\": \"2026-03-01T09:00:00Z\",\n  \"assignee_ids\": [\"50\"],\n  \"entity_ids\": [\"1001\", \"1002\"],\n  \"created_by\": \"developer_api\",\n  \"created_at\": \"2026-02-13T10:00:00Z\"\n}\n\nList Tasks\n\nList tasks with optional filtering.\n\nEndpoint: GET /v1/tasks Scope: task.read\n\nQuery Parameters:\n\nParam\tType\tDescription\nentity_id\tstring\tFilter by associated record\nassignee_id\tstring\tFilter by assignee\nsearch\tstring\tSearch task titles\nis_completed\tbool\ttrue/false\nlimit\tint\tMax results (1-500, default: 100)\noffset\tint\tPagination offset (default: 0)\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/tasks?entity_id=1001&is_completed=false&limit=20'\",\n  \"timeout\": 120\n}\n\n\nResponse:\n\n{\n  \"data\": [],\n  \"has_more\": true,\n  \"total\": 47,\n  \"next_offset\": 20\n}\n\nGet Task\n\nGet a single task by ID.\n\nEndpoint: GET /v1/tasks/{task_id} Scope: task.read\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET /v1/tasks/800\",\n  \"timeout\": 120\n}\n\nUpdate Task\n\nUpdate a task's fields. All fields are optional.\n\nEndpoint: PATCH /v1/tasks/{task_id} Scope: task.write\n\nRequest body (all fields optional):\n\nField\tType\tDescription\ntitle\tstring\tNew title (cannot be empty)\ndescription\tstring\tNew description (empty string clears it)\npriority\tstring\tNew priority (empty string clears it)\ndue_date\tstring (RFC3339)\tNew due date\nis_completed\tbool\tMark complete/incomplete\nentity_ids\tstring[]\tReplace associated records\nassignee_ids\tstring[]\tReplace assignees\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"priority\\\":\\\"urgent\\\",\\\"is_completed\\\":true}' | bash {baseDir}/scripts/nex-api.sh PATCH /v1/tasks/800\",\n  \"timeout\": 120\n}\n\nDelete Task\n\nArchive a task (soft delete).\n\nEndpoint: DELETE /v1/tasks/{task_id} Scope: task.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/tasks/800\",\n  \"timeout\": 120\n}\n\nNotes\nCreate Note\n\nCreate a new note, optionally linked to a record.\n\nEndpoint: POST /v1/notes Scope: note.write\n\nRequest body:\n\nField\tType\tRequired\tDescription\ntitle\tstring\tyes\tNote title (non-empty)\ncontent\tstring\tno\tNote body text\nentity_id\tstring\tno\tAssociated record ID\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"title\\\":\\\"Meeting notes\\\",\\\"content\\\":\\\"Discussed Q3 roadmap...\\\",\\\"entity_id\\\":\\\"1001\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/notes\",\n  \"timeout\": 120\n}\n\n\nResponse:\n\n{\n  \"id\": \"900\",\n  \"title\": \"Meeting notes\",\n  \"content\": \"Discussed Q3 roadmap...\",\n  \"entity_id\": \"1001\",\n  \"created_by\": \"developer_api\",\n  \"created_at\": \"2026-02-13T10:00:00Z\"\n}\n\nList Notes\n\nList notes, optionally filtered by associated record.\n\nEndpoint: GET /v1/notes Scope: note.read\n\nQuery Parameters:\n\nParam\tType\tDescription\nentity_id\tstring\tFilter notes by associated record\n\nResponse capped at 200 notes max.\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/notes?entity_id=1001'\",\n  \"timeout\": 120\n}\n\nGet Note\n\nGet a single note by ID.\n\nEndpoint: GET /v1/notes/{note_id} Scope: note.read\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET /v1/notes/900\",\n  \"timeout\": 120\n}\n\nUpdate Note\n\nUpdate a note's fields.\n\nEndpoint: PATCH /v1/notes/{note_id} Scope: note.write\n\nRequest body (all fields optional):\n\nField\tType\tDescription\ntitle\tstring\tNew title\ncontent\tstring\tNew content\nentity_id\tstring\tChange associated record\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"title\\\":\\\"Updated meeting notes\\\",\\\"content\\\":\\\"Added action items...\\\"}' | bash {baseDir}/scripts/nex-api.sh PATCH /v1/notes/900\",\n  \"timeout\": 120\n}\n\nDelete Note\n\nArchive a note (soft delete).\n\nEndpoint: DELETE /v1/notes/{note_id} Scope: note.write\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh DELETE /v1/notes/900\",\n  \"timeout\": 120\n}\n\nSearch\nSearch Records\n\nSearch records by name across all object types.\n\nEndpoint: POST /v1/search Scope: record.read\n\nRequest body:\n\nField\tType\tRequired\tDescription\nquery\tstring\tyes\tSearch query (1-500 chars)\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"query\\\":\\\"john doe\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/search\",\n  \"timeout\": 120\n}\n\n\nResponse:\n\n{\n  \"results\": {\n    \"person\": [\n      {\n        \"id\": \"1001\",\n        \"primary_value\": \"John Doe\",\n        \"matched_value\": \"John Doe\",\n        \"score\": 0.95,\n        \"entity_definition_id\": \"10\"\n      }\n    ],\n    \"company\": [\n      {\n        \"id\": \"2001\",\n        \"primary_value\": \"Doe Industries\",\n        \"matched_value\": \"Doe Industries\",\n        \"score\": 0.72,\n        \"entity_definition_id\": \"11\"\n      }\n    ]\n  },\n  \"errored_search_types\": []\n}\n\n\nResults are grouped by object type (e.g., \"person\", \"company\", \"deal\"). If some search types fail, partial results are returned with errored_search_types listing which types had errors.\n\nContext & AI\nQuery Context (Ask API)\n\nUse this when you need to recall information about contacts, companies, or relationships.\n\nEndpoint: POST /v1/context/ask Scope: record.read\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"query\\\":\\\"What do I know about John Smith?\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/context/ask\",\n  \"timeout\": 120\n}\n\n\nResponse:\n\n{\n  \"answer\": \"John Smith is a VP of Sales at Acme Corp...\",\n  \"entities_considered\": [\n    {\"id\": 123, \"name\": \"John Smith\", \"type\": \"contact\"}\n  ],\n  \"signals_used\": [\n    {\"id\": 456, \"content\": \"Met at conference last month\"}\n  ],\n  \"metadata\": {\n    \"query_type\": \"entity_specific\"\n  }\n}\n\n\nExample queries:\n\n\"Who are my most engaged contacts this week?\"\n\"What companies are we working with in the healthcare sector?\"\n\"What was discussed in my last meeting with Sarah?\"\nAdd Context (ProcessText API)\n\nUse this to ingest new information from conversations, meeting notes, or other text.\n\nEndpoint: POST /v1/context/text Scope: record.write\n\nRequest body:\n\ncontent (required) -- The text to process\ncontext (optional) -- Additional context about the text (e.g., \"Sales call notes\")\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"content\\\":\\\"Had a great call with John Smith from Acme Corp.\\\",\\\"context\\\":\\\"Sales call notes\\\"}' | bash {baseDir}/scripts/nex-api.sh POST /v1/context/text\",\n  \"timeout\": 120\n}\n\n\nResponse:\n\n{\n  \"artifact_id\": \"abc123\"\n}\n\n\nAfter calling ProcessText, use Get Artifact Status to check processing results.\n\nGet Artifact Status\n\nCheck the processing status and results after calling ProcessText.\n\nEndpoint: GET /v1/context/artifacts/{artifact_id} Scope: record.read\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET /v1/context/artifacts/abc123\",\n  \"timeout\": 120\n}\n\n\nResponse:\n\n{\n  \"operation_id\": 48066188026052610,\n  \"status\": \"completed\",\n  \"result\": {\n    \"entities_extracted\": [\n      {\"name\": \"John Smith\", \"type\": \"PERSON\", \"action\": \"created\"},\n      {\"name\": \"Acme Corp\", \"type\": \"COMPANY\", \"action\": \"updated\"}\n    ],\n    \"entities_created\": 1,\n    \"entities_updated\": 1,\n    \"relationships\": 1,\n    \"insights\": [\n      {\"content\": \"Acme Corp expanding to APAC\", \"confidence\": 0.85}\n    ],\n    \"tasks\": []\n  },\n  \"created_at\": \"2026-02-05T10:30:00Z\",\n  \"completed_at\": \"2026-02-05T10:30:15Z\"\n}\n\n\nStatus values: pending, processing, completed, failed\n\nTypical workflow:\n\nCall ProcessText -> get artifact_id\nPoll Get Artifact Status every 2-5 seconds\nStop when status is completed or failed\nReport the extracted entities and insights to the user\nCreate AI List Job\n\nUse natural language to search your context graph and generate a curated list of contacts or companies. Use this when you know the object type (contact or company) and want AI to filter and rank matches. If you're unsure which object type applies or the question is open-ended, use the Ask API instead.\n\nEndpoint: POST /v1/context/list/jobs Scope: list.member.write\n\nRequest body:\n\nquery (required) -- Natural language search query\nobject_type (optional) -- \"contact\" or \"company\" (default: \"contact\")\nlimit (optional) -- Number of results (default: 50, max: 100)\ninclude_attributes (optional) -- Include all entity attribute values (default: false)\n{\n  \"tool\": \"exec\",\n  \"command\": \"printf '%s' '{\\\"query\\\":\\\"high priority contacts in enterprise deals\\\",\\\"object_type\\\":\\\"contact\\\",\\\"limit\\\":20,\\\"include_attributes\\\":true}' | bash {baseDir}/scripts/nex-api.sh POST /v1/context/list/jobs\",\n  \"timeout\": 120\n}\n\n\nResponse:\n\n{\n  \"message\": {\n    \"job_id\": \"12345678901234567\",\n    \"status\": \"pending\"\n  }\n}\n\nGet AI List Job Status\n\nCheck status and results of an AI list generation job. Poll until status is completed or failed.\n\nEndpoint: GET /v1/context/list/jobs/{job_id} Scope: list.member.read\n\nQuery Parameters:\n\ninclude_attributes (boolean, optional) -- Include full attributes for each entity\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/context/list/jobs/12345678901234567?include_attributes=true'\",\n  \"timeout\": 120\n}\n\n\nResponse (completed):\n\n{\n  \"message\": {\n    \"job_id\": \"12345678901234567\",\n    \"status\": \"completed\",\n    \"created_at\": \"2026-02-11T10:00:00Z\",\n    \"count\": 5,\n    \"query_interpretation\": \"Finding contacts involved in enterprise-level deals marked as high priority\",\n    \"entities\": [\n      {\n        \"id\": \"789\",\n        \"name\": \"Jane Doe\",\n        \"type\": \"contact\",\n        \"reason\": \"Lead on $500K enterprise deal with Acme Corp, marked high priority\",\n        \"highlights\": [\n          \"Contract negotiation in progress\",\n          \"Budget approved Q1 2026\",\n          \"Executive sponsor confirmed\"\n        ],\n        \"attributes\": {}\n      }\n    ]\n  }\n}\n\n\nStatus values: pending, processing, completed, failed\n\nTypical workflow:\n\nCreate job with natural language query -> get job_id\nPoll Get AI List Job Status every 2-5 seconds\nStop when status is completed or failed\nPresent the matched entities with reasons and highlights\nInsights\nGet Insights (REST)\n\nQuery insights by time window. Supports two modes.\n\nEndpoint: GET /v1/insights Scope: insight.stream\n\nQuery Parameters:\n\nlast -- Duration window, e.g., 30m, 2h, 1h30m\nfrom + to -- UTC time range in RFC3339 format\nlimit (optional) -- Max results (default: 20, max: 100)\n\nIf neither last nor from/to is specified, returns the most recent insights (default 20).\n\nLast 30 minutes:\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/insights?last=30m'\",\n  \"timeout\": 120\n}\n\n\nBetween two dates:\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/insights?from=2026-02-07T00:00:00Z&to=2026-02-08T00:00:00Z'\",\n  \"timeout\": 120\n}\n\n\nRecommended: Pipe through jq to extract a summary (responses can be 10-100KB+):\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh GET '/v1/insights?last=1h' | jq '{insight_count: (.insights | length), insights: [.insights[] | {type, content, confidence_level, who: .target.hint, entity_type: .target.entity_type}]}'\",\n  \"timeout\": 120\n}\n\n\nWhen to use:\n\nWhen polling periodically instead of maintaining SSE connection\nTo get current insight state on startup\nAs fallback when SSE connection drops\nTo review insights from a specific time period\n\nNotable insight categories (summarize for user review):\n\nNew contacts or companies\nOpportunities, risks, or milestones\nMeetings scheduled or occurred\nRelationship changes\nHigh-confidence insights (confidence_level of \"high\" or \"very_high\")\nReal-time Insight Stream (SSE)\n\nReceive insights as they are discovered in real time.\n\nEndpoint: GET /v1/insights/stream Scope: insight.stream\n\n{\n  \"tool\": \"exec\",\n  \"command\": \"bash {baseDir}/scripts/nex-api.sh sse /v1/insights/stream\",\n  \"timeout\": 120\n}\n\n\nConnection behavior:\n\nServer sends : connected workspace_id=... token_id=... on connection\nRecent insights are replayed immediately via insight.replay events (up to 20)\nKeepalive comments (: keepalive) sent every 30 seconds\nReal-time events arrive as: event: insight.batch.created\\ndata: {...}\\n\\n\n\nEvent payload structure:\n\n{\n  \"workspace\": {\n    \"name\": \"Acme Corp\",\n    \"slug\": \"acme\",\n    \"business_info\": {\"name\": \"Acme Corp\", \"domain\": \"acme.com\"}\n  },\n  \"insights\": [{\n    \"type\": \"opportunity\",\n    \"type_description\": \"A potential business opportunity\",\n    \"content\": \"Budget approval expected next quarter\",\n    \"confidence\": 0.85,\n    \"confidence_level\": \"high\",\n    \"target\": {\n      \"type\": \"entity\",\n      \"entity_type\": \"person\",\n      \"hint\": \"John Smith\",\n      \"signals\": [{\"type\": \"email\", \"value\": \"john@acme.com\"}]\n    },\n    \"evidence\": [{\n      \"excerpt\": \"We should have budget approval by Q2\",\n      \"artifact\": {\"type\": \"email\", \"subject\": \"RE: Proposal\"}\n    }]\n  }],\n  \"insight_count\": 1,\n  \"emitted_at\": \"2026-02-05T10:30:00Z\"\n}\n\n\nInsight types: opportunity, risk, relationship, preference, milestone, activity, characteristic, role_detail\n\nWhen to use: Keep the SSE connection open in the background during active conversations. For one-off queries, use the Ask API instead.\n\nError Handling\nStatus Code\tMeaning\tAction\n400\tInvalid request\tCheck request body and parameters\n401\tInvalid API key\tCheck NEX_API_KEY is set correctly\n403\tMissing scope\tVerify API key has the required scope\n404\tNot found\tCheck the record/object/list ID exists\n429\tRate limited\tWait and retry with exponential backoff\n500\tServer error\tRetry after a brief delay\nWhen to Use Nex\n\nGood use cases:\n\nBefore responding to a message, query for context about the person\nAfter a conversation, process the transcript to update the context graph\nWhen asked about relationships or history with contacts/companies\nCreating or updating records from conversation context\nBuilding targeted lists from your contact database\nLooking up record details before a meeting\nCreating tasks and notes to track follow-ups\nSearching across all record types to find specific people or companies\nDefining custom object schemas and relationships for your workspace\n\nNot for:\n\nGeneral knowledge questions (use web search)\nReal-time calendar/scheduling (use calendar tools)\nBulk data entry that requires the full Nex UI"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/najmuzzaman-mohammad/nex",
    "publisherUrl": "https://clawhub.ai/najmuzzaman-mohammad/nex",
    "owner": "najmuzzaman-mohammad",
    "version": "1.0.5",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/nex",
    "downloadUrl": "https://openagent3.xyz/downloads/nex",
    "agentUrl": "https://openagent3.xyz/skills/nex/agent",
    "manifestUrl": "https://openagent3.xyz/skills/nex/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/nex/agent.md"
  }
}