Spaces:
Runtime error
Runtime error
Upload 6 files
Browse files- .gitattributes +2 -0
- .vscode/launch.json +15 -0
- .vscode/mcp.json +18 -0
- assets/banner.png +3 -0
- assets/favicon.ico +3 -0
- config/model_config.json +58 -0
- tools/tool_definitions.py +25 -0
.gitattributes
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
assets/banner.png filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
assets/favicon.ico filter=lfs diff=lfs merge=lfs -text
|
.vscode/launch.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": "0.2.0",
|
| 3 |
+
"configurations": [
|
| 4 |
+
{
|
| 5 |
+
"name": "π Launch SmolAgent Studio",
|
| 6 |
+
"type": "python",
|
| 7 |
+
"request": "launch",
|
| 8 |
+
"program": "${workspaceFolder}/smolagent_studio_ide.py",
|
| 9 |
+
"console": "integratedTerminal"
|
| 10 |
+
}
|
| 11 |
+
]
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#π‘ This lets you press F5 or click "Run > Start Debugging" in VS Code to launch the app directly.
|
.vscode/mcp.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#.vscode/mcp.json
|
| 2 |
+
|
| 3 |
+
{
|
| 4 |
+
"servers": [
|
| 5 |
+
{
|
| 6 |
+
"name": "Glama Tools",
|
| 7 |
+
"url": "https://glama.ai/api/tools"
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"name": "Smithery MCP",
|
| 11 |
+
"url": "https://smithery.ai/mcp"
|
| 12 |
+
}
|
| 13 |
+
],
|
| 14 |
+
"auto_load": true
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
#π‘ This file registers MCP-compatible tool servers, so agents can auto-load external tools dynamically via ToolCollection.from_mcp() or compatible extensions.
|
assets/banner.png
ADDED
|
Git LFS Details
|
assets/favicon.ico
ADDED
|
|
Git LFS Details
|
config/model_config.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"models": [
|
| 3 |
+
{
|
| 4 |
+
"name": "Hugging Face API",
|
| 5 |
+
"provider": "huggingface",
|
| 6 |
+
"description": "Use hosted models via HF token (e.g. distilbert, flan-t5)."
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"name": "Transformers (local)",
|
| 10 |
+
"provider": "transformers",
|
| 11 |
+
"description": "Run local models using transformers pipeline."
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"name": "LiteLLM",
|
| 15 |
+
"provider": "litellm",
|
| 16 |
+
"description": "Connect to 100+ LLMs with unified API routing."
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"name": "OpenAI",
|
| 20 |
+
"provider": "openai",
|
| 21 |
+
"description": "Connect to OpenAI's ChatGPT and GPT-4."
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"name": "Anthropic",
|
| 25 |
+
"provider": "anthropic",
|
| 26 |
+
"description": "Access Claude models via Anthropic token."
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
"name": "Ollama",
|
| 30 |
+
"provider": "ollama",
|
| 31 |
+
"description": "Serve local models like llama2 and phi-2 via Ollama server."
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"name": "Together.ai",
|
| 35 |
+
"provider": "together",
|
| 36 |
+
"description": "Use hosted open source models via Together.ai."
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"name": "OpenRouter",
|
| 40 |
+
"provider": "openrouter",
|
| 41 |
+
"description": "Router for multiple LLM providers under one token."
|
| 42 |
+
}
|
| 43 |
+
],
|
| 44 |
+
"agents": [
|
| 45 |
+
{
|
| 46 |
+
"name": "CodeAgent",
|
| 47 |
+
"description": "Executes Python code generated by the model."
|
| 48 |
+
},
|
| 49 |
+
{
|
| 50 |
+
"name": "ToolCallingAgent",
|
| 51 |
+
"description": "Uses structured tool calls to query external functions."
|
| 52 |
+
},
|
| 53 |
+
{
|
| 54 |
+
"name": "ManagedAgent",
|
| 55 |
+
"description": "Controls multiple agents or tool groups hierarchically."
|
| 56 |
+
}
|
| 57 |
+
]
|
| 58 |
+
}
|
tools/tool_definitions.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#tools/tool_definitions.py
|
| 2 |
+
|
| 3 |
+
TOOL_TIPS = {
|
| 4 |
+
"WebSearchTool": "π Search the web using DuckDuckGo, Brave, or SerpAPI.",
|
| 5 |
+
"VisitWebpageTool": "π Fetch and convert a webpage into readable markdown.",
|
| 6 |
+
"PythonTool": "π Execute Python code securely in a sandboxed environment.",
|
| 7 |
+
"PythonInterpreterTool": "π§ͺ A stateful Python interpreter with retained execution context.",
|
| 8 |
+
"TerminalTool": "π» Run shell commands. Use with caution.",
|
| 9 |
+
"FileTool": "ποΈ Read, write, and manipulate local files for your agent.",
|
| 10 |
+
"ImageTool": "πΌοΈ Handle image input/output β caption, generate, or analyze.",
|
| 11 |
+
"FinalAnswerTool": "β
Marks the final agent response to stop processing.",
|
| 12 |
+
"UserInputTool": "π€ Allows dynamic user prompts mid-task.",
|
| 13 |
+
"LangChainTool": "π Wrap LangChain tools like SerpAPI, SQL Toolkit, Wolfram Alpha.",
|
| 14 |
+
"HFModelDownloadsTool": "π Fetch most downloaded HF models for a given task.",
|
| 15 |
+
"ApiWebSearchTool": "π°οΈ Search APIs like Bing or Google for fresh results.",
|
| 16 |
+
"Tool.from_hub()": "π¦ Load external tools from Hugging Face Hub repos.",
|
| 17 |
+
"Tool.from_space()": "π§ͺ Import Gradio Spaces as tools.",
|
| 18 |
+
"Tool.from_mcp()": "π§ Load tools dynamically from registered MCP servers.",
|
| 19 |
+
"Tool.from_langchain()": "𧬠Convert LangChain tool definitions into SmolAgent-compatible formats.",
|
| 20 |
+
"Tool.from_gradio()": "ποΈ Wrap Gradio interfaces as callable tools.",
|
| 21 |
+
"ToolCollection.from_mcp()": "π Fetch and register toolsets from Glama, Smithery, and other MCP providers."
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
β
This file gives you tooltip metadata for dynamic dropdowns, tool help panels, and config-driven rendering. You can link this file to model_config.json, or expand to include categories, icons, or flags like streaming=True.
|