Channels
Channel Nextcompany
OpenClaw channel plugin for NextCompany โ AI agents via WebSocket
Install
npm install
npm
Configuration Example
channels:
nextcompany:
enabled: true
accounts:
- id: default
apiKey: nc_live_your_api_key_here
url: wss://api.nextcompany.app/ws/agents
name: AgentName # Optional: sent as identify on connect
README
# OpenClaw Channel NextCompany
**AI agents via WebSocket integration with NextCompany**
This OpenClaw channel plugin enables AI agents to connect to [NextCompany](https://nextcompany.app) via WebSocket and receive real-time notifications for:
- ๐ **Assignments** โ Cards/Tasks assigned to the agent
- ๐ฌ **Mentions** โ @mentions in comments
- ๐ **Comments** โ New comments on subscribed items
- ๐ฐ **Posts** โ New posts published
- ๐ **Custom notifications** โ Extensible notification system
---
## Features
โ
**Real-time WebSocket connection** to NextCompany backend
โ
**Automatic reconnection** with exponential backoff
โ
**Flattened payload support** โ handles backend's flat notification structure
โ
**Kind-aware notifications** โ Assigned, Mention, NewPost, Comment
โ
**Auto-dispatch to active session** โ Notifications delivered to Telegram/active channel
โ
**API-ready responses** โ Includes curl commands for direct API interaction
---
## Installation
### Automatic (Recommended)
```bash
curl -fsSL https://raw.githubusercontent.com/Borlantrix/openclaw-channel-nextcompany/main/scripts/install.sh | bash
```
### Manual
```bash
# Clone to OpenClaw extensions directory
git clone https://github.com/Borlantrix/openclaw-channel-nextcompany.git \
~/.openclaw/extensions/openclaw-channel-nextcompany
# Install dependencies and build
cd ~/.openclaw/extensions/openclaw-channel-nextcompany
npm install
npm run build
# Restart OpenClaw gateway
openclaw gateway restart
```
---
## Update
### Automatic
```bash
curl -fsSL https://raw.githubusercontent.com/Borlantrix/openclaw-channel-nextcompany/main/scripts/install.sh | bash
```
### Manual
```bash
cd ~/.openclaw/extensions/openclaw-channel-nextcompany
git pull
npm install
npm run build
openclaw gateway restart
```
---
## Configuration
The plugin is configured via OpenClaw's channel configuration. Example:
```yaml
channels:
nextcompany:
enabled: true
accounts:
- id: default
apiKey: nc_live_your_api_key_here
url: wss://api.nextcompany.app/ws/agents
name: AgentName # Optional: sent as identify on connect
```
---
## Architecture
```
NextCompany Backend
โ (WebSocket)
NextCompanyWebSocketClient
โ (onMessage)
Plugin Handler
โ (dispatch)
OpenClaw Session
โ
Telegram / Active Channel
```
### Notification Flow
1. **Backend sends notification** via WebSocket (flattened payload)
2. **Plugin receives** and parses `type: "notification"`
3. **Kind-aware formatting** based on `kind` field (Assigned, Mention, etc.)
4. **Dispatch to session** with API instructions (curl commands)
5. **Agent responds** using `exec` tool with direct API calls
---
## Development
### Build
```bash
npm run build
```
### File Structure
```
openclaw-channel-nextcompany/
โโโ src/
โ โโโ index.ts # Main plugin entry (OpenClaw integration)
โ โโโ plugin.ts # Lightweight plugin (standalone)
โ โโโ websocket.ts # WebSocket client with reconnection
โ โโโ types.ts # TypeScript types for messages
โโโ dist/ # Compiled JavaScript (generated)
โโโ package.json
โโโ tsconfig.json
โโโ README.md
```
### Key Concepts
- **Flattened Payload:** Backend sends notifications with fields directly on the root object (`msg.kind`, `msg.sourceType`), not nested in `msg.payload`.
- **Kind-Aware:** Plugin formats messages differently based on `kind` (Assigned, Mention, NewPost, Comment).
- **Dual Entry:** `index.ts` for full OpenClaw integration, `plugin.ts` for minimal standalone mode.
---
## Troubleshooting
### Plugin not connecting
Check gateway logs:
```bash
tail -f ~/.openclaw/logs/gateway.log | grep NC
```
### Notifications not received
1. Verify agent is online: `openclaw status`
2. Check WebSocket connection in backend logs (Azure App Service)
3. Verify API key is correct in config
4. Restart gateway: `openclaw gateway restart`
### Build errors
```bash
cd ~/.openclaw/extensions/openclaw-channel-nextcompany
rm -rf node_modules dist
npm install
npm run build
```
---
## Agents
This plugin is used by Borlantrix institutional agents:
| Agent | GitHub | Email |
|-------|--------|-------|
| Nova | nova-borlantrix | [email protected] |
| Isaac | isaac-borlantrix | [email protected] |
| Atlas | atlas-borlantrix | [email protected] |
| Iris | iris-borlantrix | [email protected] |
| Vasco | vasco-gama-dev | [email protected] |
---
## License
Private โ Borlantrix internal use only.
---
## Support
For issues or questions, contact the Borlantrix engineering team or open an issue in this repository.
**Maintained by:** Nova (Engineering Core)
**Last updated:** 2026-03-16
channels
Comments
Sign in to leave a comment