Agent coordination
에이전트 전송
openclaw agent는 인바운드 채팅 메시지 없이 명령줄에서 단일 agent 턴을 실행합니다. 스크립트화된 워크플로, 테스트, 프로그래밍 방식 전달에 사용하세요.
빠른 시작
간단한 agent 턴 실행
openclaw agent --message "What is the weather today?"
이렇게 하면 메시지가 Gateway를 통해 전송되고 응답이 출력됩니다.
특정 agent 또는 세션 대상으로 지정
# Target a specific agent
openclaw agent --agent ops --message "Summarize logs"
# Target a phone number (derives session key)
openclaw agent --to +15555550123 --message "Status update"
# Reuse an existing session
openclaw agent --session-id abc123 --message "Continue the task"
응답을 채널로 전달
# Deliver to WhatsApp (default channel)
openclaw agent --to +15555550123 --message "Report ready" --deliver
# Deliver to Slack
openclaw agent --agent ops --message "Generate report" \
--deliver --reply-channel slack --reply-to "#reports"
플래그
| 플래그 | 설명 |
|---|---|
--message \<text\> |
보낼 메시지(필수) |
--to \<dest\> |
대상(전화, 채팅 id)에서 세션 키 파생 |
--agent \<id\> |
구성된 agent 대상으로 지정(main 세션 사용) |
--session-id \<id\> |
id로 기존 세션 재사용 |
--local |
로컬 내장 런타임 강제 사용(Gateway 건너뜀) |
--deliver |
응답을 채팅 채널로 보내기 |
--channel \<name\> |
전달 채널(whatsapp, telegram, discord, slack 등) |
--reply-to \<target\> |
전달 대상 재정의 |
--reply-channel \<name\> |
전달 채널 재정의 |
--reply-account \<id\> |
전달 계정 id 재정의 |
--thinking \<level\> |
선택한 모델 프로필의 thinking 수준 설정 |
--verbose \<on|full|off\> |
verbose 수준 설정 |
--timeout \<seconds\> |
agent 제한 시간 재정의 |
--json |
구조화된 JSON 출력 |
동작
- 기본적으로 CLI는 Gateway를 통해 실행됩니다. 현재 머신의 내장 런타임을 강제로 사용하려면
--local을 추가하세요. - Gateway에 연결할 수 없으면 CLI는 로컬 내장 실행으로 폴백합니다.
- 세션 선택:
--to는 세션 키를 파생합니다(그룹/채널 대상은 격리를 보존하고, 직접 채팅은main으로 합쳐집니다). - Thinking 및 verbose 플래그는 세션 저장소에 유지됩니다.
- 출력: 기본값은 일반 텍스트이며, 구조화된 페이로드와 메타데이터는
--json을 사용합니다.
예시
# Simple turn with JSON output
openclaw agent --to +15555550123 --message "Trace logs" --verbose on --json
# Turn with thinking level
openclaw agent --session-id 1234 --message "Summarize inbox" --thinking medium
# Deliver to a different channel than the session
openclaw agent --agent ops --message "Alert" --deliver --reply-channel telegram --reply-to "@admin"