Skip to main content

cast invoke

Send a prompt to a deployed agent and get a response.

Usage

Arguments

Options

Examples

Basic invocation

Output:

Read prompt from a file

Useful for longer prompts or multi-line input.

Multi-turn conversations

Use the -s, --session option to maintain conversation history:
With session IDs, the agent’s sandbox persists between invocations, allowing multi-turn conversations and stateful interactions.

What Happens During Invoke

  1. Request received — Your prompt is sent to the Castari API
  2. Sandbox activated — A sandbox is spun up (or reused if session specified)
  3. Agent runs — Your agent code executes with the prompt as input
  4. Response collected — Output is captured and returned to you
  5. Cleanup — Without a session, sandbox is destroyed. With a session, it persists.

Errors

See Also