---
title: "Deep Agent quickstart"
description: "Run a workspace-owning agent through a durable model and tool loop."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cortavyn.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Deep Agent quickstart

```java
var agent = DeepAgent.builder(model)
    .systemPrompt("You are a careful research assistant.")
    .workspace(new InMemoryWorkspace())
    .build();

DeepRun run = agent.invoke("research-42", "Collect findings in notes/findings.txt")
    .toCompletableFuture().join();
```

The default in-memory workspace accepts safe relative paths only. Without a configured workspace, each thread receives an isolated in-memory workspace.

For an executable example without credentials, run:

```shell
mvn -pl :cortavyn-example-deep -am package -Prun-example
```

Source: https://docs.cortavyn.org/deep-agent/quickstart/index.mdx
