You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`xagent.NewLocalExecutor()` — the default executor. Runs CLI binaries as child processes using `os/exec`. Zero external dependencies.
207
-
208
-
### DockerExecutor (Demo)
209
204
210
-
`demo/docker_xgopilot/docker` — demo-only executor implementation that runs each CLI invocation via `docker exec` inside a long-lived container. Container lifecycle (start, stop, remove) is managed automatically.
Stdin io.WriteCloser// subprocess stdin; nil when not writable
209
+
Waitfunc() (exitCode int, err error) // blocks until process exits
210
+
Stderr *bytes.Buffer// captured stderr; read after Wait() returns
211
+
}
228
212
```
229
213
230
-
No external Go dependencies — requires only the `docker` CLI on `PATH`.
214
+
### LocalExecutor
231
215
232
-
**Multi-turn with DockerExecutor:** each `docker exec` call runs in a fresh subprocess, so process-level state is not retained between invocations. Claude session continuity relies on passing `--resume <session-id>` whenever a session ID is available. This behavior is not executor-conditional, and stdin is closed after each invocation for both `LocalExecutor` and `DockerExecutor`.
216
+
`xagent.NewLocalExecutor()` — the built-in default executor. Runs CLI binaries as child processes using `os/exec`. Zero external dependencies.
233
217
234
-
### E2BExecutor
218
+
### Custom Executors
235
219
236
-
`github.com/goplus/xagent/executor/e2b` — runs commands inside [E2B](https://e2b.dev)cloud sandboxes. Ships as a separate Go module with its own `go.mod`.
220
+
Any type implementing the `Executor` interface can be used to run agent CLI binaries in a custom environment — for example, inside a Docker container, a cloud sandbox, or over SSH. Pass your implementation via the `WithExecutor()` option when constructing an adapter. See `demo/executor_docker` for a Docker-based reference implementation.
237
221
238
222
## SessionManager
239
223
@@ -272,16 +256,16 @@ type Event interface {
272
256
}
273
257
```
274
258
275
-
| Event type | Kind value | Description | Adapters that emit it |
0 commit comments