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

# File Tracker • AI Agent SDK

> FileTracker: Track file hashes and modification times for incremental indexing.

# FileTracker

> Defined in the [**indexing**](../modules/indexing) module.

<Badge color="blue">AI Agent</Badge>

Track file hashes and modification times for incremental indexing.

Persists state to a JSON file for cross-session tracking.

## Constructor

<ParamField query="state_file" type="Optional[str]" required={false}>
  No description available.
</ParamField>

## Methods

<CardGroup cols={2}>
  <Card title="get_file_info()" icon="function" href="../functions/FileTracker-get_file_info">
    Get file information (hash, mtime, size).
  </Card>

  <Card title="mark_indexed()" icon="function" href="../functions/FileTracker-mark_indexed">
    Mark file as indexed.
  </Card>

  <Card title="get_memory_ids()" icon="function" href="../functions/FileTracker-get_memory_ids">
    Return the memory IDs previously stored for a file (empty if none).
  </Card>

  <Card title="has_changed()" icon="function" href="../functions/FileTracker-has_changed">
    Check if file has changed since last indexing.
  </Card>

  <Card title="save()" icon="function" href="../functions/FileTracker-save">
    Save state to file.
  </Card>

  <Card title="load()" icon="function" href="../functions/FileTracker-load">
    Load state from file.
  </Card>

  <Card title="clear()" icon="function" href="../functions/FileTracker-clear">
    Clear all tracked files.
  </Card>
</CardGroup>

## Source

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