> ## 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.

# Get Corpus Stats • AI Agent SDK

> get_corpus_stats: Get statistics about the indexed corpus.

# get\_corpus\_stats

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

> This is a method of the [**Knowledge**](../classes/Knowledge) class in the [**knowledge**](../modules/knowledge) module.

Get statistics about the indexed corpus.

## Signature

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

### Returns

<ResponseField name="Returns" type="Any">
  CorpusStats with file count, chunk count, and strategy recommendation
</ResponseField>

## Uses

* `CorpusStats`

## Source

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