> ## Documentation Index
> Fetch the complete documentation index at: https://cognitio-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Type Alias: Query

> Generated from the public TypeScript API.

```ts theme={null}
type Query = AgentStream;
```

The same controllable async-iterator surface returned by `Agent.stream()`.

## Example

```ts theme={null}
const result: Query = query({ prompt: "What is 2+2?" })
```


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