A comprehensive framework for building agents with Small Language Models
Project description
๐ฐ News & Updates
| Date | Update | |
|---|---|---|
| ๐ | 9 Apr 2026 | v0.2.0 Released: Major release โ native tool calling, guardrails, multi-agent orchestration, RAG pipeline, 31 tools, eval framework, production API server, MLX Apple Silicon support, Python & TypeScript SDKs. See changelog |
| ๐ | 8 Apr 2026 | MLX & Apple Silicon support merged (PR #4): Native Metal GPU acceleration via MLX & MLX-VLM backends. pip install effgen[mlx] |
| ๐ง | 25 Mar 2026 | v0.1.3 Released: Verification hardening โ smarter loop detection, "skip the tool" prompting, model-aware token counting, sub-agent depth limits, circuit breaker persistence. See changelog |
| ๐ง | 12 Mar 2026 | v0.1.2 Released: Test-driven hardening โ 10 example agents, 19 bug fixes, cross-model compatibility matrix (11 models, 73% pass rate). See changelog |
| ๐ | 6 Mar 2026 | v0.1.1 Released: Stabilization โ fixed license/metadata consistency, improved error handling, added 6 examples, expanded test suite. See changelog |
| ๐ | 1 Mar 2026 | v0.1.0 Released: Major feature release โ 14 built-in tools, agent presets, plugin system, real streaming, memory integration, ACP/MCP protocols, CI/CD, and comprehensive test suite. See changelog |
| ๐ง | 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
Requires Python 3.10 or newer. Tested on Python 3.10, 3.11, 3.12, 3.13.
๐ฆ From PyPI (Recommended)
pip install effgen
๐ Apple Silicon (MLX)
pip install effgen[mlx] # Text models on Apple Silicon
pip install effgen[mlx-vlm] # Vision-Language models on Apple Silicon
๐ With vLLM for Faster Inference
pip install effgen[vllm]
๐ Optional Extras
pip install effgen[rag] # RAG pipeline (sentence-transformers, faiss-cpu)
pip install effgen[finance] # Finance tools (yfinance)
pip install effgen[data] # Data science tools (matplotlib, plotly)
pip install effgen[eval] # Evaluation (rouge-score, nltk)
pip install effgen[gguf] # GGUF model support (llama-cpp-python)
๐ง 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
|
๐ง |
๐ |
๐ก๏ธ |
๐ |
๐ฅ |
๐ง |
๐ญ |
๐ฏ Agent Presets
Get started instantly with ready-to-use agent configurations:
from effgen import load_model
from effgen.presets import create_agent
model = load_model("Qwen/Qwen2.5-3B-Instruct", quantization="4bit")
# One-line agent creation
math_agent = create_agent("math", model) # Calculator + PythonREPL
research_agent = create_agent("research", model) # WebSearch + URLFetch + Wikipedia
coding_agent = create_agent("coding", model) # CodeExecutor + PythonREPL + FileOps + Bash
general_agent = create_agent("general", model) # All 11 tools
minimal_agent = create_agent("minimal", model) # Direct inference, no tools
# CLI preset support
effgen run --preset math "What is sqrt(144)?"
effgen run --preset research "Tell me about quantum computing"
๐ ๏ธ Built-in Tools (31)
|
๐ข |
๐ |
๐ป |
๐ |
๐ |
๐ |
๐ฏ |
|
๐ฅ๏ธ |
๐ค๏ธ |
๐ |
๐ |
๐ |
๐ |
๐ |
๐ Examples
python examples/basic/basic_agent.py # Basic agent (Transformers backend)
python examples/basic/basic_agent_vllm.py # Basic agent (vLLM backend - 5-10x faster)
python examples/web_retrieval/web_agent.py # Web search agent
python examples/web_retrieval/retrieval_agent.py # RAG-based retrieval
python examples/web_retrieval/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")
Streaming
from effgen import Agent, load_model
from effgen.core.agent import AgentConfig
from effgen.tools.builtin import Calculator
model = load_model("Qwen/Qwen2.5-3B-Instruct", quantization="4bit")
agent = Agent(config=AgentConfig(
name="stream_demo", model=model,
tools=[Calculator()], enable_streaming=True
))
for token in agent.stream("What is 2 + 2?"):
print(token, end="", flush=True)
Memory (Multi-Turn)
agent = Agent(config=AgentConfig(
name="memory_demo", model=model,
tools=[], enable_memory=True
))
agent.run("My name is Alice and I'm working on quantum computing.")
result = agent.run("What's my name and what am I working on?")
# โ "Your name is Alice and you're working on quantum computing."
Retrieval Agent (RAG)
from effgen.tools.builtin import Retrieval
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
Apache License 2.0 โ 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.2.0.tar.gz.
File metadata
- Download URL: effgen-0.2.0.tar.gz
- Upload date:
- Size: 559.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57e22f661d06d316d5d85bfa0e1383a2a29f335d06fd1850800d5ea24792ef7f
|
|
| MD5 |
1ac0ab1cefdffc7b2acfe18a82b7a53d
|
|
| BLAKE2b-256 |
cf18974c5b509439818cad10b46f756af6507d8233517cf30509b4596222a79f
|
File details
Details for the file effgen-0.2.0-py3-none-any.whl.
File metadata
- Download URL: effgen-0.2.0-py3-none-any.whl
- Upload date:
- Size: 660.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed8fccdfa7c6804b71882cad195dff582329783594425654a37d6bfb0d184279
|
|
| MD5 |
24a26a35db2a6df576e9fed35f18c7fc
|
|
| BLAKE2b-256 |
ffd0a291e1eb4725c0bcc12072749335ef71910a4224419d479b97eeee0bc73b
|