A comprehensive framework for building agents with Small Language Models
Project description
๐ฐ News & Updates
| Date | Update | |
|---|---|---|
| ๐ง | 3 Feb 2026 | v0.0.2 Released: vLLM backend fixes with automatic chat template support, GPU memory control, improved OOM error handling, and multi-model family compatibility |
| ๐ | 2 Feb 2026 | Preprint available: EffGen: Enabling Small Language Models as Capable Autonomous Agents |
| ๐ | 31 Jan 2026 | Initial release of effGen framework (v0.0.1) |
๐ค What is effGen?
effGen transforms Small Language Models into powerful AI agents. While most frameworks require massive LLMs, effGen is optimized from the ground up for efficient, smaller models โ delivering fast, capable agents without the compute overhead.
from effgen import Agent, load_model
from effgen.core.agent import AgentConfig
from effgen.tools.builtin import Calculator, PythonREPL
# Load a small but mighty model
model = load_model("Qwen/Qwen2.5-1.5B-Instruct", quantization="4bit")
# Create agent with tools
config = AgentConfig(
name="math_agent",
model=model,
tools=[Calculator(), PythonREPL()]
)
agent = Agent(config=config)
# Run computation
result = agent.run("What is 24344 * 334?")
print(f"Answer: {result.output}")
โก Installation
๐ฆ From PyPI (Recommended)
pip install effgen
๐ With vLLM for Faster Inference
pip install effgen[vllm]
๐ง From Source
git clone https://github.com/ctrl-gaurav/effGen.git
cd effGen
# Quick install
./install.sh
# Full install (includes vLLM + dev tools)
./install.sh --full
# Manual install
pip install -e .
๐ Quick Start
๐ป CLI Usage
# Run a task
effgen run "What is the capital of France?"
# Interactive chat
effgen chat
# Start API server
effgen serve --port 8000
# Interactive wizard
effgen
๐ Python API
from effgen import Agent, load_model
from effgen.core.agent import AgentConfig
from effgen.tools.builtin import Calculator
# Load model
model = load_model("Qwen/Qwen2.5-1.5B-Instruct", quantization="4bit")
# Configure agent
config = AgentConfig(
name="calculator_agent",
model=model,
tools=[Calculator()],
system_prompt="You are a helpful math assistant."
)
# Create and run
agent = Agent(config=config)
result = agent.run("Calculate 15% tip on $85.50")
print(result.output)
โจ Features
|
๐ง |
๐ |
๐ง |
๐งฉ |
๐ฅ |
๐พ |
๐ |
๐ ๏ธ Built-in Tools
|
๐ข |
๐ |
๐ป |
๐ |
๐ |
๐ |
๐ฏ |
๐ Examples
python examples/basic_agent.py # Basic agent (Transformers backend)
python examples/basic_agent_vllm.py # Basic agent (vLLM backend - 5-10x faster)
python examples/web_agent.py # Web search agent
python examples/retrieval_agent.py # RAG-based retrieval
python examples/agentic_search_agent.py # Grep-based agentic search
๐ More Examples
Multi-Tool Agent
from effgen import Agent, load_model
from effgen.core.agent import AgentConfig
from effgen.tools.builtin import Calculator, WebSearch, PythonREPL
model = load_model("Qwen/Qwen2.5-3B-Instruct")
config = AgentConfig(
name="research_agent",
model=model,
tools=[Calculator(), WebSearch(), PythonREPL()],
system_prompt="You are a research assistant."
)
agent = Agent(config=config)
result = agent.run("Search for the population of Tokyo and calculate what percentage it is of Japan's total population")
Retrieval Agent
from effgen import Agent, load_model
from effgen.core.agent import AgentConfig
from effgen.tools.builtin import Retrieval
model = load_model("Qwen/Qwen2.5-1.5B-Instruct")
retrieval_tool = Retrieval(knowledge_base_path="./docs")
config = AgentConfig(
name="qa_agent",
model=model,
tools=[retrieval_tool]
)
agent = Agent(config=config)
result = agent.run("What does the documentation say about configuration?")
๐ Security
|
๐ณ |
๐ก๏ธ |
โก |
๐ For security policies and vulnerability reporting, see SECURITY.md
๐ Citation
If you use effGen in your research, please cite our paper:
@software{srivastava2026effgen,
title={effGen: Enabling Small Language Models as Capable Autonomous Agents},
author={Gaurav Srivastava and Aafiya Hussain and Chi Wang and Yingyan Celine Lin and Xuan Wang},
year={2026},
eprint={2602.00887},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2602.00887},
}
๐ Links
๐ License
MIT License โ see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file effgen-0.0.2.tar.gz.
File metadata
- Download URL: effgen-0.0.2.tar.gz
- Upload date:
- Size: 260.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa1fa66accb7c937b9254aed0214a7df87e70b4774191cb17d9ecc3b6465f44c
|
|
| MD5 |
6b47ce3c98a092cfe6487dd037a768ad
|
|
| BLAKE2b-256 |
831b8330b2681200dce6fecb13946e8db3b4f4ad6d19db846e780030945a5231
|
File details
Details for the file effgen-0.0.2-py3-none-any.whl.
File metadata
- Download URL: effgen-0.0.2-py3-none-any.whl
- Upload date:
- Size: 301.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9fb36230d2cbbbb520b01c53e5301861e24bd8123f8ccf0d64a53ba847e83df
|
|
| MD5 |
5e8e8d61910f7baa1a8ac4de936e64fc
|
|
| BLAKE2b-256 |
7c947ba20f3c66bd238b195997d1e00b8531f6b7e3820efa3cc20e58823557dd
|