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

# Remote execution

> Run a saved study on Expected Parrot and retrieve its results.

Remote execution runs your EDSL job on Expected Parrot's servers. Your questions, scenarios, agents, and models still define the study in Python; the hosted service carries out the interviews and returns Results for analysis. This is useful for running a study across many inputs or models through your Expected Parrot account.

Start with a [Jobs](https://docs.expectedparrot.com/en/latest/jobs.md) object and [model access configured](https://docs.expectedparrot.com/en/latest/api_keys.md). You can run a job you have just constructed or load one from a saved package, as below.

## Run and save

Load a prepared job, inspect its prompts, and estimate the workload before running it:

```python theme={null}
from edsl import Jobs

job = Jobs.load("jobs.ep")
job.prompts()
# Optional: job.estimate_job_cost() to estimate model costs before execution.
```

With account access configured, request hosted execution explicitly:

```python theme={null}
results = job.run(offload_execution=True)
results.save("results.ep")
results.select("answer.*")
# In a script, append .print() to display the answers.
```

This call waits for results before the next line saves them. For long jobs, use [Background jobs](https://docs.expectedparrot.com/en/latest/guides/background_jobs.md) to submit and return immediately, then inspect status and retrieve the answers later.

## Python execution settings

With a prepared `job`, use `job.run(offload_execution=True)` to request hosted execution explicitly. To orchestrate the job locally with direct provider access, use `job.run(disable_remote_inference=True)`. Local orchestration may still call remote model APIs.

Remote execution, API proxying, and remote caching are separate settings. Set `disable_remote_cache=True` when a local run must avoid the remote cache. Use `disable_remote_inference=True` for direct provider access from your machine; `offload_execution=False` alone does not establish that execution mode.

See [Jobs execution options](https://docs.expectedparrot.com/en/latest/jobs.md#execution-options) for accepted execution options and [Remote caching](https://docs.expectedparrot.com/en/latest/remote_caching.md) for response reuse.

## Failed or partial remote runs

A submitted job is not necessarily a completed dataset. Inspect the final status, completed interview count, and errors before analysis:

```python theme={null}
from edsl import Coop

coop = Coop()
status = coop.remote_inference_get(job_uuid="JOB_UUID")
status
# If the job has an error report:
# report = coop.get_error_report_markdown("JOB_UUID", save_path="error.md")
```

Replace `JOB_UUID` with your submitted job's identifier. See [Background jobs](https://docs.expectedparrot.com/en/latest/guides/background_jobs.md) for finding jobs, retrieving completed Results, and reading results by page.

## CLI alternatives

```bash theme={null}
ep validate --file jobs.ep
ep jobs cost jobs.ep
ep run jobs.ep --output results.ep
ep results select --file results.ep --column "answer.*" --limit 5
```

Read each command's JSON `status` before continuing. The blocking run saves completed data in `results.ep`; stdout contains execution metadata. For an existing remote job:

```bash theme={null}
ep jobs status JOB_UUID
ep jobs errors JOB_UUID --output error.md
```

Replace `JOB_UUID` with the identifier returned at submission. The CLI rejects a failed or partially failed remote run by default. If you deliberately want its successful observations, use `--allow-partial` on the run command and inspect the missing observations before using the output:

```bash theme={null}
ep run jobs.ep --allow-partial --output partial-results.ep
```

This command submits or runs the job; it is not a download command for an existing job. A run with no successful observations still fails. To retrieve a previously submitted job, use `ep jobs results JOB_UUID --output results.ep` and inspect its returned status and warnings.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.