Skip to Content
CLIactivity

flexkit activity

Reads your Activity inbox in a project, the same list as the Activity button in Studio. The inbox collects:

  • approval requests: changes the agent or an automation proposed that wait for your decision;
  • automation results and failures: runs whose notify rule includes you;
  • monitor events: a chat monitor woke one of your chats, or paused;
  • questions: the Chat Agent asked you something and waits for the answer.

Running flexkit activity with no subcommand runs activity ls.

Synopsis

flexkit activity [subcommand] [arguments] [options]

Requirements

The inbox is personal, so these commands need a login session: sign in with flexkit login. API tokens (FLEXKIT_TOKEN or --token flk-…) are refused. Every project role can read its own inbox.

activity ls

Lists your items, newest first. Dismissed items are hidden. The STATE column shows needs action for open approvals and questions, the outcome for settled ones (approved, answered, …), and otherwise unread or read.

flexkit activity ls [--unread] [--needs-action] [--limit <n>] [--offset <n>] [--follow [--interval <seconds>]] [--json]
  • --needs-action asks the server for open items that wait on you.
  • --unread keeps the unread items of the fetched page. To look further back, raise --limit (up to 100) or page with --offset.
  • --follow (-f) prints the current list, then keeps running and prints new items as they arrive. It checks every 5 seconds by default. Stop it with Ctrl+C. With --json, it prints one JSON object per line.

Examples

# Show your inbox
flexkit activity
 
# Show what waits on you
flexkit activity ls --needs-action
 
# Watch for new items while you work
flexkit activity ls --follow
 
# Print the ids of unread automation failures
flexkit activity ls --unread --json | jq -r '.[] | select(.kind == "automation_failure") | .id'

activity inspect

Shows one item in full: its message, the chat, approval, automation or run it belongs to, and the command that continues it. For example, it suggests flexkit approvals inspect <id> for an approval request and flexkit chat --chat <chatId> "<answer>" for a question. Aliases: get, show.

flexkit activity inspect <itemId> [--read] [--json]

Examples

# Show an item
flexkit activity inspect 0b7e2c4a-91d3-4f5e-8a6b-3c2d1e0f9a87
 
# Show an item and mark it read
flexkit activity inspect 0b7e2c4a-91d3-4f5e-8a6b-3c2d1e0f9a87 --read

activity read

Marks items read by id, or marks every unread item read with --all. Items that are already read or settled are left as they are.

flexkit activity read <itemId…> [--json]
flexkit activity read --all [--json]

Examples

# Mark two items read
flexkit activity read 0b7e2c4a-91d3-4f5e-8a6b-3c2d1e0f9a87 5d1f3e2a-7c4b-4e8d-9f0a-1b2c3d4e5f60
 
# Clear the unread badge
flexkit activity read --all

activity dismiss

Hides items from your inbox. Dismissing an approval request or a question does not decide or answer it. It only removes the item from the list.

flexkit activity dismiss <itemId…> [--json]

Examples

# Dismiss an item
flexkit activity dismiss 0b7e2c4a-91d3-4f5e-8a6b-3c2d1e0f9a87

activity summary

Prints how many items are unread and how many wait on you. These are the numbers on the Studio Activity badge.

flexkit activity summary [--json]

Examples

# Show the counts
flexkit activity summary
 
# Fail a script step when something waits on you
test "$(flexkit activity summary --json | jq '.needsActionCount')" -eq 0

Options

OptionDescription
--unreadls: show only unread items of the fetched page.
--needs-actionls: show only open approval requests and questions that wait on you.
--limit <n>ls: number of items to fetch, 1–100. Default: 25.
--offset <n>ls: number of items to skip. Default: 0.
--follow, -fls: keep running and print new items as they arrive.
--interval <seconds>ls --follow: how often to check. Default: 5, minimum: 2.
--readinspect: also mark the item read.
--allread: mark every unread item read.
--jsonPrint JSON on stdout.
--project, -p <id>Project to use. Default: the linked project.

See also the global options.

Common workflows

# Work through what waits on you
flexkit activity ls --needs-action
flexkit activity inspect 0b7e2c4a-91d3-4f5e-8a6b-3c2d1e0f9a87
flexkit chat --chat 3f6c1a52-8d4e-4b7a-9c1e-2a5b7d9e0f13 "Use CSV with headers"
 
# Print a line for every failed automation run as it happens
flexkit activity ls --follow --json | jq -r --unbuffered 'select(.kind == "automation_failure") | "\(.createdAt) \(.title)"'
Last updated on