> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nora.my/llms.txt
> Use this file to discover all available pages before exploring further.

# nora actions

> Action 블록 관리. 알림·로그·쓰기 같은 답변 뒤 부수 효과

Action이 Agent 결정 *뒤에* 걸림. Tool(Agent가 실행 중 고름)과 달리 Action은 와이어링으로 실행됨. 걸릴지는 Flow가, 무엇을 넘길지는 Agent 출력이 정함.

Tool과 명령 모양이 같음. 파라미터만 없음(Action은 LLM이 고르는 인자가 없음).

## 명령

| 명령                                   | 설명             |
| ------------------------------------ | -------------- |
| `actions create --name <n>`          | Action 블록 추가.  |
| `actions update <action-id>`         | 필드 패치.         |
| `actions edit <action-id>`           | `$EDITOR`에 열기. |
| `actions delete <action-id>`         | Action 제거.     |
| `actions headers list <action-id>`   | HTTP 헤더 출력.    |
| `actions headers add <action-id>`    | 헤더 추가.         |
| `actions headers remove <action-id>` | 헤더 제거.         |

## `actions create`

```bash theme={null}
nora actions create \
  --name notify_slack \
  --description "Agent 요약을 Slack 메시지로 게시" \
  --runtime '{"kind":"http","method":"POST","url":"https://hooks.slack.com/services/xxx"}'
```

플래그:

* `--name <n>`(필수).
* `--description <d>`.
* `--runtime <json>` HTTP나 인라인 런타임 스펙(Tool과 같은 모양).
* `--x <n>`, `--y <n>` 캔버스 위치.

## `actions update`

```bash theme={null}
nora actions update ac_notify \
  --set-approval on \
  --set-http-url https://hooks.slack.com/services/new-url
```

### Update 플래그

**정체성**

* `--set-name <n>`
* `--set-description <d>`
* `--set-icon <name>`

**승인**

* `--set-approval on|off` 걸리기 전에 승인 요구.

**HTTP 런타임**

* `--set-runtime-kind http|inline`
* `--set-http-method <m>`
* `--set-http-url <url>`
* `--set-http-auth-kind <k>`
* `--set-http-auth-header <name>`
* `--set-http-auth-value <v>`

**Inline 런타임**

* `--set-inline-lang <lang>`
* `--set-inline-code <text>` / `--set-inline-code-file <path>`

**위치/크기**

* `--set-x <n>`, `--set-y <n>`, `--set-width <n>`

**한꺼번에**

* `--patch <json>`

## `actions edit`

```bash theme={null}
nora actions edit ac_notify
```

## `actions delete`

```bash theme={null}
nora actions delete ac_notify
```

Action 제거. 와이어 가지치기.

## `actions headers`

Tool과 같은 모양:

```bash theme={null}
nora actions headers list ac_notify
nora actions headers add ac_notify --name Authorization --value 'secrets://slack_bot_token'
nora actions headers remove ac_notify --name X-Old-Header
```

시크릿 값은 `secrets://<ref>`로. 인터랙티브는 `--value ?`. [파이핑·시크릿](/ko/cli/piping-and-secrets) 참고.

## Tool과 Action, 빠른 상기

|                  | Tool        | Action         |
| ---------------- | ----------- | -------------- |
| 부를지 누가 정하나       | Agent(LLM이) | Flow(와이어링이)    |
| 인자 선택            | Agent       | Agent 출력에서 이어옴 |
| 추론 중 실행          | 예           | 그 뒤            |
| Agent의 다음 스텝에 영향 | 예           | 아니오            |

원칙: Agent가 결과로 더 추론해야 할 수 있으면 Tool, 답변 뒤 던지고 잊는 거면 Action.

## 레시피

### 승인 게이트가 걸린 Slack 알림 추가

```bash theme={null}
AC=$(nora actions create \
  --name notify_slack \
  --description "Slack 요약 게시" \
  --runtime '{"kind":"http","method":"POST","url":"'$SLACK_WEBHOOK'"}' \
  | jq -r '.id')

nora actions update $AC --set-approval on
```

이제 모든 Slack 게시가 승인을 기다림.

### 헤더 로테이션 마이그레이션

```bash theme={null}
new_token='secrets://slack_bot_token_v2'
for id in $(nora flows get support | jq -r '.blocks[] | select(.kind=="action").id'); do
  nora actions headers remove $id --name Authorization 2>/dev/null
  nora actions headers add $id --name Authorization --value "$new_token"
done
```
