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

# embedding • AI Agent SDK

> Embedding module for PraisonAI Agents.

# embedding

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

Embedding module for PraisonAI Agents.

This module provides a unified embedding API that can be used throughout
the praisonaiagents package. It consolidates embedding functionality that
was previously duplicated in memory.py and knowledge.py.

Usage:
\>>> from praisonaiagents import embedding
\>>> result = embedding("Hello world")
\>>> print(result.embeddings\[0]\[:5])

\>>> from praisonaiagents.embedding import embedding, EmbeddingResult
\>>> result = embedding(\["Hello", "World"])
\>>> print(len(result))
2

The module uses lazy imports to avoid loading litellm until actually needed,
ensuring zero performance impact on import time.

## Import

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import embedding
```
