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

# ValkyrieClient

> Construct and close the async Valkyrie SDK client.

`ValkyrieClient` owns the async HTTP connection pool and exposes the public resource namespaces.

## Constructor

Async client for Valkyrie API resources.

```python Signature theme={null}
ValkyrieClient(
    config: ValkyrieConfig,
    *,
    base_url: str | None = None,
    timeout: float | httpx.Timeout = 120,
    transport: httpx.AsyncBaseTransport | None = None,
) -> ValkyrieClient
```

### Parameters

<div className="border-b border-gray-200 py-3 dark:border-gray-800">
  <div className="flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1"><span className="break-all font-mono text-sm">{"config"}</span><span className="min-w-0 break-words text-sm text-gray-500 dark:text-gray-400">required · <a href="/reference/sdk/models/config#valkyrie-config"><code>ValkyrieConfig</code></a></span></div>
</div>

<div className="border-b border-gray-200 py-3 dark:border-gray-800">
  <div className="flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1"><span className="break-all font-mono text-sm">{"base_url"}</span><span className="min-w-0 break-words text-sm text-gray-500 dark:text-gray-400">optional · str | None · default: <code>{"None"}</code></span></div>
</div>

<div className="border-b border-gray-200 py-3 dark:border-gray-800">
  <div className="flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1"><span className="break-all font-mono text-sm">{"timeout"}</span><span className="min-w-0 break-words text-sm text-gray-500 dark:text-gray-400">optional · float | httpx.Timeout · default: <code>{"120"}</code></span></div>
</div>

<div className="border-b border-gray-200 py-3 dark:border-gray-800">
  <div className="flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1"><span className="break-all font-mono text-sm">{"transport"}</span><span className="min-w-0 break-words text-sm text-gray-500 dark:text-gray-400">optional · httpx.AsyncBaseTransport | None · default: <code>{"None"}</code></span></div>
</div>

### Returns

ValkyrieClient

## from\_config

Load a client from a CLI-compatible YAML config.

```python Signature theme={null}
def from_config(
    path: str | Path = '~/.config/valkyrie/valkyrie.yaml',
    *,
    base_url: str | None = None,
    timeout: float | httpx.Timeout = 120,
    transport: httpx.AsyncBaseTransport | None = None,
) -> ValkyrieClient
```

### Parameters

<div className="border-b border-gray-200 py-3 dark:border-gray-800">
  <div className="flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1"><span className="break-all font-mono text-sm">{"path"}</span><span className="min-w-0 break-words text-sm text-gray-500 dark:text-gray-400">optional · str | Path · default: <code>{"'~/.config/valkyrie/valkyrie.yaml'"}</code></span></div>
</div>

<div className="border-b border-gray-200 py-3 dark:border-gray-800">
  <div className="flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1"><span className="break-all font-mono text-sm">{"base_url"}</span><span className="min-w-0 break-words text-sm text-gray-500 dark:text-gray-400">optional · str | None · default: <code>{"None"}</code></span></div>
</div>

<div className="border-b border-gray-200 py-3 dark:border-gray-800">
  <div className="flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1"><span className="break-all font-mono text-sm">{"timeout"}</span><span className="min-w-0 break-words text-sm text-gray-500 dark:text-gray-400">optional · float | httpx.Timeout · default: <code>{"120"}</code></span></div>
</div>

<div className="border-b border-gray-200 py-3 dark:border-gray-800">
  <div className="flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1"><span className="break-all font-mono text-sm">{"transport"}</span><span className="min-w-0 break-words text-sm text-gray-500 dark:text-gray-400">optional · httpx.AsyncBaseTransport | None · default: <code>{"None"}</code></span></div>
</div>

### Returns

ValkyrieClient

## close

Close the underlying HTTP connection pool.

```python Signature theme={null}
async def close() -> None
```

### Returns

None

## Async context manager

The client closes its connection pool when an `async with` block exits.

```python theme={null}
async with ValkyrieClient(config) as client:
    run = await client.runs.start(agent="sweagent", benchmark="swebench")
```
