Skip to content

Commit c48826b

Browse files
Merge branch 'main' into claude/issue-987-20250718-1031
2 parents f239d5c + 8ca24e9 commit c48826b

39 files changed

+1293
-39
lines changed

examples/python/custom_tools/example_latency_tracking.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,11 @@ def example_mcp_tracking():
130130
)
131131
plan = agent.chat("Plan: Search for Python documentation")
132132

133-
# Track tool usage
133+
# Track tool usage (this will now have actual timing)
134134
with tracker.track("tool_usage", request_id):
135-
# Simulate tool execution
135+
# Simulate tool execution with realistic timing
136+
import time
137+
time.sleep(0.1) # Simulate some work
136138
tool_result = "Found 5 relevant documentation pages"
137139

138140
# Track LLM generation
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from praisonaiagents import Agent
2+
3+
agent = Agent(
4+
instructions="You are a creative designer AI agent. "
5+
"Help users with graphic design concepts, branding strategies, "
6+
"visual communication, and creative problem-solving. Provide guidance "
7+
"on design principles, color theory, typography, and user experience.",
8+
llm="anthropic/claude-3-5-sonnet-20241022"
9+
)
10+
11+
response = agent.start("Hello! I'm your creative designer assistant. "
12+
"How can I help you with your design projects today?")
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from praisonaiagents import Agent
2+
3+
agent = Agent(
4+
instructions="You are an educational tutor AI agent. "
5+
"Help students learn various subjects, explain complex concepts, "
6+
"provide step-by-step solutions, and create personalized learning "
7+
"materials for different educational levels.",
8+
llm="anthropic/claude-3-5-sonnet-20241022"
9+
)
10+
11+
response = agent.start("Hello! I'm your educational tutor assistant. "
12+
"How can I help you learn today?")
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from praisonaiagents import Agent
2+
3+
agent = Agent(
4+
instructions="You are a financial advisor AI agent. "
5+
"Help users understand financial concepts, analyze investment opportunities, "
6+
"and provide guidance on personal finance, budgeting, and financial planning. "
7+
"Note: This is for educational purposes only, not financial advice.",
8+
llm="anthropic/claude-3-5-sonnet-20241022"
9+
)
10+
11+
response = agent.start("Hello! I'm your financial advisor assistant. "
12+
"How can I help you understand financial concepts today?")
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from praisonaiagents import Agent
2+
3+
agent = Agent(
4+
instructions="You are a legal advisor AI agent. "
5+
"Help users understand legal concepts, review contracts, "
6+
"analyze legal documents, and provide guidance on compliance "
7+
"and regulatory requirements. Note: This is for educational purposes only.",
8+
llm="anthropic/claude-3-5-sonnet-20241022"
9+
)
10+
11+
response = agent.start("Hello! I'm your legal advisor assistant. "
12+
"How can I help you understand legal concepts today?")
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from praisonaiagents import Agent
2+
3+
agent = Agent(
4+
instructions="You are a medical research AI agent. "
5+
"Help users understand medical concepts, analyze research papers, "
6+
"and provide insights on healthcare trends and developments. "
7+
"Note: This is for educational purposes only, not medical advice.",
8+
llm="anthropic/claude-3-5-sonnet-20241022"
9+
)
10+
11+
response = agent.start("Hello! I'm your medical research assistant. "
12+
"How can I help you understand medical concepts today?")
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from praisonaiagents import Agent
2+
3+
agent = Agent(
4+
instructions="You are a cybersecurity AI agent. "
5+
"Help users understand security concepts, analyze security threats, "
6+
"and provide guidance on security best practices, risk assessment, "
7+
"and security architecture design.",
8+
llm="openai/gpt-4o"
9+
)
10+
11+
response = agent.start("Hello! I'm your cybersecurity assistant. "
12+
"How can I help you with security concepts today?")
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from praisonaiagents import Agent
2+
3+
agent = Agent(
4+
instructions="You are a data engineer AI agent. "
5+
"Help users design data pipelines, optimize database performance, "
6+
"create ETL processes, and provide guidance on data architecture, "
7+
"data modeling, and big data technologies.",
8+
llm="openai/gpt-4o"
9+
)
10+
11+
response = agent.start("Hello! I'm your data engineer assistant. "
12+
"How can I help you with your data engineering projects today?")
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from praisonaiagents import Agent
2+
3+
agent = Agent(
4+
instructions="You are a marketing strategist AI agent. "
5+
"Help users develop marketing strategies, analyze market trends, "
6+
"create campaign plans, and provide guidance on digital marketing, "
7+
"brand positioning, and customer acquisition strategies.",
8+
llm="openai/gpt-4o"
9+
)
10+
11+
response = agent.start("Hello! I'm your marketing strategist assistant. "
12+
"How can I help you with your marketing strategy today?")
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from praisonaiagents import Agent
2+
3+
agent = Agent(
4+
instructions="You are a product manager AI agent. "
5+
"Help users with product strategy, feature prioritization, "
6+
"user research analysis, and product roadmap planning. Provide "
7+
"guidance on market analysis, competitive positioning, and user experience.",
8+
llm="openai/gpt-4o"
9+
)
10+
11+
response = agent.start("Hello! I'm your product manager assistant. "
12+
"How can I help you with your product strategy today?")

0 commit comments

Comments
 (0)