Hi! There's no Genie editor in the Databricks VS Code extension yet, but you can get most of what you're asking for by managing the agent as code with Declarative Automation Bundles (DABs, formerly Databricks Asset Bundles). It works the same on Azure.
1. Export the agent to files (Databricks CLI 1.3.0 or newer; the command still says "genie-space" even though the product is now Genie agents):
databricks bundle generate genie-space --existing-id <AGENT_ID> --key my_agent
This writes src/my_agent.geniespace.json (the full agent: tables, instructions, example SQL) and resources/my_agent.genie_space.yml. You can edit, diff and copy/paste between agents in VS Code, and keep it all in Git.
2. Fork, test, merge back: use Clone from the agent's โฎ menu to make a test copy (it copies tables, instructions, example SQL and functions). Once you're happy with the changes, move them into the original agent's JSON and run databricks bundle deploy. Pull request reviews come for free once it's in Git.
3. Pull UI edits back into the files:
databricks bundle generate genie-space --resource my_agent --force
(add --watch to keep syncing while you edit in the UI)
4. Sorting: in the JSON format, the tables are always sorted alphabetically, because the format requires it.
Two things to watch: Genie resources only deploy with the direct engine (the default for new bundles; older bundles need engine: direct in databricks.yml), and you'll need a recent CLI.
Full walkthrough with an example repo: community.databricks.com/technical-blog/managing-databricks-genie-agents-as-code-with-databricks/ba-...
Resource reference: learn.microsoft.com/en-us/azure/databricks/dev-tools/bundles/resources
Hope this helps!