agentengine invoke

For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

agentengine invoke

MongoDB Atlas Agent Engine is in Public Preview and intended for evaluation and prototyping purposes only. We do not recommend production deployments during preview and expect to communicate breaking changes with you periodically. To learn more about preview feature considerations, see Preview Features.

Invoke the deployed agent for the current workspace.

Synopsis

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 \<json> answers a pending interrupt.

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

agentengine invoke [message] [flags]

Examples

agentengine invoke "Summarize the latest deployment"
agentengine invoke --payload '{"screen":"policy-list"}' "What policies are available?"

Options

    --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

Options inherited from parent commands

    --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)

SEE ALSO

  • [agentengine](https://www.mongodb.com/docs/agentengine/cli/agentengine.md#std-label-agentengine - Agent Engine local development CLI.