davletovb /
neva
Neva is an open-source Python library for creating simulations where customizable AI agents interact using LLM, enabling the modeling of complex emergent behaviors. 👥🤖💬
Loading repository data…
melih-unsal / repository
🤖 Create LLM agents in a second with your prompts. Everything you need to create an LLM Agent - tools, prompts, frameworks, and models - all in one place.
DemoGPT AgentHub is a powerful library that allows you to create, customize, and use AI agents with various tools.
To use DemoGPT AgentHub, simply install the main package:
pip install demogpt
Creating custom tools is easy:
from demogpt_agenthub.tools import BaseTool
class MyCustomTool(BaseTool):
def __init__(self):
self.name = "MyCustomTool"
self.description = "This tool does something amazing!"
super().__init__()
def run(self, query):
# Implement your tool's functionality here
return f"Result for: {query}"
Example Usage:
my_tool = MyCustomTool()
agent = ToolCallingAgent(tools=[my_tool], llm=llm, verbose=True)
agent.run("Can you use my custom tool?")
Example Output:
Reasoning:
The user is asking to use the custom tool called MyCustomTool. This tool is described as doing "something amazing", so I will use it to process the query.
Tool call:
MyCustomTool
Tool result:
Result for: Can you use my custom tool?
Answer:
Yes, I successfully used your custom tool! The tool processed your query and returned the following result: "Result for: Can you use my custom tool?"
DemoGPT AgentHub comes with several built-in tools:
To create an agent:
from demogpt_agenthub.agents import ToolCallingAgent
from demogpt_agenthub.llms import OpenAIChatModel
from demogpt_agenthub.tools import TavilySearchTool, WeatherTool
search_tool = TavilySearchTool()
weather_tool = WeatherTool()
llm = OpenAIChatModel(model_name="gpt-4o-mini")
agent = ToolCallingAgent(tools=[search_tool, weather_tool], llm=llm, verbose=True)
Once you've created an agent, use it to ask questions or perform tasks:
query = "What's the weather like in New York today?"
response = agent.run(query)
print(response)
Example Output:
Removing existing vectorstore at rag_chroma
Decision:
False
Reasoning:
To find the weather in New York today, I first need to retrieve the current weather information. After obtaining the weather information, I can provide you with the current weather conditions. The RAG tool will help me find out the current weather in New York.
Tool call:
RAG
Tool args:
{'query': 'weather in New York today'}
Tool result:
In New York, the current weather is as follows:
Detailed status: clear sky
Wind speed: 2.57 m/s, direction: 240°
Humidity: 56%
Temperature:
- Current: 24.36°C
- High: 25.74°C
- Low: 22.05°C
- Feels like: 24.46°C
Rain: {}
Heat index: None
Cloud cover: 0%
Answer:
The current weather in New York is clear sky with a temperature of 24.36°C (feels like 24.46°C). The humidity is at 56% with a wind speed of 2.57 m/s from the direction of 240°. There is 0% cloud cover.
This example demonstrates how an agent can:
The agent will:
Here's an example of creating a custom power calculation tool:
from demogpt_agenthub.tools import BaseTool
class MyPowerTool(BaseTool):
def __init__(self):
self.name = "MyPowerTool"
self.description = "This tool is used to calculate the power of a number"
super().__init__()
def run(self, a: int, b: int):
# Implement your tool's functionality here
return a**b
power_tool = MyPowerTool()
agent = ToolCallingAgent(tools=[search_tool, weather_tool, power_tool], llm=llm, verbose=True)
agent.run("What is the 34 to the power of 26?")
Example Output:
Reasoning:
The task is to calculate a number raised to the power of another. The most appropriate tool for this calculation is MyPowerTool, which is specifically designed for power calculations.
Tool call:
MyPowerTool
Tool result:
6583424253569334549714045134721532297216
Answer:
34 to the power of 26 is 6583424253569334549714045134721532297216.
The ReactAgent provides a detailed reasoning process:
from demogpt_agenthub.tools import TavilySearchTool, WeatherTool, PythonTool
from demogpt_agenthub.llms import OpenAIChatModel
from demogpt_agenthub.agents import ReactAgent
search_tool = TavilySearchTool()
weather_tool = WeatherTool()
python_tool = PythonTool()
agent = ReactAgent(
tools=[search_tool, weather_tool, python_tool],
llm=OpenAIChatModel(model_name="gpt-4o-mini"),
verbose=True
)
query = "What is the weather's temperature's square root in the country where Cristiano Ronaldo is currently playing?"
print(agent.run(query))
Example Output:
Decision:
False
Reasoning:
First, I need to determine the current location where Christiano Ronaldo is playing in order to fetch the current temperature. Then I will use the OpenWeatherMap tool to get the temperature information. Finally, I will calculate the square root of the temperature using the Python Interpreter tool for precise computation.
Tool call:
duckduckgo_search
Tool args:
{'inp': 'Where is Christiano Ronaldo currently playing?'}
Tool result:
Ronaldo started Al Nassr's home match against Saudi Pro League leaders Al Ittihad on May 7. Stefano Pioli's men went into a 2-0 first-half lead but were beaten 3-2 when Houssem Aouar stuck in ... Cristiano Ronaldo and his Al Nassr team endured disappointment in 2023/24 as they failed to win the Saudi Pro League or the AFC Champions League. After Sadio Mane, Seko Fofana, Marcelo Brozovic ... Yes, Cristiano Ronaldo will be in the lineup to play tonight. Now that they once again failed to win the AFC Champions League Elite, Ronaldo will still have some optimism that they can win the league despite being eight points behind Al Ittihad. Despite the club's poor season, Ronaldo has maintained his goalscoring form, netting 23 goals in ... Cristiano Ronaldo currently plays for Al Nassr in the Saudi Pro League. The Portugal international transferred from Manchester United in December 2022 and inked a two-and-a-half-year contract with ... Is Cristiano Ronaldo playing Today? Cristiano Ronaldo is expected to start in today's crucial match. The Portuguese star remains Al Nassr's top scorer in the AFC Champions League, with six goals to his name. His outstanding form has played a pivotal role in the team's journey to the semifinals—now just one win away from reaching a continental final for the first time since 1995, when ...
Decision:
False
Reasoning:
I need to fetch the current temperature in Saudi Arabia where Cristiano Ronaldo is playing, using the OpenWeatherMap tool. After obtaining the temperature, I will compute its square root using the Python Interpreter tool.
Tool call:
open_weather_map
Tool args:
{'city': 'Riyadh,SA'}
Tool result:
In Riyadh,SA, the current weather is as follows:
Detailed status: clear sky
Wind speed: 5.44 m/s, direction: 150°
Humidity: 7%
Temperature:
Current: 39.16°C
High: 39.16°C
Low: 39.16°C
Feels like: 35.82°C
Rain: {}
Heat index: None
Cloud cover: 0%
Decision:
False
Reasoning:
I need to calculate the square root of the current temperature in Saudi Arabia, which is 39.16°C. I will use the Python Interpreter tool for precise calcul
Selected from shared topics, language and repository description—not editorial ratings.
davletovb /
Neva is an open-source Python library for creating simulations where customizable AI agents interact using LLM, enabling the modeling of complex emergent behaviors. 👥🤖💬
ArshiJ111 /
🤖 Transform ideas into videos with openOii, an AI-powered platform that uses collaboration among agents to create engaging comics and animated stories.
vivek7557 /
A collection of intelligent AI tools built with multiple LLMs — including: 🤖 Multi-Model Chatbot: dynamic assistant that switches between models for best responses. 📄 AI Marketing Brochure Generator: auto-creates engaging, on-brand marketing content. 💬 Normal Bot: lightweight conversational agent for quick interactions.