Install
openclaw skills install nexusInteract with Nexus, a multi-tenant Ops OS for ecommerce and retail businesses. Requires a NEXUS_API_KEY environment variable (agent API key with prefix nxs_...
openclaw skills install nexus---
Nexus is a multi-tenant operations OS for ecommerce and retail workflows. Use this skill to authenticate an AI agent, access the hosted Nexus MCP server, and fall back to direct HTTP API access when MCP is not sufficient.
This skill is intentionally user-invocable only and is designed to be read-first. Any write operation requires explicit user confirmation.
This skill requires the environment variable:
NEXUS\_API\_KEYNEXUS\_API\_KEY must be an agent API key, not a human JWT and not a short-lived agent JWT.
NEXUS\_API\_KEY from the runtime environment.NEXUS\_API\_KEY is missing, ask the user or operator to configure it.agent-auth.When calling PostgREST directly, the runtime must also provide an anon key header such as:
VITE\_SUPABASE\_ANON\_KEYNEXT\_PUBLIC\_SUPABASE\_ANON\_KEYDo not publish a live anon key inside distributed skills or public documentation.
{
"skills": {
"entries": {
"nexus-agent": {
"apiKey": {
"source": "env",
"provider": "default",
"id": "NEXUS\_API\_KEY"
}
}
}
}
}
Only call Nexus on these hosts:
api.nexus.aiforstartups.ionexus-docs.aiforstartups.ioDo not send Nexus credentials or payloads to any other host.
Default to read operations whenever possible.
Examples of read operations:
Require explicit user confirmation before any write action, including:
If the current API key has only read scope, do not attempt write actions.
AI agents do not use human user JWTs directly.
The correct flow is:
agent-api-key-createagent-authThis is a human-admin operation.
POST https://api.nexus.aiforstartups.io/functions/v1/agent-api-key-create
Authorization: Bearer <human-admin-jwt>
Content-Type: application/json
{
"name": "Bahig - Karim assistant",
"scopes": \["read", "write"],
"expires\_at": "2026-12-31T23:59:59Z"
}
Response:
{
"api\_key": "nxs\_ak\_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12",
"key\_prefix": "nxs\_ak\_ab12CD34",
"organization\_id": "uuid",
"name": "Bahig - Karim assistant",
"scopes": \["read", "write"],
"expires\_at": "2026-12-31T23:59:59.000Z",
"message": "Store this API key now. It is only returned once."
}
Important:
POST https://api.nexus.aiforstartups.io/functions/v1/agent-auth
Content-Type: application/json
{"api\_key": "nxs\_ak\_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
Response:
{
"access\_token": "eyJ...",
"organization\_id": "uuid",
"expires\_in": 3600
}
Use the access\_token as Authorization: Bearer <token> on all subsequent requests.
nxs\_ak\_ prefix + 48 random alphanumeric characters.
read = read-only operationswrite = read + create + updateadmin = full accessThe hosted MCP endpoint accepts the agent JWT, not the raw API key:
POST https://api.nexus.aiforstartups.io/functions/v1/mcp-server
Authorization: Bearer <agent-jwt>
| Service | URL |
|---|---|
| Edge Functions | https://api.nexus.aiforstartups.io/functions/v1/<function-name> |
| PostgREST (DB) | https://api.nexus.aiforstartups.io/rest/v1/<table> |
| MCP | https://api.nexus.aiforstartups.io/functions/v1/mcp-server |
For direct PostgREST calls, include both:
Authorization: Bearer <agent-jwt>apikey: <anon-key-from-secure-runtime-config>Prefer the hosted MCP server when possible. It exposes a stable, documented tool surface for common agent workflows.
nexus\_list\_contactsnexus\_get\_contactnexus\_create\_contactnexus\_update\_contactnexus\_list\_ordersnexus\_get\_ordernexus\_create\_ordernexus\_update\_order\_statusnexus\_list\_inventorynexus\_check\_stocknexus\_list\_conversationsnexus\_send\_messagenexus\_searchnexus\_sync\_social\_postsnexus\_list\_social\_postsnexus\_get\_social\_postnexus\_create\_social\_postnexus\_update\_social\_postnexus\_publish\_social\_postnexus\_delete\_social\_postnexus\_list\_social\_accountsnexus\_get\_social\_analyticsnexus\_get\_content\_calendarnexus\_list\_organization\_invitesnexus\_invite\_organization\_membernexus\_cancel\_organization\_invitenexus\_resend\_organization\_invitenexus\_list\_internal\_conversationsnexus\_get\_internal\_messagesnexus\_open\_internal\_dmnexus\_send\_internal\_messagenexus\_list\_ai\_tag\_definitionsnexus\_list\_message\_annotationsnexus\_get\_message\_ai\_annotationnexus\_get\_org\_ai\_annotation\_settingsnexus\_get\_customer\_conversation\_intelligencenexus\_get\_conversation\_intelligence\_dashboardnexus\_update\_message\_annotationnexus\_update\_ai\_tag\_definitionnexus\_set\_org\_ai\_annotation\_promptnexus\_update\_org\_conversation\_intelligence\_contextnexus://organization/infonexus://schema/contactsnexus://schema/ordersnexus://schema/inventorynexus://schema/socialnexus://schema/conversation-intelligenceUse MCP when:
Use direct API when:
starter plan.write or admin scope.social\_posts.twitter and linkedin remain reserved in request enums for forward compatibility and are not yet writable from this MCP surface.agent-invite)Agents can manage organization\_invites for their JWT organization only.
nexus\_list\_organization\_invites (read scope), nexus\_invite\_organization\_member, nexus\_cancel\_organization\_invite, nexus\_resend\_organization\_invite (write scope)POST /functions/v1/agent-invite with Authorization: Bearer <agent-jwt> and JSON body { "action": "invite"|"cancel"|"resend"|"list", ... }Requires BREVO\_KEY on Edge Functions.
Internal chat is separate from the customer omnichannel inbox (chats / messages). MCP tools talk to internal\_conversations and internal\_messages.
agent\_accounts row (agent\_api\_keys.agent\_id)nexus\_open\_internal\_dm: pass user\_id or user\_email of an active org membernexus\_send\_internal\_message: sender\_id is null server-side; humans still send with their user id in the appnexus\_list\_internal\_conversations and nexus\_get\_internal\_messages: only threads the agent created or has posted in
journey\_stage\_idis a UUID foreign key tocustomer\_journey\_stages, not a free-text field.
# List contacts
GET /rest/v1/customers?organization\_id=eq.<org\_id>\&order=created\_at.desc\&limit=25
Authorization: Bearer <agent-jwt>
apikey: <anon-key>
# Search by phone (URL-encode + as %2B)
GET /rest/v1/customers?phone\_number=eq.%2B201234567890\&organization\_id=eq.<org\_id>
# Create contact — requires explicit confirmation and write scope
POST /rest/v1/customers
{"first\_name":"Ahmed","last\_name":"Hassan","phone\_number":"+201234567890","organization\_id":"<org\_id>"}
# Update tags — requires explicit confirmation and write scope
PATCH /rest/v1/customers?id=eq.<uuid>
{"tags":\["vip","repeat-buyer"]}
chatshas nostatuscolumn. Useis\_archived.messagessorts bytimestamp, notcreated\_at.
# List open conversations
GET /rest/v1/chats?organization\_id=eq.<org\_id>\&is\_archived=eq.false\&order=last\_message\_time.desc
# Get messages in a conversation
GET /rest/v1/messages?chat\_id=eq.<chat\_id>\&order=timestamp.asc
# Send WhatsApp message — requires explicit confirmation and write scope
POST /functions/v1/whatsapp-send-message
{"chatId":"<chat\_id>","message":"Hello from Nexus AI agent","organizationId":"<org\_id>"}
# Send WhatsApp template — requires explicit confirmation and write scope
POST /functions/v1/whatsapp-send-template
{"phone\_number":"+201234567890","template\_name":"order\_shipped","language":"ar","components":\[]}
The status column is
order\_status, notstatus.
# List orders
GET /rest/v1/orders?organization\_id=eq.<org\_id>\&order=created\_at.desc\&limit=50
# Filter by status — use order\_status
GET /rest/v1/orders?organization\_id=eq.<org\_id>\&order\_status=eq.pending
# Create order — requires explicit confirmation and write scope
POST /rest/v1/orders
{"customer\_id":"<uuid>","organization\_id":"<org\_id>","order\_status":"pending","total\_amount":450,"currency":"EGP"}
# Update order status — requires explicit confirmation and write scope
PATCH /rest/v1/orders?id=eq.<uuid>
{"order\_status":"confirmed"}
# Get order items (qty column, not quantity)
GET /rest/v1/order\_items?order\_id=eq.<order\_id>
Inventory uses
itemsplusstock\_balances. There is noinventory\_itemstable.
# List products
GET /rest/v1/items?organization\_id=eq.<org\_id>\&is\_active=eq.true\&order=updated\_at.desc
# Search by SKU
GET /rest/v1/items?organization\_id=eq.<org\_id>\&sku=eq.TSHIRT-M-BLK
# Low stock
GET /rest/v1/stock\_balances?organization\_id=eq.<org\_id>\&available\_quantity=lt.10
# Stock for one item across warehouses
GET /rest/v1/stock\_balances?item\_id=eq.<uuid>
# Create AWB — requires explicit confirmation and write scope
POST /functions/v1/create-awb-bosta
{"order\_id":"<uuid>","pickup\_date":"2025-06-17"}
# List shipments
GET /rest/v1/awbs?organization\_id=eq.<org\_id>\&order=created\_at.desc
# Get tracking history
GET /rest/v1/awb\_status\_logs?awb\_id=eq.<awb\_id>\&order=timestamp.desc
# Initiate call — requires explicit confirmation and write scope
POST /functions/v1/call-initiate
{"phone\_number":"+201234567890"}
# Get call logs for a contact
GET /rest/v1/call\_logs?customer\_id=eq.<uuid>\&order=call\_date.desc
Prefer the MCP tools for conversation intelligence. They map to the current schema and RPCs more safely than ad hoc direct queries.
Read-oriented MCP tools:
nexus\_list\_ai\_tag\_definitionsnexus\_list\_message\_annotationsnexus\_get\_message\_ai\_annotationnexus\_get\_org\_ai\_annotation\_settingsnexus\_get\_customer\_conversation\_intelligencenexus\_get\_conversation\_intelligence\_dashboardWrite-capable MCP tools that require explicit confirmation and write scope:
nexus\_update\_message\_annotationnexus\_update\_ai\_tag\_definitionnexus\_set\_org\_ai\_annotation\_promptnexus\_update\_org\_conversation\_intelligence\_contextUse either the Range header or offset and limit query parameters.
GET /rest/v1/customers
Range: 0-24
Response includes Content-Range: 0-24/1523.
Common PostgREST operators: eq, neq, gt, gte, lt, like, in, is
# Multiple filters — note order\_status, not status
GET /rest/v1/orders?organization\_id=eq.<org\_id>\&order\_status=eq.shipped\&created\_at=gte.2025-01-01
# Null check
GET /rest/v1/orders?shopify\_order\_id=is.null
| Code | Meaning | Action |
|---|---|---|
| 401 | Invalid or expired token | Re-authenticate via agent-auth |
| 403 | Scope not allowed | Check API key scopes |
| 404 | Record not found | Verify the UUID and org scope |
| 429 | Rate limited | Retry after Retry-After seconds |
POST /functions/v1/agent-api-key-createPOST /functions/v1/agent-authPOST /functions/v1/mcp-serverPOST /functions/v1/whatsapp-send-messagePOST /functions/v1/facebook-send-messagePOST /functions/v1/instagram-send-messageagent-auth is rate limited to 10 attempts per minute per IPagent-authIf you encounter an error or undocumented behavior, contact:
Include the endpoint, the error message, and a short description of the attempted action.
https://nexus-docs.aiforstartups.io/api/ai-agents-mcphttps://nexus-docs.aiforstartups.io/openapi.yamlhttps://nexus-docs.aiforstartups.io