agentengine init

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

agentengine init

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.

Bootstrap org, project, and workspace for this agent repo.

Synopsis

Select an organization and project, generate local dev files (.agentengine/ runtime artifacts and .devcontainer/devcontainer.json), and register this agent as a workspace.

The menus list only organizations and projects where you can create a workspace, and say how many they hid. To target a project you can only view, run agentengine context create instead. A project passed with --project-id, --context, or --workspace-id is checked the same way before init writes anything.

With Atlas IAM delegation off, the org and project menus can also create an Agent Engine organization or project. With delegation on, init selects an existing organization: create or join in Atlas and re-run init. It still offers Agent Engine project create under an Agent Engine organization.

The workspace ID is saved to .agentengine/state.json under the bound context, so later agentengine build commands need no --workspace-id.

Without --context, init selects a project and then reuses that project’s context or creates one named after the project’s display name and ID.

--org-id and --project-id skip the interactive menus; omitting either falls back to interactive selection for that value. --workspace-id links this directory to an existing workspace without creating one, which recovers a run that failed after the platform created the workspace.

Existing generated files are preserved. Re-running init registers the workspace again and refreshes its binding to the selected context.

agentengine init [flags]

Examples

agentengine init
agentengine init --context prod --workspace-id ws_789 --org-id org_123 --project-id grp_456

Options

    --base-url string       Platform API base URL override
    --context string        Named context to bind this directory to
-h, --help                  help for init
    --json                  Output init result as JSON
    --org-id string         Organization ID to use without prompting
    --project-id string     Project ID to use without prompting
    --workspace-id string   Link to an existing workspace instead of creating one
-y, --yes                   Skip the confirmation prompt when re-pinning this directory to a different context

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.