Home/Integrations/AstrBot
A
+TORK

AstrBot + Tork Network

Enterprise Governance for Multi-Platform Agents

One governance layer across every channel. Consistent PII protection and compliance receipts whether your agent runs on Discord, Slack, Teams, or custom platforms.

4+
Platforms Supported
1
Governance Layer
50+
PII Types
100%
Channel Coverage
Quick Start

Add Tork in 3 Steps

1

Install the Tork SDK

Add Tork to your AstrBot project.

npm install @torknetwork/node-sdk
2

Configure as AstrBot Plugin

Register Tork as a governance plugin in your AstrBot config.

// astrbot.config.ts
import { TorkPlugin } from '@torknetwork/node-sdk/astrbot';

export default {
  plugins: [
    TorkPlugin({
      apiKey: process.env.TORK_API_KEY,
      redactPii: true,
      generateReceipts: true,
    }),
  ],
};
3

Deploy Across Channels

Tork governance applies uniformly across all AstrBot channels.

# Same governance on every platform
astrbot deploy --channels discord,slack,teams
Integration Code

Full Integration Example

import { AstrBot } from 'astrbot';
import { TorkClient } from '@torknetwork/node-sdk';

const tork = new TorkClient({
  apiKey: process.env.TORK_API_KEY,
  config: {
    redactPii: true,
    generateReceipts: true,
    language: 'en',
  },
});

const bot = new AstrBot({
  name: 'enterprise-agent',
  channels: ['discord', 'slack', 'teams'],
});

// Universal governance middleware — runs on ALL channels
bot.useGlobal(async (message, channel, next) => {
  // Govern inbound message
  const inbound = await tork.govern(message.content);

  if (inbound.piiDetected.length > 0) {
    console.log(`[${channel}] PII redacted: ${inbound.piiDetected.join(', ')}`);
    message.content = inbound.governedText;
  }

  // Process the message
  const response = await next();

  // Govern outbound response
  const outbound = await tork.govern(response.content);
  response.content = outbound.governedText;

  // Attach receipt ID for audit trail
  response.metadata = {
    ...response.metadata,
    torkReceiptId: outbound.receiptId,
    channel,
  };

  return response;
});

// Channel-specific compliance logging
bot.on('governed', (event) => {
  console.log(`[${event.channel}] Receipt: ${event.receiptId}`);
  console.log(`[${event.channel}] PII found: ${event.piiCount}`);
});

await bot.start();
Comparison

Without Tork vs. With Tork

Without Tork
With Tork
Different PII rules per channel
Unified governance across all platforms
No cross-channel audit trail
Compliance receipts tagged by channel
Manual compliance for each deployment
One config governs all channels
Platform-specific PII handling code
Single middleware, every platform
No proof of multi-channel compliance
Trust badge covers entire deployment
Inconsistent data protection
Same 50+ PII patterns everywhere
Trust Badge

Show Users Your Agent is Governed

Embed a verifiable trust badge to prove your agent passes Tork governance checks.

<!-- AstrBot Multi-Platform Trust Badge -->
<a href="https://tork.network/badge/YOUR_BADGE_ID">
  <img
    src="https://tork.network/api/v1/badge/svg/YOUR_BADGE_ID"
    alt="Tork Governed — AstrBot (Discord, Slack, Teams)"
  />
</a>

Ready to Govern Your AstrBot Agents?

Add independent governance in under 5 minutes. Free tier available.

Get Started FreeView Documentation