File size: 741 Bytes
8157183
 
 
 
 
 
 
 
 
 
 
 
2ea8556
 
 
8157183
 
 
 
 
 
 
 
 
21611df
8157183
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import json

__all__ = ['GetAgents']

class GetAgents():
    dependencies = []

    inputSchema = {
        "name": "GetAgents",
        "description": "Retrieves a list of available AI agents. This tool is used to get the list of available models that can be invoked using the AskAgent tool.",
        "parameters": {
            "type": "object",
            "properties": {},
            "required": [],
        },
    }

    def run(self, **kwargs):
        with open("./models/models.json", "r", encoding="utf8") as f:
            models = f.read()
        models = json.loads(models)
        return {
            "status": "success",
            "message": "Agents list retrieved successfully",
            "agents": models,
        }