Skip to content

This walkthrough assumes M31A is installed and you have an NVIDIA API key.

1. Start M31A in your project ​

bash
cd /path/to/your/project
m31a

On first use in a new folder, M31A asks whether you trust the workspace. Trust controls whether file and shell tools can act automatically. Choose based on your context; you can change the decision later with /permissions trust.

2. Ask a question about the codebase ​

Type a natural-language request:

text
Explain the build system and list the main entry points.

The agent uses read-only tools (list_directory, glob, grep_search, read_file) to explore. Press Tab to queue a follow-up message while it works, or Ctrl+S to steer the current turn.

3. Make a change ​

text
Add a short "Architecture" section to README.md describing the packages.

By default, edit tools ask for confirmation. You can approve once, for the session, or persist a rule through the policy engine. To auto-approve edits but still prompt for shell commands, start with --approval-mode auto_edit or press Shift+Tab to cycle modes.

4. Run verification ​

text
Run the unit tests and summarize any failures.

Shell commands are subject to the same policy controls as edits. If you enabled a container sandbox, commands execute inside a fresh sandbox instance.

5. Inspect and rewind ​

Useful slash commands while iterating:

CommandPurpose
/context-windowShow current context usage.
/compressCompact conversation history.
/chat listBrowse saved sessions.
/resume latestResume the most recent session.
/rewindRewind to a checkpoint.
/statsShow token and tool usage.

6. Leave a project note ​

Create an M31A.md file in the workspace root to give the agent durable project context, conventions, and constraints. It is loaded into every new session and can be reloaded with /memory reload.

markdown
# Project context

- Use npm workspaces; do not edit generated files under `dist/`.
- Run `npm run preflight` before declaring work complete.

7. Continue later ​

bash
m31a --resume latest
m31a --list-sessions

Or start in an isolated branch with m31a --worktree (requires experimental.worktrees in settings).

8. Use it in a script ​

bash
m31a -p "Summarize the failing tests" --output-format json

See Headless mode for structured output details.

Next steps ​

Built with VitePress. Powered by NVIDIA NIM.