Skip to content

Pages

  • Getting started
  • Models & providers
  • Sessions
  • Customization
  • Automation

Automation

Run a single task from a script, exchange JSON lines, or embed e in a Rust application.

Run one turn

e -p runs without the terminal interface and prints the response as it streams. Supply a prompt as an argument, or through stdin when there is no prompt argument.

Terminal
e -p "Explain what this repository does"
e -p --no-tools "Draft a release checklist"

The exit status is 0 for a completed turn, 1 for an error or interrupted turn, and 2 for a usage error. Warnings and errors go to stderr.

Read structured events

Add --json to receive each session event as a JSON line, followed by a final result object. Consumers should ignore unknown event types so additive events do not break the integration.

Terminal
e -p --json "Explain the test structure"

Use the RPC process

e rpc reads sequential JSONL requests from stdin and writes one response per request to stdout. Extensions initialize once for the process; each request gets a fresh agent.

Terminal
e rpc
Request
{"id":"overview","prompt":"Summarize this project","tool_mode":"none","save":false}

Responses include the request ID, final output, usage, tool counts, and any error. Requests stay active through automatic compaction and continuation.

RPC requests are memory-only unless save is explicitly true. See e docs automation for the complete request and response fields.

Embed with Rust

The Rust SDK exposes sessions and streamed turns in-process. Use it when your application needs to own the session lifecycle without speaking the RPC protocol.

Terminal
e docs sdk

Limit access

Automation uses the same tool permissions as interactive e. Use --no-tools to disable tools and --no-extensions when extensions should not start. Use an OS sandbox, container, or VM to restrict filesystem and network access.

Read Safety & privacy before running tasks against sensitive projects.