# fetchAgentInfo

<!-- https://uncage.vercel.app/docs/api/agent/functions/fetchagentinfo/ -->

```ts
function fetchAgentInfo(fetchFn, hubUrl): Promise<
  | {
  minAgentVersion: string;
  protocol: number;
  transports: object[];
}
| null>;
```

Defined in: agent/src/transport/choose.ts:8

What the hub serves (`GET <hub>/agent/info`), or `null` when it cannot be read (offline, not a 0.3 hub, bad answer).

## Parameters

| Parameter | Type |
| ------ | ------ |
| `fetchFn` | (`input`, `init?`) => `Promise`\<`Response`\> |
| `hubUrl` | `string` |

## Returns

`Promise`\<
  \| \{
  `minAgentVersion`: `string`;
  `protocol`: `number`;
  `transports`: `object`[];
\}
  \| `null`\>
