Downcity
AgentCLIInteraction

studio agent chat

Chat with a running Agent from the terminal in interactive or one-shot mode

studio agent chat

Usage

studio agent chat
studio agent chat --to my-agent
studio agent chat --to my-agent --message "Summarize this repo"
studio agent chat --to my-agent --message "Return JSON" --json

Two modes

Interactive mode

Without --message, you enter a persistent terminal conversation:

studio agent chat --to my-agent

Best for:

  • multi-turn interactive exploration
  • iterative prompt and behavior testing
  • manual project conversations

One-shot mode

With --message, the CLI sends one turn and exits:

studio agent chat --to my-agent --message "Summarize the current repository structure"

Best for:

  • scripting
  • one-off analysis
  • terminal toolchain integration

Streaming behavior

  • In normal terminal mode, assistant text streams to stdout as it is generated.
  • --json remains non-streaming so machine-readable output stays stable.
  • The command still uses the dedicated local-cli-chat-main session by default.

Target resolution

  • if --to is provided, it uses that agent id directly
  • if not, and the terminal is interactive, it prompts from currently running agents

If the terminal is non-interactive and you do not provide --to, the CLI does not have enough information to choose a target safely.

Important limitation

The target agent must already be running.

chat will not auto-start the runtime for you.

Common parameters

  • --to <name>
  • --message <text>
  • --json
  • --host
  • --port
  • --token

Useful interactive commands

  • /exit
  • /quit
  • /clear
  • /help

A common misunderstanding

Do not treat terminal chat as "one globally shared context across every surface."

By default it uses its own dedicated local CLI session, which is excellent for terminal debugging, but it is still its own context boundary.

Continue with: