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

# Primary Query • AI Agent SDK

> primary_query: Returns the primary rewritten query.

# primary\_query

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**RewriteResult**](../classes/RewriteResult) class in the [**query\_rewriter\_agent**](../modules/query_rewriter_agent) module.

Returns the primary rewritten query.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def primary_query() -> str
```

### Returns

<ResponseField name="Returns" type="str">
  The result of the operation.
</ResponseField>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/query_rewriter_agent.py#L74">
  `praisonaiagents/agent/query_rewriter_agent.py` at line 74
</Card>
