Skip to content

Commit 608286a

Browse files
committed
Increment version to 0.0.82 in pyproject.toml and uv.lock, and enhance agent launch functionality in agents.py to support both HTTP and MCP protocols, including improved endpoint management, healthcheck capabilities, and error handling for agent execution.
1 parent c7eae10 commit 608286a

7 files changed

Lines changed: 682 additions & 355 deletions

File tree

src/praisonai-agents/mcp-sse.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from praisonaiagents import Agent, MCP
2+
3+
qa_agent = Agent(
4+
instructions="""You are a Question Answering Agent.""",
5+
llm="openai/gpt-4o-mini",
6+
tools=MCP("http://localhost:8080/agents/sse")
7+
)
8+
9+
qa_agent.start("AI in 2025")

src/praisonai-agents/praisonaiagents/agent/agent.py

Lines changed: 301 additions & 160 deletions
Large diffs are not rendered by default.

src/praisonai-agents/praisonaiagents/agents/agents.py

Lines changed: 347 additions & 193 deletions
Large diffs are not rendered by default.

src/praisonai-agents/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "praisonaiagents"
7-
version = "0.0.81"
7+
version = "0.0.82"
88
description = "Praison AI agents for completing complex tasks with Self Reflection Agents"
99
authors = [
1010
{ name="Mervin Praison" }
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from praisonaiagents import Agent, Agents
2+
from duckduckgo_search import DDGS
3+
4+
def internet_search_tool(query: str):
5+
results = []
6+
ddgs = DDGS()
7+
for result in ddgs.text(keywords=query, max_results=5):
8+
results.append({
9+
"title": result.get("title", ""),
10+
"url": result.get("href", ""),
11+
"snippet": result.get("body", "")
12+
})
13+
return results
14+
15+
agent = Agent(name="SearchAgent", instructions="You Search the internet for information", tools=[internet_search_tool])
16+
agent2 = Agent(name="SummariseAgent", instructions="You Summarise the information")
17+
18+
agents = Agents(name="MultiAgents", agents=[agent, agent2])
19+
agents.launch(port=8080, protocol="mcp")
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from praisonaiagents import Agent
2+
3+
agent = Agent(name="TweetAgent", instructions="Create a Tweet based on the topic provided")
4+
agent.launch(port=8080, protocol="mcp")

src/praisonai-agents/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)