### Build and call a HarnessAgent with DockerFilesystemSpec Source: https://java.agentscope.io Builds a HarnessAgent with a model resolved via ModelRegistry (reads DASHSCOPE_API_KEY), a workspace directory, and a DockerFilesystemSpec sandboxed to the current user. The agent is then called with a RuntimeContext specifying session and user IDs, blocking until the response completes. ```java var agent = HarnessAgent.builder() .name("coder") .model("dashscope:qwen-max") // resolved via ModelRegistry; reads DASHSCOPE_API_KEY .workspace(Paths.get(".agentscope/workspace")) // AGENTS.md · MEMORY.md · skills · subagents .filesystem(new DockerFilesystemSpec() // sandboxed exec: local · Docker · remote KV swap in one line .isolationScope(IsolationScope.USER)) // shared across sessions of the same user .build(); agent.call(msg, RuntimeContext.builder() .sessionId("demo").userId("alice").build()).block(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.