## Conclusion

Coding agents often run in short-lived VMs, containers, or sandboxes, but the files, structured state, and working context they produce do not have to disappear when compute is torn down.

In this hands-on lab, you used the TiDB Cloud CLI (`ti`) and Hermes Agent to build a **unified agent storage layer** that is independent of the compute lifecycle:

### Key Takeaways

- **Compute is ephemeral; storage does not have to be.** When a Hermes sandbox container is destroyed, your files remain in TiDB Cloud Filesystem and can be remounted in the next session.
- **`ti` is a unified control plane.** The same CLI manages Filesystem lifecycle operations (`ti fs`) and database provisioning (`ti db`), with JSON output and flags like `--wait` and `--query` that make automation straightforward.
- **Filesystem and database serve different roles.** TiDB Cloud Filesystem is ideal for code, build artifacts, and POSIX-compatible workspaces; TiDB Cloud Starter is better for structured, queryable agent state such as task history, metadata, and application data.
- **Mount credentials can be scoped.** A sandbox only needs `TI_FS_TOKEN` and region information to use a specific filesystem—it does not require full TiDB Cloud API keys, which mirrors how you would delegate storage access to an agent in production.
- **Agents can adopt storage themselves.** With the right environment variables, skills, and sandbox permissions, an agent can install dependencies, FUSE-mount cloud storage, and treat `/workspace` as a persistent home across sessions.

### Next Steps

1. **Automate mount on sandbox startup** — Build a Docker image or entrypoint script that always mounts a TiDB Cloud Filesystem when a new agent sandbox starts, so handoffs between sessions require no manual steps.

2. **Extend the storage layer** — Explore advanced TiDB Cloud Filesystem capabilities such as Git-aware workspaces, audit journals, and credential vaults to add version control, task history, and secure secret access to your agent workflows.

3. **Design agent memory on top of Starter** — Use the database you provisioned as a foundation for long-term agent memory: store conversation summaries, user preferences, task checkpoints, and retrieval-friendly metadata that any sandbox can query via `DATABASE_URL`.

4. **Apply the pattern to your own agents** — The techniques in this lab are not limited to Hermes. Any agent that runs in a short-lived environment can benefit from the same unified storage layer.

5. **Stay tuned** — Additional intermediate and advanced hands-on labs will be available soon.

### Resources

| Resource | Link |
|----------|------|
| TiDB Cloud CLI (`ti`) | [https://github.com/tidbcloud/ti-cli](https://github.com/tidbcloud/ti-cli) |
| Hermes Agent | [https://hermes-agent.nousresearch.com/](https://hermes-agent.nousresearch.com/) |
| Mount TiDB Cloud FS Skill | [https://github.com/pingcap/agent-rules/blob/main/skills/mount-tidb-cloud-fs/SKILL.md](https://github.com/pingcap/agent-rules/blob/main/skills/mount-tidb-cloud-fs/SKILL.md) |
| TiDB Cloud Starter | [Start Free](https://www.pingcap.com/tidb-cloud-starter-pricing-details/#free-quota) |

### End

- Please close the Web SSH terminal window and click the `Terminate` button on the left to stop the lab, bye.
