DEV Community

Romin Irani
Romin Irani

Posted on • Originally published at Medium on

Antigravity CLI Tutorial Series: Part 2 : Conversations, Conversations and Conversations

Welcome to Antigravity CLI Tutorial.

The Series:

Part 1 : Getting Started

Part 2 : Conversations, Conversations, Conversations (this blog)

Codelab : If you prefer to do a hands-on, step-by-step instructional codelab, go directly to the “Getting Started with Antigravity CLI Codelab”.

In this part of the series, we are going to understanding the mechanics of Conversations in Antigravity CLI.

You might already have your own definition of what a conversation means? And you would be right in your approximate definition of it. It is definitely a sequence or a thread of messages exchanged between you (user) and the agent.

But you would have multiple questions pop up like:

  • Are these conversations stored somewhere?
  • How do we manage multiple threads of conversation? Each thread having its own sequence of unique user and agent interactions.
  • Can we switch from one conversation to another?

And definitely a lot more questions along similar lines. What follows is my understanding of what Conversations are in Antigravity CLI and an attempt to get the answers to the above questions.

I call these as my experiments since the documentation is sparse at the time of writing and the source code is not open for me to take a peek into. So please correct me if I have hallucinated unintentionally. :-)

What is a Conversation?

First up, let usattempt to define what a conversation means and what better than to ask Antigravity CLI itself. It came up quite well:

In the context of Antigravity CLI, a conversation is an isolated work session or execution thread identified by a unique Conversation ID (e.g., 3b4a1d20–3968–4ed2–90b3–00eea3060b02 ).

Here is what defines a conversation:

  1. State and History: Every conversation preserves a history of interactions (user requests, agent responses, tool calls, and system messages) serialized as JSON Lines (JSONL) transcripts under

    /brain//.system_generated/logs/ .

  2. Dedicated Artifacts: Each conversation has its own storage directory

    ( /brain// ) where structured markdown documents like the implementation_plan.md , task.md , and walkthrough.md are saved and updated.

  3. Scratch Space: Conversations have a dedicated scratchpad directory ( /brain//scratch/ ) for temporary test scripts, helper files, or data files that persist across steps.

  4. Agent Tree: When a main agent invokes a subagent, a new child conversation is spawned with its own ID, allowing agents to work in parallel on specialized sub-tasks while maintaining isolated context.

What is an appDataDir?

Good question. On my mac, it is in my $HOME/.gemini/antigravity-cli folder or ~/.gemini/antigravity-cli folder. So inside of this directory, you will find the following:

Inside this directory, you will find the following folder and sub-folders under it (not all subfolders are described):

brain/ : Contains subdirectories for each conversation (using their Conversation ID) containing:

 — .system_generated/logs/ : Chat transcripts ( transcript.jsonl , transcript_full.jsonl ).

— Artifacts: Markdown files like implementation_plan.md , task.md , and walkthrough.md .

Conversation Management commands

There are several in-built commands in Antigravity CLI that we can use for conversation management. They are:

• /clear : Clears the screen and starts a fresh conversation thread.

• /resume (or /switch ): Displays a menu showing your previous conversations, allowing you to choose one to resume.

• /rewind (or /undo ): Rolls back the active conversation history to a previous step (useful if a command failed or you want to try a different direction).

• /fork : Branches the current conversation into a new workspace from a specific step, preserving history up to that point.

  • /rename : Renames the active conversation with a custom, readable title.

Let’s see it work

Let’s ensure that we are starting a fresh conversation thread. To do that, you can use /clear command. This can be used anytime to create a new conversation. This does not lose any of the previous conversation and we can always switch back to previous conversation threads. We will see all of that in a while.

But for now, just ensure that you have used the /clear command and are ready in Antigravity CLI.

Give the following prompt:

What is Google Cloud Run?

Antigravity CLI gets down to work and produces the following output:

● WebSearch(Google Cloud Run overview features) (ctrl+o to expand)

  Google Cloud Run is a fully managed, serverless platform by Google Cloud that allows you to run containerized applications and services without having to manage the underlying server infrastructure. It combines the flexibility of        
  containers with the simplicity of serverless computing.                                                                                                                                                                                      

  ### Key Features                                                                                                                                                                                                                             

  • Fully Managed & Serverless: Google automatically handles infrastructure management, including server provisioning, operating system maintenance, and scaling.                                                                              
  • Automatic Scaling: Cloud Run scales automatically based on incoming request traffic. It can scale up to thousands of instances to handle high demand, and scale down to zero when there is no traffic, meaning you only pay when your      
  application is actively handling requests.                                                                                                                                                                                                   
  • Any Language or Library: Since it runs Docker/OCI-compliant containers, you can write your application in any programming language (e.g., Python, Node.js, Go, Java, Rust) and use any system library or custom dependency.                
  • Deploy from Source or Container: You can deploy an existing container image from Google Artifact Registry or deploy directly from your source code repository. If deploying from source, Cloud Run uses Google Cloud Buildpacks to         
  automatically package your code into a container.                                                                                                                                                                                            
  • Two Execution Modes:                                                                                                                                                                                                                       
      • Cloud Run Services: For web apps, APIs, microservices, or event-driven applications that respond to incoming web/HTTP requests or gRPC calls.                                                                                          
      • Cloud Run Jobs: For short-lived, run-to-completion tasks (like database migrations, nightly backups, or batch data processing) that do not serve web traffic.                                                                          
  • Hardware and AI Acceleration: It supports deploying workloads on GPUs (such as NVIDIA L4) and using larger machine configurations, making it a viable serverless platform for hosting Large Language Models (LLMs) and running AI inference
  workloads.                                                                                                                                                                                                                                   
  • Integrations: It integrates natively with other Google Cloud services (such as Pub/Sub, Cloud Storage, and Eventarc for event-driven workflows) and supports VPC connectivity to securely access private databases or other internal       
  resources.
Enter fullscreen mode Exit fullscreen mode

But what has it done behind the scenes to persist this conversation thread.

Step 1

The Antigravity CLI instantly performs the following directory setup (I am assuming the following conversation id → 11111111–2222–3333–4444–555555555555):

  1. Creates the Conversation Root Folder:

~/.gemini/antigravity-cli/brain/11111111–2222–3333–4444–555555555555/

  1. Creates the System Logs Folder:

~/.gemini/antigravity-cli/brain/11111111–2222–3333–4444–555555555555/.system_generated/logs/

  1. Creates the Scratchpad Directory:

~/.gemini/antigravity-cli/brain/11111111–2222–3333–4444–555555555555/scratch/ (This folder remains empty until the agent needs to write temporary test scripts or run one-off diagnostics).

Step 2: Logging the Initial Prompt (Internal System Logs)

The CLI creates two JSON Lines files under the .system_generated/logs/ folder:

• transcript.jsonl (assuming that this is a token-efficient log containing truncated text for large outputs)

• transcript_full.jsonl (assuming that this is a full, untruncated log containing exact tool results and text)

If you visit the transcript.jsonl file, you will notice that a JSON record representing your first input step is appended (few fields only since there is a lot of metadata too):

{
 "step_index":0,
 "source":"USER_EXPLICIT",
 "type":"USER_INPUT",
 "status":"DONE",
 "content":"What is Google Cloud Run?"
}
Enter fullscreen mode Exit fullscreen mode

You will also see multiple steps being recorded next in terms of how Antigravity CLI is planning out its execution. I will only reproduce the steps / types, etc and it will be good enough for you to understand. I encourage you to inspect the files on your machine to see all the wonderful details.

{"step_index":1,"source":"SYSTEM","type":"CONVERSATION_HISTORY"...}
{"step_index":2,"source":"MODEL","type":"PLANNER_RESPONSE","status":"DONE","created_at":"2026-05-24T12:14:37Z","tool_calls":[{"name":"search_web","args":{"query":"\"Google Cloud Run overview features\"","toolAction":"\"Searching the web\"","toolSummary":"\"Web search\""}}]}
{"step_index":3,"source":"MODEL","type":"SEARCH_WEB","status":"DONE","created_at":"2026-05-24T12:14:38Z","content":"Created At: 2026-05-24T12:14:38Z\nCompleted At: 2026-05-24T12:14:43Z\nThe search for \"Google Cloud Run overview features\" returned the following summary:\nGoogle Cloud Run is a fully managed, serverless platform that allows you to run containerized applications and services without managing the underlying infrastructure[1][2][3]. It is designed to combine the flexibility of containers with the simplicity of a serverless environment[4].\n\n### Core Features\n\n* **Fully Managed & Serverless:** Google handles all infrastructure management, including provisioning, scaling, and maintenance[1][2]. You simply provide your code or container[3][4].\n* **Automatic Scaling:** Cloud Run s.....}
...
{"step_index":5,"source":"MODEL","type":"PLANNER_RESPONSE","status":"DONE","created_at":"2026-05-24T12:14:46Z","content":" **Google Cloud Run** is a fully managed, serverless platform by Google Cloud ...}

Enter fullscreen mode Exit fullscreen mode

In this way, your current conversation as you go back and forth is persisted.

See what happens if you give a follow up message that says:

What kind of applications can I deploy on Google Cloud Run?
Enter fullscreen mode Exit fullscreen mode

Once you get the response in Antigravity CLI terminal, go back to the conversation id folder and you will see additional steps in the transcript.jsonl file:

{"step_index":6,"source":"USER_EXPLICIT","type":"USER_INPUT","status":"DONE","created_at":"2026-05-24T12:27:18Z","content":"<USER_REQUEST>\nWhat kind of applications can I deploy on Google Cloud Run?\n</USER_REQUEST>\n<ADDITIONAL_METADATA>\nThe current local time is: 2026-05-24T17:57:18+05:30.\n</ADDITIONAL_METADATA>"}
{"step_index":7,"source":"MODEL","type":"PLANNER_RESPONSE","status":"DONE","created_at":"2026-05-24T12:27:18Z","content":"You can deploy a wide variety of applications on...}
Enter fullscreen mode Exit fullscreen mode

Step 3: Agent Analysis and Planning (If coding changes are needed)

Now, let’s say we go a step further and ask it to actually generate/code a sample application for us that can be deployed on Cloud Run:

Create a single page HTML / JavaScript application to deploy on Cloud Run that takes my name and returns me a greeting.
Let's plan it out first.
Enter fullscreen mode Exit fullscreen mode

Here I am specifically asking it to plan it out first. It comes back saying:

 I have created the implementation plan for the Google Cloud Run greeting application.                                                                                                                                                        

  Please review the proposed design and files in the implementation_plan.md artifact. Once you approve, let me know and we will proceed to verify it.
Enter fullscreen mode Exit fullscreen mode

This behind the scenes creates:

~/.gemini/antigravity-cli/brain/11111111–2222–3333–4444–555555555555/implementation_plan.md

Depending on how you proceed, additional markdown files (walkthrough, task list, etc) will be created in the same folder.

As an experiment, go ahead with approving the implementation plan. This will make Antigravity CLI generate the code, test out the server, etc. This will result in additional folders being created but all within the brain/CONVERSATION_ID folder.

If you navigate to your app data folder during/after a coding conversation, here is exactly what you would start seeing something like this:

~/.gemini/antigravity-cli/
└── brain/
└── 11111111–2222–3333–4444–555555555555/ ← Root of the conversation
├── .system_generated/
│ └── logs/
│ ├── transcript.jsonl ← Truncated log
│ └── transcript_full.jsonl ← Untruncated full log
├── implementation_plan.md ← Technical design spec
├── task.md ← Interactive checklist
└── walkthrough.md ← Work summary & verification
Enter fullscreen mode Exit fullscreen mode

A few other things worth mentioning are:

  • You will find a history.jsonl within the ~/.gemini/antigravity-cli folder that seems to be a index of all conversations.
  • A conversations folder that holds the conversations in a protocol buffer format. We can leave it as is for now.

Let’s Rewind

What if we want to go back at a point in time in the conversation. Remember we started with asking about Google Cloud Run, then we asked it to generate code for the application and so on. As a result of which, several code files, artifacts etc have been generated.

If I go into shell mode and see the current files in the folder, you can see from the output below, the files that are currently present. So far so good.

● ! ls
  ⎿ Dockerfile
     node_modules
     package-lock.json
     package.json
     public
     README.md
     server.js
Enter fullscreen mode Exit fullscreen mode

Now, give the /rewind command and you should see a list of all interactions that you have had. In my case, you see the current conversation thread with the list of interactions. I can use the keyboard to go up at the specific point in time before the files were generated (8 files changed, etc).

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Rewind Conversation

  What is Google Cloud Run?

> What kind of applications can I deploy on Google Cloud Run?

  Create a single page HTML / JavaScript application to deploy on Cloud Run tha...
    8 files changed +583 -1

  Could you first plan it out?
    1 artifact generated

  what is the history.jsonl file that you are managing for the conversations

  what is a .pb file and how are you using it for conversations

  (current)

Keyboard: ↑/↓ Navigate enter Select esc Cancel
Enter fullscreen mode Exit fullscreen mode

Once I select to rewind it to a step before all the files were generated and execute that step, it will remove the files generated as is evident from the outputs that I now see.

● ! ls
  ⎿ node_modules
     package-lock.json
     public
Enter fullscreen mode Exit fullscreen mode

The implementation_plan.md and other artifact files also go away from the brain/CONVERSATION_ID folder that we earlier saw. You can try out these scenarios on your machine.

Saving a Conversation with a different name

At any point in time, you can save the conversation with a name that is easier or makes sense to you in terms of the entire thread. Just use the /rename command.

In Antigravity CLI, I simply give the rename Google Cloud Run basics to rename this conversation. It comes back with the following message:

> /rename
  ⎿ Conversation renamed to: Google Cloud Run basics
Enter fullscreen mode Exit fullscreen mode

Switching between Conversations

You can use the /resume or /switch command to switch to another conversation. For example, I see the following:

   CLI Antigravity (tab to cycle)

  Conversations
  Type to search...
> [CURRENT] Google Cloud Run basics 10 steps 8m ago
  Understanding Antigravity CLI Conversations 24 steps 52m ago
  hello 4 steps 1h ago

Keyboard: ↑/↓ Navigate ←/→ Page enter Select f2 Rename ctrl+delete Delete tab Switch Tab esc Go back / Clear search
Enter fullscreen mode Exit fullscreen mode

You can see that our current context is now with our preferred name Google Cloud Run basics and the other ones that you see in the list are the ones that I had here. But you might see another list.

Select any one of these to switch to that conversation and carry on that conversation from there or maybe even rewind, etc.

Switching to an Antigravity conversation

If you have been paying attention to the output shown in the /switch command, you might see an Antigravity and CLI option. This might happen only if you have also installed the non-CLI option i.e. Antigravity on your machine. In my case I have and have interacted a bit with it.

But what is pleasantly surprising is that it is now showing me conversations that have been saved via Antigravity and allowing me to import them. Whew! Let’s try this out:

   CLI Antigravity (tab to cycle)

  Conversations
  Type to search...
> Extracting Invoice Information [Import this conversation? (y/n)] 20 steps 2h ago
  Generate a events website but let's discuss the requirements first. 67 steps 1d ago

Keyboard: ↑/↓ Navigate enter Select tab Switch Tab esc Go back / Clear search
Enter fullscreen mode Exit fullscreen mode

So I select one of the conversations (Extracting Invoice Information) and then press on Enter. It asks me that it needs to import this conversation. This brought up the previous conversation and I was able to carry on with a new message in the thread. Wonderful. Probably this needs a lot more testing.

  <PREVIOUS _ CONVERSATION _ THREAD >

────────────────────────────────────────────────────────────
> What are the files sizes for each of the invoices

● ListDir(/Users/romin/agy-cli-projects/invoice-processing) (ctrl+o to expand)

  Here are the file sizes for each of the invoice image files in your directory:                                                                                                                                                               

  • inv1.png: 273,828 bytes (approx. 273.8 KB)                                                                                                                                                                                           
  • inv2.png: 369,086 bytes (approx. 369.1 KB)                                                                                                                                                                                           
  • inv3.png: 446,932 bytes (approx. 446.9 KB)                                                                                                                                                                                           
  • inv4.png: 343,328 bytes (approx. 343.3 KB)                                                                                                                                                                                           

  (Note: The CHUBB.pdf insurance document size is 42,965 bytes / approx. 43 KB).   
Enter fullscreen mode Exit fullscreen mode

One more thing

If you quit your Antigravity CLI at this point, you will notice that there is a message at the end that looks something like this:

Resume: agy --conversation=d1d8a55b-cc27-4dd4-bc62-2f73015960d2 (or -c)
Enter fullscreen mode Exit fullscreen mode

That’s right. Antigravity CLI comes with a command line option to resume a specific conversation via the --conversation or -c parameter. This value has to be the unique conversation id that you see. I think this is useful but might be a bit unwieldy to remember or use.

In any case, the key message is that you now what is going on with this unique conversation id , where the stuff is persisted on your local machine and can discover more. In any case, you can always launch Antigravity CLI and use the /switch command to go to a specific conversation thread. Just remember to use /rename to name them in a way that you understand.

Conclusion

While a conversation in Antigravity CLI is something that is managed behind the scenes for you, it is helpful to understand how the tool is working. Hopefully these examples give you a good idea of what is happening under the hood. I will keep adding more examples to this as I understand this better. See you in latter parts of the series.


Top comments (0)