https://github.com/mstryoda/llm-agents-example
An example repository to use HuggingFace smolagents, Phidata and CrewAI frameworks with local LLMs
https://github.com/mstryoda/llm-agents-example
agents ai crewai huggingface llm phidata smolagents
Last synced: 3 months ago
JSON representation
An example repository to use HuggingFace smolagents, Phidata and CrewAI frameworks with local LLMs
- Host: GitHub
- URL: https://github.com/mstryoda/llm-agents-example
- Owner: mstrYoda
- Created: 2025-01-03T21:13:55.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-01-05T12:07:27.000Z (9 months ago)
- Last Synced: 2025-07-03T13:00:05.053Z (3 months ago)
- Topics: agents, ai, crewai, huggingface, llm, phidata, smolagents
- Language: Python
- Homepage:
- Size: 312 KB
- Stars: 38
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Agent Frameworks
## Smolagents
It is straightforward to get into. Easy write an agent. Small feature set.
No memory or retriever support currently.## Phidata
More comprehensive than Smolagents, has built-in tool set. It is easy to write RAG applications with built-in RAG tools and retrievers.
## CrewAI
Complex, requires more setup step. Achieves the result but it takes more time to built what you want to do.

# Running Code Examples
Note: Do not forget to fill api key for your gemini or custom llm apis.
## Installing Ollama Models
```
ollama install llama3
ollama install qwen2.5-coder
ollama install openhermes
```## Creating Conda Environment
```
conda create -n agents python=3.10
conda activate agentspip install smolagents
pip install -U phidata
pip install crewai crewai-toolspip install pypdf
```
## RAG Requirements
```
pip install ollama
pip install pgvector
pip install pypdf
pip install psycopg2
conda install -c conda-forge psycopg
```### Running PG Database
```
docker run -d \
-e POSTGRES_DB=ai \
-e POSTGRES_USER=ai \
-e POSTGRES_PASSWORD=ai \
-e PGDATA=/var/lib/postgresql/data/pgdata \
-v pgvolume:/var/lib/postgresql/data \
-p 5532:5432 \
--name pgvector \
phidata/pgvector:16
```# Run Example Agents
```
cd smolagents
python3 main.pycd phidata
python3 main.pycd crewai
crewai run
```