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

# praisonai Wrapper Compatibility Imports

> praisonai.knowledge, praisonai.memory, and praisonai.eval still work as alias_package shims for older tutorials and PraisonAI University code

`praisonai.knowledge`, `praisonai.memory`, and `praisonai.eval` are compatibility import paths — they forward to `praisonaiagents.*` through `alias_package` shims, so older code and tutorials keep working with no change.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent
from praisonai.eval import Judge  # legacy import path still works

agent = Agent(name="Writer", instructions="Write one short, friendly sentence.")
output = agent.start("Describe Python in one sentence.")

result = Judge(criteria="Clear and friendly").run(output=output)
print(result.score, result.passed)
```

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    Old["from praisonai.X import ..."] --> Shim["alias_package shim"]
    Shim --> Real["praisonaiagents.X<br/>(real implementation)"]

    classDef wrapper fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef shim fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef core fill:#10B981,stroke:#7C90A0,color:#fff

    class Old wrapper
    class Shim shim
    class Real core
```

## Quick Start

**1. Old code keeps working**

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonai.knowledge import Knowledge
from praisonai.memory import FileMemory
from praisonai.eval import Judge
```

**2. Prefer the canonical path for new code**

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents.knowledge import Knowledge
from praisonaiagents.memory import FileMemory
from praisonaiagents.eval import Judge
```

**3. Classes are the same object**

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonai.knowledge import Knowledge as A
from praisonaiagents.knowledge import Knowledge as B

assert A is B  # True — the shim preserves identity
```

## Import Mapping

| Legacy wrapper path | Canonical path | Status |
| - | - | - |
| `praisonai.knowledge` | `praisonaiagents.knowledge` | Shim — forwards; identity preserved |
| `praisonai.knowledge.*` (e.g. `Knowledge`, `KeywordIndex`) | `praisonaiagents.knowledge.*` | Same object |
| `praisonai.memory` | `praisonaiagents.memory` | Shim — forwards; identity preserved |
| `praisonai.memory.adapters` | `praisonaiagents.memory.adapters` | Shim — submodule identity preserved |
| `praisonai.eval` | `praisonaiagents.eval` | Shim — forwards; identity preserved |

> [!NOTE]
>
> Plain `import praisonai` does **not** load `praisonai.knowledge`, `praisonai.memory`, or `praisonai.eval`. The shim is installed only when you explicitly run `from praisonai.X import ...` (or `import praisonai.X`), which keeps cold start fast.

## Best Practices

> [accordion] Use praisonaiagents.\* in new code
>
> It is the canonical path — the SDK reference and new tutorials use it.

> [accordion] Don't rewrite working praisonai.\* imports
>
> They are a stable compatibility surface backed by `alias_package` shims and will keep working, just like the `praisonai.bots` / `praisonai.gateway` / `praisonai.daemon` shims.

> [accordion] Keep mock.patch targets consistent
>
> Submodules are the same object under both paths, so patching a submodule attribute (e.g. `praisonai.memory.adapters.SqliteMemoryAdapter`) applies everywhere. The top-level `praisonai.memory` package is a separate shim that forwards attribute reads, so patch top-level names on `praisonaiagents.memory` instead. See [alias\_package shim: lazy vs eager](https://praison.ai/docs/developers/wrapper.md#alias-package-shim-lazy-vs-eager).

## Related

> [card] [Wrapper Internals](https://praison.ai/docs/developers/wrapper.md)
>
> Four-tier package model and alias\_package shim details

> [card] [praisonai-bot Migration](https://praison.ai/docs/guides/praisonai-bot-migration.md)
>
> The equivalent compat page for bots, gateway, and daemon


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.