로그인

고급 기능 가이드

Clawdbot의 고급 기능과 사용법

📋 목록

1. 멀티 에이전트

다중 워크스페이스 설정

설정 예시:
{
  agents: {
    bindings: {
      // 개인용
      "whatsapp:+1234567890": "personal",
      "telegram:@username": "personal",
      
      // 업무용
      "slack:workspace:U12345": "work",
      "discord:server:12345": "work"
    },

    workspaces: {
      "personal": "~/clawd-personal",
      "work": "~/clawd-work"
    }
  }
}

에이전트 간 통신

# CLI에서 다른 세션으로 메시지 전송
clawdbot sessions send \
  --to work:discord:server:12345 \
  --message "이 작업을 처리해줘"

# 채팅 내에서 세션 도구 사용
/sessions_send work:context_update

에이전트 간 컨텍스트 공유

# 컨텍스트 업데이트
clawdbot sessions context-update \
  --from personal \
  --to work \
  --context '{"data": {"project": "ABC"}}'

2. 자동화

Cron 작업 스케줄링

복잡한 작업:
{
  cron: {
    jobs: {
      "daily-standup": {
        schedule: "0 7 * * 1-5",
        agent: "personal",
        message: "좋은 아침! 오늘의 일정을 확인해줘",
        enabled: true
      },
      "weekly-summary": {
        schedule: "0 18 * * 5",
        agent: "personal",
        message: "이번 주 목표를 정리해줘",
        enabled: true
      },
      "hourly-sync": {
        schedule: "0 * * * *",
        agent: "work",
        message: "동기화 데이터를 확인해줘",
        enabled: true
      }
    }
  }
}

웹훅 설정

{
  webhooks: {
    "/api/triggers/backup": {
      secret: "webhook-secret-key",
      method: "POST",
      agent: "backup-agent",
      enabled: true
    },
    "/api/triggers/deploy": {
      secret: "deploy-secret-key",
      method: "POST",
      agent: "deploy-agent",
      enabled: true
    }
  }
}

Gmail Pub/Sub

{
  automation: {
    gmail: {
      enabled: true,
      filters: {
        from: ["boss@company.com", "client@client.com"],
        subject: ["URGENT", "important"]
      },
      agent: "personal"
    }
  }
}

3. Canvas/A2UI 고급

React 컴포넌트 푸시

A2UI 컴포넌트 예시:
// charts/ChartA2UI.tsx
import React from 'react';
import { A2UIProps } from 'clawdbot/plugin-sdk';

interface ChartData {
  labels: string[];
  values: number[];
}

export const ChartA2UI: React.FC<A2UIProps<ChartData>> = ({ title, data, onEvent }) => {
  return (
    <div>
      <h2>{title}</h2>
      <div style={{ display: 'flex', gap: '20px' }}>
        <div>
          <h3>데이터</h3>
          <table>
            {data.labels.map((label, i) => (
              <tr key={i}>
                <td>{label}</td>
                <td>{data.values[i]}</td>
              </tr>
            ))}
          </table>
        </div>
        <button onClick={() => onEvent({ type: 'export' })}>
          Export Data
        </button>
        <button onClick={() => onEvent({ type: 'filter' })}>
          Filter Data
        </button>
      </div>
    </div>
  );
};

// 에이전트에서 사용
await tool('canvas_a2ui', {
  component: 'ChartA2UI',
  props: {
    title: '월간 매출',
    data: {
      labels: ['1월', '2월', '3월', '4월', '5월', '6월'],
      values: [100, 150, 120, 180, 200, 170]
    }
  },
  onEvent: async (event) => {
    switch (event.type) {
      case 'export':
        await tool('file_write', {
          path: '~/clawd/output/sales-export.csv',
          content: 'Month,Value\n' + data.labels.join('\n') + '\n' + data.values.join('\n')
        });
        await tool('canvas_update', {
          html: '<h2>✅ 데이터 내보기 완료</h2>'
        });
        break;
      case 'filter':
        // 필터 로직
        const filtered = {
          labels: data.labels.filter((_, i) => data.values[i] > 150),
          values: data.values.filter(v => v > 150)
        };
        await tool('canvas_a2ui', {
          component: 'ChartA2UI',
          props: { title: '필터된 데이터', data: filtered }
        });
        break;
    }
  }
});

Canvas 스냅샷 및 복구

# Canvas 스냅샷 저장
clawdbot canvas snapshot save

# 스냅샷 목록
clawdbot canvas snapshot list

# 스냅샷 복구
clawdbot canvas snapshot restore <timestamp>

4. 노드 고급

화면 녹화 및 분석

# 녹화 시작
clawdbot nodes record-screen \
  --duration 300 \
  --format mp4 \
  --quality high

# 녹화 중지
clawdbot nodes stop-record

# 녹화 목록
clawdbot nodes list-recordings

카메라 활용

# 사진 캡처
clawdbot nodes camera-snap \
  --quality high \
  --flash on

# 비디오 클립
clawdbot nodes camera-clip \
  --duration 30 \
  --format mp4

위치 기반 작업

# 현재 위치 확인
clawdbot nodes get-location

# 위치 기반 알림
clawdbot sessions send \
  --to whatsapp:+1234567890 \
  --message "현재 위치에서 도착했습니다"

5. 메모리 관리

세션 기록 압축

# 수동 압축
clawdbot memory compact

# 자동 압축 설정
clawdbot config set sessions.compaction true
clawdbot config set sessions.compactionThreshold 10000

임베딩 검색 및 관리

# 임베딩 검색
clawdbot memory search embeddings \
  --query "project specification" \
  --top-k 5

# 관련 컨텍스트 찾기
clawdbot memory retrieve context \
  --query "previous discussions" \
  --limit 3

백업 및 복구

# 워크스페이스 백업
tar -czf ~/clawd-backup-$(date +%Y%m%d).tar.gz ~/clawd

# Git 백업
cd ~/clawd
git add .
git commit -m "Daily backup"
git push origin main

6. 채널 고급

Discord Slash Commands

설정 예시:
{
  channels: {
    discord: {
      enabled: true,
      token: "MTIyNzE1234...",
      commandPrefix: "!",
      commands: {
        "report": {
          description: "주간 보고 생성",
          handler: "generate_weekly_report"
        },
        "standup": {
          description: "데일리 스탠드업",
          handler: "daily_standup"
        },
        "help": {
          description: "도움말",
          handler: "show_help"
        }
      }
    }
  }
}

Slack Bot Commands

# 슬래시 명령 사용
/slack command --channel general --command "/report"

# 대화형 명령
/slack message --channel general --text "@team 이 이슈를 확인해주세요"

Telegram Inline Mode

# 인라인 모드 활성화
clawdbot config set channels.telegram.inlineMode true

# 인라인 쿼리 설정
clawdbot config set channels.telegram.inlineCacheSize 100

🎯 실용 팁

1. 에이전트 최적화

{
  agent: {
    temperature: 0.7,
    maxTokens: 50000,
    thinkingLevel: "high",
    workspace: "~/clawd"
  }
}

2. 채널별 최적화

WhatsApp:
미디어 최적화 (압축, 변환)
청크 전송 (대용량 메시지)
Telegram:
인라인 캐싱
웹훅 사용 (빠른 응답)
Slack:
슬래시 명령 (반복 작업 자동화)

3. 보안 강화

{
  channels: {
    discord: {
      dm: {
        policy: "pairing",
        allowFrom: ["1234567890123456789", "*"]
      }
    },
    telegram: {
      groupPolicy: {
        mode: "mention",
        mentions: ["@clawdbot_bot"]
      }
    }
  },

  sandbox: {
    mode: "non-main",
    allowlist: [
      "bash",
      "read",
      "write",
      "edit",
      "sessions_list",
      "sessions_history"
    ],
    denylist: [
      "browser",
      "canvas",
      "nodes",
      "cron",
      "discord",
      "slack",
      "gateway"
    ]
  }
}

🔍 디버깅 및 모니터링

로그 레벨 설정

# 개발용 상세 로그
clawdbot config set logging.level debug

# 간결 요약 로그
clawdbot config set logging.level warn

성능 모니터링

# 메트릭 활성화
clawdbot config set features.metrics true

# 성능 보고서
clawdbot sessions send \
  --to work \
  --message "성능 보고서를 생성해줘"

🎯 결론

고급 기능 활용 체크리스트

멀티 워크스페이스 설정 완료
자동화 작업 설정 완료
Canvas/A2UI 컴포넌트 생성 완료
노드 기능 활성화
메모리 관리 정책 설정
채널 고급 기능 활성화

🔗 관련 문서