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

# Wikipedia KnowledgeBase

## Example

<Note>
  Install `wikipedia` if needed using [this guide](/how-to/install)
</Note>

```python knowledge_base.py theme={null}
from phi.knowledge.wikipedia import WikipediaKnowledgeBase
from phi.vectordb.pgvector import PgVector

from resources import vector_db

knowledge_base = WikipediaKnowledgeBase(
    topics=["Manchester United", "Real Madrid"],
    # Table name: ai.wikipedia_documents
    vector_db=PgVector(
        table_name="wikipedia_documents",
        db_url=vector_db.get_db_connection_local(),
    ),
)
```

## WikipediaKnowledgeBase Params

| Parameter | Type        | Default | Description    |
| --------- | ----------- | ------- | -------------- |
| `topics`  | `List[str]` | \[]     | Topics to read |

## AgentKnowledge Params

`WikipediaKnowledgeBase` is a subclass of the `AgentKnowledge` class and has access to the same params

<Snippet file="kb-base-reference.mdx" />
