agent invoke command sends a payload to a deployed Novita Agent and returns its response. It supports both plain-text prompts and structured JSON input, and can stream the response as it is produced.
Note: Invoke runs from a deployed agentβs project directory. It requires a
novita.toml in the current directory (created by agent launch) and the NOVITA_API_KEY environment variable.Prerequisites
CLI
Usage
CLI
Payload
The<payload> is parsed as JSON if possible; otherwise it is treated as plain prompt text.
- A string is wrapped as
{ "query": "...", "prompt": "..." }. - A JSON object is passed through; if it has
querybut noprompt,promptis filled in fromquery.
Agent ID & environment variables
The command resolves which agent to call and what env vars to pass as follows:Streaming vs non-streaming
Without--stream, the command waits for the full result and prints the agent ID, session ID, execution time, and the response body. With --stream, output chunks are written to the terminal as they arrive.
Examples
CLI
CLI
CLI