git: 51a1d989f0f2 - main - misc/py-smolagents: New port: Lightweight library for building agents that think in code
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 12 Jul 2026 16:54:28 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=51a1d989f0f2c0fdc0fb5598507828ad5535dd88
commit 51a1d989f0f2c0fdc0fb5598507828ad5535dd88
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-07-11 03:20:25 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-07-12 16:54:24 +0000
misc/py-smolagents: New port: Lightweight library for building agents that think in code
---
misc/Makefile | 1 +
misc/py-smolagents/Makefile | 48 ++++++++++++++++++++++++++++++++++++++++++++
misc/py-smolagents/distinfo | 3 +++
misc/py-smolagents/pkg-descr | 4 ++++
4 files changed, 56 insertions(+)
diff --git a/misc/Makefile b/misc/Makefile
index 326b1c4c88e8..694de5be6de3 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -648,6 +648,7 @@
SUBDIR += py-sigopt
SUBDIR += py-skops
SUBDIR += py-smdebug-rulesconfig
+ SUBDIR += py-smolagents
SUBDIR += py-snakemake-interface-common
SUBDIR += py-snakemake-interface-executor-plugins
SUBDIR += py-snakemake-interface-logger-plugins
diff --git a/misc/py-smolagents/Makefile b/misc/py-smolagents/Makefile
new file mode 100644
index 000000000000..ec8f80c4e575
--- /dev/null
+++ b/misc/py-smolagents/Makefile
@@ -0,0 +1,48 @@
+PORTNAME= smolagents
+PORTVERSION= 1.26.0
+CATEGORIES= misc python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Lightweight library for building agents that think in code
+WWW= https://huggingface.co/docs/smolagents \
+ https://github.com/huggingface/smolagents
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}huggingface-hub>=0.31.2:misc/py-huggingface-hub@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}Jinja2>=3.1.4:devel/py-Jinja2@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pillow>=10.0.1:graphics/py-pillow@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}python-dotenv>0:www/py-python-dotenv@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}requests>=2.32.3:www/py-requests@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}rich>=13.9.4:textproc/py-rich@${PY_FLAVOR}
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ipython>=8.31.0:devel/ipython@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}numpy>=1.21.2:math/py-numpy@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pandas>=2.2.3:math/py-pandas@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist concurrent pep517 pytest
+
+TEST_ENV= PYTHONPATH=${WRKSRC}/src
+TEST_ARGS= --deselect tests/test_local_python_executor.py::TestEvaluatePythonCode::test_can_import_scipy_if_explicitly_authorized \
+ --deselect tests/test_local_python_executor.py::TestEvaluatePythonCode::test_can_import_sklearn_if_explicitly_authorized \
+ --deselect tests/test_monitoring.py::MonitoringTester::test_streaming_agent_text_output \
+ --deselect tests/test_monitoring.py::MonitoringTester::test_streaming_agent_image_output \
+ --deselect tests/test_monitoring.py::MonitoringTester::test_streaming_with_agent_error \
+ tests/test_function_type_hints_utils.py \
+ tests/test_local_python_executor.py \
+ tests/test_memory.py \
+ tests/test_monitoring.py \
+ tests/test_serialization.py \
+ tests/test_tool_validation.py \
+ tests/test_utils.py
+
+NO_ARCH= yes
+
+# tests as of 1.26.0: 556 passed, 2 skipped, 5 deselected, 3 warnings in 17.38s
+
+.include <bsd.port.mk>
diff --git a/misc/py-smolagents/distinfo b/misc/py-smolagents/distinfo
new file mode 100644
index 000000000000..b7fee4c20c9c
--- /dev/null
+++ b/misc/py-smolagents/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1783738802
+SHA256 (smolagents-1.26.0.tar.gz) = 4ec92313265f9cfbcabfc88e192b4bc4505f8475dc5f33dc872062fc567037bd
+SIZE (smolagents-1.26.0.tar.gz) = 239034
diff --git a/misc/py-smolagents/pkg-descr b/misc/py-smolagents/pkg-descr
new file mode 100644
index 000000000000..0f1e5c172c42
--- /dev/null
+++ b/misc/py-smolagents/pkg-descr
@@ -0,0 +1,4 @@
+smolagents is a lightweight library for building agents. Its flagship feature
+is the CodeAgent, an agent that writes Python snippets to call tools and
+orchestrate other agents. It supports multi-modal inputs, tool sharing via
+the Hugging Face Hub, and many LLM backends.