> For the complete documentation index, see [llms.txt](https://docs.hypertensor.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hypertensor.org/subnet-template/client/how-to-use.md).

# How To Use

Running a client and using the subnet required connecting to the DHT as a client and running the session manager.

```python
config = ClientConfig()
config.initial_peers = BOOTNODES # Get bootnodes
config.update_period = 60

dht = DHT(
    initial_peers=config.initial_peers,
    identity_path=IDENTITY_PATH,
    start=True,
    num_workers=8,
    client_mode=True,
    startup_timeout=config.daemon_startup_timeout,
    announce_maddrs=ANNOUNCE_MADDRS_LIST
)

remote_manager = RemoteManager(
    config=config,
    dht=dht,
)

manager = SessionManager(remote_manager=remote_manager)

# Async generator example
async with manager.session() as session:
    async for output in session.run_task():

# Single response example
async with manager.session() as session:
    result = session.run_task()
```
