{"id":591,"date":"2025-01-11T15:25:02","date_gmt":"2025-01-11T15:25:02","guid":{"rendered":"https:\/\/smolagents.org\/?post_type=docs&#038;p=591"},"modified":"2025-01-11T15:41:26","modified_gmt":"2025-01-11T15:41:26","password":"","slug":"tools-of-smolagents-in-depth-guide","status":"publish","type":"docs","link":"https:\/\/smolagents.org\/ru\/docs\/tools-of-smolagents-in-depth-guide\/","title":{"rendered":"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u0421\u043c\u043e\u043b\u0430\u0433\u0435\u043d\u0442\u0430"},"content":{"rendered":"<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u043e\u0432\u0438\u0447\u043e\u043a \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0430\u0433\u0435\u043d\u0442\u043e\u0432, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435\u00a0<a href=\"https:\/\/huggingface.co\/docs\/smolagents\/conceptual_guides\/intro_agents\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">\u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 \u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438<\/a>\u00a0\u0438\u00a0<a href=\"https:\/\/huggingface.co\/docs\/smolagents\/guided_tour\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">\u044d\u043a\u0441\u043a\u0443\u0440\u0441\u0438\u044f \u043f\u043e smolagents<\/a>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/huggingface.co\/docs\/smolagents\/tutorials\/tools#tools\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/huggingface.co\/docs\/smolagents\/tutorials\/tools#what-is-a-tool-and-how-to-build-one\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0438 \u043a\u0430\u043a \u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c?<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/huggingface.co\/docs\/smolagents\/tutorials\/tools#share-your-tool-to-the-hub\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0441\u0432\u043e\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0441 \u0445\u0430\u0431\u043e\u043c<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/huggingface.co\/docs\/smolagents\/tutorials\/tools#import-a-space-as-a-tool\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">\u0418\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/huggingface.co\/docs\/smolagents\/tutorials\/tools#use-langchain-tools\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b LangChain<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/huggingface.co\/docs\/smolagents\/tutorials\/tools#manage-your-agents-toolbox\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c \u0432\u0430\u0448\u0435\u0433\u043e \u0430\u0433\u0435\u043d\u0442\u0430<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/huggingface.co\/docs\/smolagents\/tutorials\/tools#use-a-collection-of-tools\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/huggingface.co\/docs\/smolagents\/tutorials\/tools#what-is-a-tool-and-how-to-build-one\" target=\"_blank\" rel=\"noopener\"><\/a>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0438 \u043a\u0430\u043a \u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c?<\/h3>\n\n\n\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 - \u044d\u0442\u043e \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e LLM \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0430\u0433\u0435\u043d\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n\n\n\n<p>\u041d\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e, LLM \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c API: \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u0442\u0438\u043f\u044b \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u043e\u0432, \u0442\u0438\u043f \u0432\u044b\u0445\u043e\u0434\u0430.<\/p>\n\n\n\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439. \u042d\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043a\u043b\u0430\u0441\u0441.<\/p>\n\n\n\n<p>\u0418\u0442\u0430\u043a, \u043f\u043e \u0441\u0443\u0442\u0438, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 - \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0438\u043c\u0438 LLM \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n\n\n\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442:<\/p>\n\n\n\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u0438\u0437 smolagents import Tool\n\nclass HFModelDownloadsTool(Tool):\n    name = \"model_download_counter\"\n    description = \"\"\"\n    \u042d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043d\u0430 Hugging Face Hub.\n    \u041e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438.\"\"\"\n    inputs = {\n        \"task\": {\n            \"type\": \"string\",\n            \"description\": \"\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430, \u043e\u0446\u0435\u043d\u043a\u0430 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0438 \u0442. \u0434.)\",\n        }\n    }\n    output_type = \"string\"\n\n    def forward(self, task: str):\n        from huggingface_hub import list_models\n\n        model = next(iter(list_models(filter=task, sort=\"downloads\", direction=-1)))\n        return model.id\n\nmodel_downloads_tool = HFModelDownloadsTool()<\/pre>\n\n\n\n<p>\u041f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432\u00a0<a href=\"https:\/\/huggingface.co\/docs\/smolagents\/v1.2.2\/en\/reference\/tools#smolagents.Tool\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442<\/a>\u00a0\u0447\u0442\u043e\u0431\u044b \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b. \u0414\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u00a0<code>\u0438\u043c\u044f<\/code>, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043c\u0435\u043d\u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430. \u0418\u043c\u044f \u043e\u0431\u044b\u0447\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u043e\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438, \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0433\u043e\u00a0<code>\u043c\u043e\u0434\u0435\u043b\u044c_\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438_\u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430<\/code>.<\/li>\n\n\n\n<li>\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u00a0<code>\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/code>\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0430\u0433\u0435\u043d\u0442\u0430.<\/li>\n\n\n\n<li>An\u00a0<code>\u0432\u0445\u043e\u0434\u044b<\/code>\u00a0\u0430\u0442\u0440\u0438\u0431\u0443\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u043a\u043b\u044e\u0447\u0430\u043c\u0438\u00a0<code>\"\u0442\u0438\u043f\"<\/code>\u00a0\u0438\u00a0<code>\"\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\"<\/code>. \u041e\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0443 Python \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u043f\u0440\u0438 \u0432\u0432\u043e\u0434\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n\n\n\n<li>An\u00a0<code>\u0442\u0438\u043f \u0432\u044b\u0432\u043e\u0434\u0430<\/code>\u00a0\u0430\u0442\u0440\u0438\u0431\u0443\u0442, \u0437\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0442\u0438\u043f \u0432\u044b\u0432\u043e\u0434\u0430. \u0422\u0438\u043f\u044b \u0434\u043b\u044f \u043e\u0431\u043e\u0438\u0445\u00a0<code>\u0432\u0445\u043e\u0434\u044b<\/code>\u00a0\u0438\u00a0<code>\u0442\u0438\u043f \u0432\u044b\u0432\u043e\u0434\u0430<\/code>\u00a0\u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c\u00a0<a href=\"https:\/\/docs.pydantic.dev\/latest\/concepts\/json_schema\/#generating-json-schema\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">\u041f\u0438\u0434\u0430\u043d\u0442\u0438\u0447\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b<\/a>\u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u044b\u043c\u0438 \u0438\u0437 \u044d\u0442\u0438\u0445:\u00a0<code>~AUTHORIZED_TYPES()<\/code>.<\/li>\n\n\n\n<li>A\u00a0<code>\u0432\u043f\u0435\u0440\u0435\u0434<\/code>\u00a0\u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u0434 \u0432\u044b\u0432\u043e\u0434\u0430, \u043f\u043e\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e.<\/li>\n<\/ul>\n\n\n\n<p>\u0418 \u044d\u0442\u043e \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0430\u0433\u0435\u043d\u0442\u0435!<\/p>\n\n\n\n<p>\u0415\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430. \u0412\u00a0<a href=\"https:\/\/huggingface.co\/docs\/smolagents\/guided_tour\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">\u044d\u043a\u0441\u043a\u0443\u0440\u0441\u0438\u044f_tour<\/a>\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439\u00a0<code>@tool<\/code>\u00a0\u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440. \u0421\u0430\u0439\u0442\u00a0<a href=\"https:\/\/huggingface.co\/docs\/smolagents\/v1.2.2\/en\/reference\/tools#smolagents.tool\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">tool()<\/a>\u00a0\u0414\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440 - \u044d\u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0435: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u044f\u0441\u043d\u043e\u0441\u0442\u0438 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n\n\n\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0441\u043e\u0437\u0434\u0430\u0432 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u00a0<a href=\"https:\/\/huggingface.co\/docs\/smolagents\/v1.2.2\/en\/reference\/tools#smolagents.Tool\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442<\/a>\u00a0\u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u044b\u0448\u0435.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/huggingface.co\/docs\/smolagents\/tutorials\/tools#share-your-tool-to-the-hub\" target=\"_blank\" rel=\"noopener\"><\/a>\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0441\u0432\u043e\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0441 \u0445\u0430\u0431\u043e\u043c<\/h3>\n\n\n\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0432 \u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0430\u0442\u043e\u0440, \u0432\u044b\u0437\u0432\u0430\u0432\u00a0<a href=\"https:\/\/huggingface.co\/docs\/smolagents\/v1.2.2\/en\/reference\/tools#smolagents.Tool.push_to_hub\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">push_to_hub()<\/a>\u00a0\u043d\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0435. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 \u0445\u0430\u0431\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0442\u043e\u043a\u0435\u043d \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f.<\/p>\n\n\n\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">model_downloads_tool.push_to_hub(\"{your_username}\/hf-model-downloads\", token=\"\")<\/pre>\n\n\n\n<p>\u0427\u0442\u043e\u0431\u044b push to Hub \u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u0432\u0430\u0448 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0412\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043b\u0438\u0431\u043e \u0438\u0437 \u0438\u0445 args.<\/li>\n\n\n\n<li>\u0412 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u043f\u0443\u043d\u043a\u0442\u043e\u043c,\u00a0<strong>\u0432\u0441\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430<\/strong>\u0438\u043d\u0430\u0447\u0435 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0432\u044b\u0437\u0432\u0430\u0442\u044c\u00a0<a href=\"https:\/\/huggingface.co\/docs\/smolagents\/v1.2.2\/en\/reference\/tools#smolagents.Tool.save\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">\u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c()<\/a>\u00a0\u0438\u043b\u0438\u00a0<a href=\"https:\/\/huggingface.co\/docs\/smolagents\/v1.2.2\/en\/reference\/tools#smolagents.Tool.push_to_hub\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">push_to_hub()<\/a>\u00a0\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430.<\/li>\n\n\n\n<li>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442\u0435\u00a0<code>__init__<\/code>\u00a0\u043c\u0435\u0442\u043e\u0434, \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430\u0442\u044c \u0435\u043c\u0443 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u043a\u0440\u043e\u043c\u0435\u00a0<code>\u0441\u0435\u0431\u044f<\/code>. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u0441\u043b\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u0445 \u0432 \u0445\u0430\u0431. \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0438\u0434\u0435\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u044b \u0443\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0436\u0435\u0441\u0442\u043a\u043e \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c (\u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0434\u0430\u0439\u0442\u0435\u00a0<code>your_variable=(...)<\/code>\u00a0\u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u00a0<code>\u043a\u043b\u0430\u0441\u0441 YourTool(Tool):<\/code>\u00a0\u0441\u0442\u0440\u043e\u043a\u0430). \u0418, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432\u044b \u0432\u0441\u0435 \u0435\u0449\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 \u0432 \u043b\u044e\u0431\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430, \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0432 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0432\u00a0<code>self.your_variable<\/code>.<\/li>\n<\/ul>\n\n\n\n<p>\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0448 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d \u0432 Hub, \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0435\u0433\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c.\u00a0<a href=\"https:\/\/huggingface.co\/spaces\/m-ric\/hf-model-downloads\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">\u0417\u0434\u0435\u0441\u044c<\/a>\u00a0\u044d\u0442\u043e\u00a0<code>model_downloads_tool<\/code>\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b. \u0423 \u043d\u0435\u0433\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 gradio.<\/p>\n\n\n\n<p>\u041f\u043e\u0433\u0440\u0443\u0437\u0438\u0432\u0448\u0438\u0441\u044c \u0432 \u0444\u0430\u0439\u043b\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0434\u00a0<a href=\"https:\/\/huggingface.co\/spaces\/m-ric\/hf-model-downloads\/blob\/main\/tool.py\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">tool.py<\/a>. \u0417\u0434\u0435\u0441\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u043a\u0442\u043e-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439.<\/p>\n\n\n\n<p>\u0417\u0430\u0442\u0435\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<a href=\"https:\/\/huggingface.co\/docs\/smolagents\/v1.2.2\/en\/reference\/tools#smolagents.load_tool\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">load_tool()<\/a>\u00a0\u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<a href=\"https:\/\/huggingface.co\/docs\/smolagents\/v1.2.2\/en\/reference\/tools#smolagents.Tool.from_hub\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">from_hub()<\/a>\u00a0\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0439\u0442\u0435 \u0435\u0433\u043e \u0432\u00a0<code>\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/code>\u00a0\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 \u0432\u0430\u0448\u0435\u043c \u0430\u0433\u0435\u043d\u0442\u0435. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0437\u0430\u043f\u0443\u0441\u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0434\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c\u00a0<code>trust_remote_code=True<\/code>\u00a0\u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0438\u0437 \u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0430\u0442\u043e\u0440\u0430.<\/p>\n\n\n\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u0438\u0437 smolagents import load_tool, CodeAgent\n\nmodel_download_tool = load_tool(\n    \"{\u0432\u0430\u0448\u0435_\u0438\u043c\u044f_\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f}\/hf-model-downloads\",\n    trust_remote_code=True\n)<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/huggingface.co\/docs\/smolagents\/tutorials\/tools#import-a-space-as-a-tool\" target=\"_blank\" rel=\"noopener\"><\/a>\u0418\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430<\/h3>\n\n\n\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u0437 \u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f\u00a0<a href=\"https:\/\/huggingface.co\/docs\/smolagents\/v1.2.2\/en\/reference\/tools#smolagents.Tool.from_space\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Tool.from_space()<\/a>\u00a0\u043c\u0435\u0442\u043e\u0434!<\/p>\n\n\n\n<p>\u0412\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u043d\u0430 \u0445\u0430\u0431\u0435, \u0435\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0430\u0433\u0435\u043d\u0442\u0443 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f\u00a0<a href=\"https:\/\/pypi.org\/project\/gradio-client\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"><code>gradio-client<\/code><\/a>\u00a0\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 Space.<\/p>\n\n\n\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u00a0<a href=\"https:\/\/huggingface.co\/black-forest-labs\/FLUX.1-dev\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">FLUX.1-dev<\/a>\u00a0Space \u0438\u0437 \u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0435\u0433\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n\n\n\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">image_generation_tool = Tool.from_space(\n    \"black-forest-labs\/FLUX.1-schnell\",\n    name=\"image_generator\",\n    description=\"\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u0437 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438\"\n)\n\nimage_generation_tool(\"\u0421\u043e\u043b\u043d\u0435\u0447\u043d\u044b\u0439 \u043f\u043b\u044f\u0436\")<\/pre>\n\n\n\n<p>\u0418 \u0432\u0443\u0430\u043b\u044f, \u0432\u043e\u0442 \u0432\u0430\u0448\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435! \ud83c\udfd6\ufe0f<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/smolagents.org\/wp-content\/uploads\/2025\/01\/sunny_beach.webp\" alt=\"\" class=\"wp-image-593\" style=\"width:1176px;height:auto\" srcset=\"https:\/\/smolagents.org\/wp-content\/uploads\/2025\/01\/sunny_beach.webp 1024w, https:\/\/smolagents.org\/wp-content\/uploads\/2025\/01\/sunny_beach-300x300.webp 300w, https:\/\/smolagents.org\/wp-content\/uploads\/2025\/01\/sunny_beach-150x150.webp 150w, https:\/\/smolagents.org\/wp-content\/uploads\/2025\/01\/sunny_beach-768x768.webp 768w, https:\/\/smolagents.org\/wp-content\/uploads\/2025\/01\/sunny_beach-12x12.webp 12w, https:\/\/smolagents.org\/wp-content\/uploads\/2025\/01\/sunny_beach-360x360.webp 360w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u0417\u0430\u0442\u0435\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u043b\u0443\u0447\u0448\u0438\u043c \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443&nbsp;<code>\u043a\u0440\u043e\u043b\u0438\u043a \u0432 \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0441\u043a\u0430\u0444\u0430\u043d\u0434\u0440\u0435<\/code>&nbsp;\u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0435\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n\n\n\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u0438\u0437 smolagents import CodeAgent, HfApiModel\n\nmodel = HfApiModel(\"Qwen\/Qwen2.5-Coder-32B-Instruct\")\n\u0430\u0433\u0435\u043d\u0442 = CodeAgent(tools=[image_generation_tool], model=model)\n\nagent.run(\n    \"\u0423\u043b\u0443\u0447\u0448\u0438\u0442\u0435 \u044d\u0442\u0443 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443, \u0437\u0430\u0442\u0435\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.\", prompt='\u041a\u0440\u043e\u043b\u0438\u043a \u0432 \u0441\u043a\u0430\u0444\u0430\u043d\u0434\u0440\u0435'\n)<\/pre>\n\n\n\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">=== \u041c\u044b\u0441\u043b\u0438 \u0430\u0433\u0435\u043d\u0442\u0430:\nimproved_prompt \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \"\u042f\u0440\u043a\u043e-\u0441\u0438\u043d\u0438\u0439 \u043a\u0440\u043e\u043b\u0438\u043a \u0432 \u0441\u043a\u0430\u0444\u0430\u043d\u0434\u0440\u0435, \u043d\u0430 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u041b\u0443\u043d\u044b, \u043f\u043e\u0434 \u044f\u0440\u043a\u043e-\u043e\u0440\u0430\u043d\u0436\u0435\u0432\u044b\u043c \u0437\u0430\u043a\u0430\u0442\u043e\u043c, \u0441 \u0417\u0435\u043c\u043b\u0435\u0439, \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043d\u0430 \u0437\u0430\u0434\u043d\u0435\u043c \u043f\u043b\u0430\u043d\u0435\".\n\n\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u044f \u0443\u043b\u0443\u0447\u0448\u0438\u043b \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443, \u044f \u043c\u043e\u0433\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438.\n&gt;&gt;&gt; \u0410\u0433\u0435\u043d\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u043a\u043e\u0434:\nimage = image_generator(prompt=\"\u042f\u0440\u043a\u043e-\u0433\u043e\u043b\u0443\u0431\u043e\u0439 \u043a\u0440\u043e\u043b\u0438\u043a \u0432 \u0441\u043a\u0430\u0444\u0430\u043d\u0434\u0440\u0435 \u043d\u0430 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u041b\u0443\u043d\u044b, \u043f\u043e\u0434 \u044f\u0440\u043a\u043e-\u043e\u0440\u0430\u043d\u0436\u0435\u0432\u044b\u043c \u0437\u0430\u043a\u0430\u0442\u043e\u043c, \u043d\u0430 \u0444\u043e\u043d\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0438\u0434\u043d\u0430 \u0417\u0435\u043c\u043b\u044f\")\nfinal_answer(image)<\/pre>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/smolagents.org\/wp-content\/uploads\/2025\/01\/rabbit_spacesuit_flux.webp\" alt=\"\" class=\"wp-image-592\" style=\"width:1178px;height:auto\" srcset=\"https:\/\/smolagents.org\/wp-content\/uploads\/2025\/01\/rabbit_spacesuit_flux.webp 1024w, https:\/\/smolagents.org\/wp-content\/uploads\/2025\/01\/rabbit_spacesuit_flux-300x300.webp 300w, https:\/\/smolagents.org\/wp-content\/uploads\/2025\/01\/rabbit_spacesuit_flux-150x150.webp 150w, https:\/\/smolagents.org\/wp-content\/uploads\/2025\/01\/rabbit_spacesuit_flux-768x768.webp 768w, https:\/\/smolagents.org\/wp-content\/uploads\/2025\/01\/rabbit_spacesuit_flux-12x12.webp 12w, https:\/\/smolagents.org\/wp-content\/uploads\/2025\/01\/rabbit_spacesuit_flux-360x360.webp 360w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u041a\u0430\u043a \u044d\u0442\u043e \u043a\u0440\u0443\u0442\u043e? \ud83e\udd29<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/huggingface.co\/docs\/smolagents\/tutorials\/tools#use-langchain-tools\" target=\"_blank\" rel=\"noopener\"><\/a>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b LangChain<\/h3>\n\n\n\n<p>\u041c\u044b \u043b\u044e\u0431\u0438\u043c Langchain \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0438\u0437 LangChain, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435&nbsp;<code>from_langchain()<\/code>&nbsp;\u043c\u0435\u0442\u043e\u0434.<\/p>\n\n\n\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0438\u043d\u0442\u0440\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0432\u0435\u0431-\u043f\u043e\u0438\u0441\u043a\u0430 LangChain. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f&nbsp;<code>pip install langchain google-search-results -q<\/code>&nbsp;\u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n\n\n\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u0438\u0437 langchain.agents import load_tools\n\nsearch_tool = Tool.from_langchain(load_tools([\"serpapi\"])[0])\n\n\u0430\u0433\u0435\u043d\u0442 = CodeAgent(tools=[search_tool], model=model)\n\nagent.run(\"\u041d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u043b\u043e\u043a\u043e\u0432 (\u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u043c\u044b\u0445 \u043a\u0430\u043a \u0441\u043b\u043e\u0438) \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u043a\u043e\u0434\u0435\u0440\u0435 BERT \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043a\u043e\u0434\u0435\u0440\u043e\u043c \u0441 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 Attention is All You Need?\")<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/huggingface.co\/docs\/smolagents\/tutorials\/tools#manage-your-agents-toolbox\" target=\"_blank\" rel=\"noopener\"><\/a>\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c \u0432\u0430\u0448\u0435\u0433\u043e \u0430\u0433\u0435\u043d\u0442\u0430<\/h3>\n\n\n\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0430\u0433\u0435\u043d\u0442\u0430, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0438\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0432 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0435&nbsp;<code>\u0430\u0433\u0435\u043d\u0442.\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/code>\u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c.<\/p>\n\n\n\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c&nbsp;<code>\u043c\u043e\u0434\u0435\u043b\u044c_\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438_\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430<\/code>&nbsp;\u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 \u0430\u0433\u0435\u043d\u0442\u0443, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n\n\n\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u0438\u0437 smolagents import HfApiModel\n\n\u043c\u043e\u0434\u0435\u043b\u044c = HfApiModel(\"Qwen\/Qwen2.5-Coder-32B-Instruct\")\n\nagent = CodeAgent(tools=[], model=model, add_base_tools=True)\nagent.tools[model_download_tool.name] = model_download_tool<\/pre>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442:<\/p>\n\n\n\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">agent.run(\n    \"\u041c\u043e\u0436\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b \u0434\u0430\u0442\u044c \u043c\u043d\u0435 \u0438\u043c\u044f \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043c\u0435\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u0432 \u0437\u0430\u0434\u0430\u043d\u0438\u0438 \"\u0442\u0435\u043a\u0441\u0442 \u0432 \u0432\u0438\u0434\u0435\u043e\" \u043d\u0430 Hugging Face Hub, \u043d\u043e \u043c\u0435\u043d\u044f\u0435\u0442 \u043c\u0435\u0441\u0442\u0430\u043c\u0438 \u0431\u0443\u043a\u0432\u044b?\"\n)<\/pre>\n\n\n\n<p>\u0421\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a \u0430\u0433\u0435\u043d\u0442\u0443: \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u043b\u0430\u0431\u044b\u0435 LLM-\u0434\u0432\u0438\u0436\u043a\u0438.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/huggingface.co\/docs\/smolagents\/tutorials\/tools#use-a-collection-of-tools\" target=\"_blank\" rel=\"noopener\"><\/a>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/h3>\n\n\n\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0431\u044a\u0435\u043a\u0442 ToolCollection \u0441 \u043c\u0435\u0442\u043a\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0417\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0439\u0442\u0435 \u0438\u0445 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u0433\u0435\u043d\u0442\u0430 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0439\u0442\u0435 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c!<\/p>\n\n\n\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u0438\u0437 smolagents import ToolCollection, CodeAgent\n\nimage_tool_collection = ToolCollection(\n    collection_slug=\"huggingface-tools\/diffusion-tools-6630bb19a942c2306a2cdb6f\",\n    token=\"\"\n)\nagent = CodeAgent(tools=[*image_tool_collection.tools], model=model, add_base_tools=True)\n\nagent.run(\"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043d\u0430\u0440\u0438\u0441\u0443\u0439\u0442\u0435 \u043c\u043d\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0441 \u0440\u0435\u043a\u0430\u043c\u0438 \u0438 \u043e\u0437\u0435\u0440\u0430\u043c\u0438\").<\/pre>\n\n\n\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0438\u0445 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0430\u0433\u0435\u043d\u0442.<\/p>","protected":false},"excerpt":{"rendered":"<p>Here, we\u2019re going to see advanced tool usage. If you\u2019re new to building agents, make sure to first read the\u00a0intro to agents\u00a0and the\u00a0guided tour of smolagents. What is a tool, and how to build one? A tool is mostly a function that an LLM can use in an agentic system. But to use it, the&#8230;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"doc_category":[8],"doc_tag":[],"class_list":["post-591","docs","type-docs","status-publish","hentry","doc_category-tutorials"],"year_month":"2026-04","word_count":1431,"total_views":"5909","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"smolagents","author_nicename":"wd-gstargmail-com","author_url":"https:\/\/smolagents.org\/ru\/author\/wd-gstargmail-com\/"},"doc_category_info":[{"term_name":"Tutorials","term_url":"https:\/\/smolagents.org\/ru\/docs-category\/tutorials\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/smolagents.org\/ru\/wp-json\/wp\/v2\/docs\/591","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/smolagents.org\/ru\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/smolagents.org\/ru\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/smolagents.org\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smolagents.org\/ru\/wp-json\/wp\/v2\/comments?post=591"}],"version-history":[{"count":1,"href":"https:\/\/smolagents.org\/ru\/wp-json\/wp\/v2\/docs\/591\/revisions"}],"predecessor-version":[{"id":594,"href":"https:\/\/smolagents.org\/ru\/wp-json\/wp\/v2\/docs\/591\/revisions\/594"}],"wp:attachment":[{"href":"https:\/\/smolagents.org\/ru\/wp-json\/wp\/v2\/media?parent=591"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/smolagents.org\/ru\/wp-json\/wp\/v2\/doc_category?post=591"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/smolagents.org\/ru\/wp-json\/wp\/v2\/doc_tag?post=591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}