# Quick Start

## Core Database

```python
from aifastdb import AiFastDb

with AiFastDb("./my_db") as db:
    db.remember("doc1", "Hello world", tags=["greeting"])
    doc = db.get("doc1")
    results = db.recall(query="hello")
    db.forget("doc1")
```

## Social Graph

```python
from aifastdb import SocialGraphV2

with SocialGraphV2("./social") as sg:
    alice = sg.add_person({"name": "Alice"})
    bob = sg.add_person({"name": "Bob"})
    sg.add_friend(alice["id"], bob["id"])

    friends = sg.get_friends(alice["id"])
    path = sg.find_path(alice["id"], bob["id"])
```

## Document Store

```python
from aifastdb import DocumentStore

with DocumentStore("./docs.jsonl") as store:
    store.put("n1", "Meeting notes", tags=["work"])
    docs = store.find_by_tag("work")
```

## Embedding

```python
from aifastdb import EmbeddingEngine

engine = EmbeddingEngine()
vec = engine.embed("Hello world")            # list[float]
arr = engine.embed_numpy("Hello world")      # numpy.ndarray
sim = EmbeddingEngine.cosine_similarity(vec, vec)  # 1.0
```

## pandas Integration

```python
from aifastdb import SocialGraphV2
from aifastdb.pandas_ext import to_dataframe

with SocialGraphV2("./social") as sg:
    df = to_dataframe(sg.list_persons())
    print(df[["id", "name"]])
```
