> For the complete documentation index, see [llms.txt](https://docs.layerlens.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.layerlens.ai/6.-build-wire-your-code/async-vs-sync-workflow.md).

# Async vs sync workflow

Async vs sync workflow in Stratix — when work is queued, when it's immediate, what to expect.

Stratix has two operational modes: synchronous (immediate response) and asynchronous (queued, results stream in). Knowing which mode applies prevents most "why is this taking so long?" surprises.

## Sync operations

These return immediately:

* Browsing the catalog
* Fetching a model, benchmark, or saved evaluation
* Reading a trace
* Creating a judge or scorer (definition only)
* Generating an API key

## Async operations

These queue:

* Running an evaluation
* Running a trace evaluation
* Running GEPA optimization
* Ingesting a large trace batch

For async operations:

* The API returns a **handle** (an evaluation ID, optimization ID, etc.)
* The work runs in the background
* You poll for status, subscribe via SSE, or call `wait_for_completion(...)` in the SDK

## SDK polling helpers

The SDK has helpers like:

```python
result = client.evaluations.wait_for_completion(eval_id, timeout=300)
```

Async-equivalent:

```python
result = await client.evaluations.wait_for_completion(eval_id, timeout=300)
```

## Queue depth and ECU

Async work queues per-tenant. Most queues drain in seconds; large GEPA optimizations or large evaluation batches may take minutes.

## Failure semantics

Async runs that fail report a failure status with an error code. The SDK exception classes (`APIError`, `NotFoundError`, etc.) cover both immediate and async errors.

## Where to next

* [Python SDK reference](/6.-build-wire-your-code/sdk-python.md)
* [Evaluations](/8.-evaluate-score-the-outputs/evaluations-1.md)
* [Trace evaluations](/8.-evaluate-score-the-outputs/trace-evaluations.md)
