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

# Python API

> Use Augent directly in Python scripts and applications.

## Core Functions

### Transcribe

```python theme={null}
from augent import transcribe_audio

result = transcribe_audio("podcast.mp3", model_size="tiny")
print(result["text"])
print(result["duration"])
print(result["segments"])
```

### Search

```python theme={null}
from augent import search_audio

matches = search_audio("podcast.mp3", ["remote work", "hiring"])
for keyword, hits in matches.items():
    for hit in hits:
        print(f"[{hit['timestamp']}] {hit['snippet']}")
```

### Proximity Search

```python theme={null}
from augent import search_audio_proximity

matches = search_audio_proximity(
    "interview.mp3",
    keyword1="problem",
    keyword2="solution",
    max_distance=30
)
```

### Batch Search

```python theme={null}
from augent import search_audio

files = ["ep1.mp3", "ep2.mp3", "ep3.mp3"]
for f in files:
    results = search_audio(f, ["keyword"])
```

***

## Memory Management

```python theme={null}
from augent import get_memory_stats, clear_memory, list_memories

# View stats
stats = get_memory_stats()

# List all stored transcriptions
entries = list_memories()
for e in entries:
    print(f"{e['title']} - {e['duration_formatted']}")

# Clear memory
cleared = clear_memory()
```

***

## Export

```python theme={null}
from augent import export_matches, export_transcription

# Export search results
csv_output = export_matches(matches, format="csv")
srt_output = export_matches(matches, format="srt")

# Export full transcription as subtitles
srt = export_transcription(result["segments"], format="srt")
```

***

## Clip Extraction

```python theme={null}
from augent import export_clips

clips = export_clips(
    "podcast.mp3",
    matches,
    output_dir="./clips",
    padding=15.0
)
```

***

## Streaming

```python theme={null}
from augent import transcribe_audio_streaming

for progress in transcribe_audio_streaming("podcast.mp3"):
    print(f"{progress.progress:.0%} - {progress.message}")
```
