For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

agentengine invoke

Invoke the deployed agent for the current workspace.

Invoke the deployed agent in the current workspace.

Provide the message as an argument, through --file, or on stdin. With no input and a terminal, the command starts an interactive chat session that streams responses.

--payload attaches a JSON object forwarded to the agent as contextual metadata. In the interactive session, /payload views, sets, or clears it between turns, and /resume (guided) or /resume answers a pending interrupt.

--resume continues a suspended session in non-interactive mode and requires --session. Interactive mode rejects --json.

agentengine invoke [message] [flags]
agentengine invoke "Summarize the latest deployment"
agentengine invoke --payload '{"screen":"policy-list"}' "What policies are available?"
--base-url string Platform base URL
--context string Named context to target (see 'agentengine context list')
--file string Read the message from a file
-h, --help help for invoke
--json Output JSON
--org-id string Organization ID
--payload string JSON object forwarded to the agent as contextual metadata (e.g. '{"screen":"policy-list"}')
--project-id string Project ID
--resume string JSON resume_map for continuing a suspended session (requires --session; mutually exclusive with MESSAGE, --file, and stdin)
--session string Conversation session ID to resume or reuse. Omit to start a new session; each active session reserves runtime capacity
--stream Stream response chunks as they arrive
--timeout duration Maximum time to wait for each invoke request (default 10m0s)
--user-id string User ID to pass to the deployed agent
--workspace string Monorepo: invoke a specific workspace by name (from root agent.yaml)
--workspace-id string Workspace ID
--log-file string override log file path
--log-level string file log verbosity (error|warn|info|debug) (default "info")
--no-log disable file logging
-q, --quiet silence stderr below error
-v, --verbose count raise stderr verbosity (-v info, -vv debug)
Rate this page