Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Sep 23, 2025

[examples] Add agno/competitor-analysis-agent via template

Summary

This PR converts the Agno competitor analysis agent to Agentuity format using the Python template structure. The agent provides comprehensive competitive intelligence by combining Firecrawl's web scraping and search capabilities with advanced reasoning tools.

Key Changes:

  • Created frameworks/agno/competitor-analysis-agent/ following Python template structure exactly
  • Wrapped original Agno agent (using FirecrawlTools + ReasoningTools + OpenAIChat) in Agentuity interface
  • Added required dependencies: agno==2.0.8, firecrawl-py==4.3.6
  • Implemented welcome() and async run() functions per template requirements
  • Updated configuration files: agentuity.yaml (removed project_id, updated names) and pyproject.toml
  • Created documentation: README.md with capabilities and usage instructions, .env.example with placeholder keys

The agent performs 5-step competitive analysis: research & discovery → competitor identification → website analysis → deep competitive analysis → strategic synthesis with SWOT analysis and recommendations.

Review & Testing Checklist for Human

⚠️ CRITICAL - This PR requires thorough testing as local verification could not be completed due to authentication timeout

  • Test agent startup: Run agentuity dev in the agent directory and verify it starts without import/dependency errors
  • Verify /welcome endpoint: Check that GET request to /welcome returns exact JSON format: { "welcome": string, "prompts": [{ "data": string, "contentType": "text/plain" }, ...] }
  • Test sample query: Submit a competitive analysis request (e.g., "Analyze OpenAI's competitors") and verify the agent produces structured analysis output
  • Check imports: Verify that AgentRequest, AgentResponse, AgentContext imports work correctly at runtime (LSP showed import warnings)
  • Validate dependencies: Confirm agno==2.0.8 and firecrawl-py==4.3.6 are compatible and install correctly

Notes

  • Authentication Issue: Local verification with agentuity dev failed due to authentication timeout, so the /welcome endpoint was never tested
  • Import Warnings: LSP reported "unknown import symbol" errors for agentuity types, though this may be a development environment issue
  • Template Compliance: Followed Python template structure exactly, preserving all original Agno functionality while wrapping in Agentuity interface
  • Requested by: Dhilan Fye (dfye@agentuity.com)
  • Link to Devin run: https://app.devin.ai/sessions/31070d28eb4641288e8d37885c96c712

Summary by CodeRabbit

  • New Features

    • Introduces a Competitor Analysis Agent for discovery, website crawling, deep competitive analysis, and strategic recommendations.
    • Supports optional integrations for enhanced reasoning and web data extraction, with clear error messaging and logging.
    • Provides a ready-to-run local server with authentication checks and automatic startup.
  • Documentation

    • Added README with capabilities, setup, usage, and examples.
    • Added agent development guidelines and API surfaces.
  • Chores

    • Added environment variable template and project configuration for development and deployment.

- Convert Agno competitor analysis agent to Agentuity format
- Implement welcome() and async run() functions following template pattern
- Add agno==2.0.8 and firecrawl-py==4.3.6 dependencies
- Update agentuity.yaml with proper configuration
- Create README.md with usage instructions and capabilities
- Add .env.example with placeholder values
- Preserve original Agno agent functionality with FirecrawlTools and ReasoningTools

Co-Authored-By: Dhilan Fye <dfye@agentuity.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 23, 2025

Walkthrough

Introduces a new Competitor Analysis Agent under frameworks/agno with configuration, packaging, documentation, a server bootstrap, and the agent implementation. Adds environment examples, Agentuity config, Python package scaffolding, and an async run handler integrating OpenAI and Firecrawl tools. Includes a basic main script and startup checks via server.py.

Changes

Cohort / File(s) Summary
Documentation
frameworks/agno/competitor-analysis-agent/AGENTS.md, frameworks/agno/competitor-analysis-agent/README.md
Adds agent development guidelines and a README describing capabilities, setup, and usage.
Environment & Config
frameworks/agno/competitor-analysis-agent/.env.example, frameworks/agno/competitor-analysis-agent/agentuity.yaml
Adds environment example with required/optional keys and an Agentuity project config defining dev/deploy commands, bundler, and agent entry.
Packaging & Dependencies
frameworks/agno/competitor-analysis-agent/pyproject.toml
Defines project metadata, Python version, and dependencies (agentuity, openai, agno, firecrawl-py).
Package Scaffolding
frameworks/agno/competitor-analysis-agent/agentuity_agents/__init__.py, frameworks/agno/competitor-analysis-agent/agentuity_agents/competitor_analysis_agent/__init__.py
Marks directories as Python packages; no logic.
Agent Implementation
frameworks/agno/competitor-analysis-agent/agentuity_agents/competitor_analysis_agent/agent.py
Adds AgnoAgent configured with OpenAIChat, FirecrawlTools, ReasoningTools; provides instructions, expected_output, welcome(), and async run(request, response, context) with logging and error handling.
Server Bootstrap
frameworks/agno/competitor-analysis-agent/server.py
Adds startup script performing env checks, logging setup, warnings, and calling agentuity.autostart().
CLI Entry
frameworks/agno/competitor-analysis-agent/main.py
Adds simple main() that prints a message with __main__ guard.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Server as server.py (Agentuity runtime)
  participant Agent as competitor_analysis_agent.run
  participant OpenAI as OpenAIChat (gpt-4o)
  participant Firecrawl as FirecrawlTools

  Note over Server: On start, validate env keys<br/>then autostart()

  User->>Server: HTTP request / agent invocation
  Server->>Agent: AgentRequest, AgentResponse, AgentContext
  Agent->>Agent: Parse input, log request
  alt Needs external data
    Agent->>Firecrawl: Crawl/Extract URLs
    Firecrawl-->>Agent: Content/metadata
  end
  Agent->>OpenAI: Model prompt with tools & instructions
  OpenAI-->>Agent: Completion / reasoning
  Agent-->>Server: Final structured response
  Server-->>User: HTTP response

  alt Error: Rate limit / network
    Agent-->>Server: User-friendly error message
    Server-->>User: Error response
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • rblalock
  • nnance
  • jhaynie

Poem

In burrows of code I sniff and pry,
A whiskered scout with a keen, bright eye.
I map the rivals, hop through the crawl,
Ask GPT, take notes, compare them all.
With keys in paw and logs alight—
The agent wakes. Let’s ship tonight! 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly describes the primary change—adding the agno/competitor-analysis-agent via the template in the examples repo—and aligns with the PR objectives and added files (agent code, config, docs, and .env.example); it is concise, specific, and free of vague terms or noise.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1758652679-agno-competitor-analysis-agent

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (9)
frameworks/agno/competitor-analysis-agent/README.md (1)

32-35: Add uv to prerequisites for consistency with install step.

Installation uses uv; list it explicitly under Prerequisites.

Apply this diff:

 - Python 3.10+
 - Agentuity CLI
 - Required API keys (automatically managed by Agentuity AI Gateway)
+ - uv (Python package/dependency manager)
frameworks/agno/competitor-analysis-agent/main.py (1)

1-6: Customize the console message to match this agent.

Minor polish for clarity when invoked directly.

Apply this diff:

 def main():
-    print("Hello from py-template!")
+    print("Hello from competitor-analysis-agent!")
frameworks/agno/competitor-analysis-agent/AGENTS.md (2)

95-99: Prefer warning over warn for logging method name.

Matches Python logging conventions; warn is deprecated in stdlib.

Apply this diff:

-- `context.logger.warn(message, *args, **kwargs)`: Logs a warning message
+- `context.logger.warning(message, *args, **kwargs)`: Logs a warning message

110-111: Avoid bare URL; make it a Markdown link.

Apply this diff:

-For complete documentation, visit: https://agentuity.dev/SDKs/python/api-reference
+For complete documentation, visit: [https://agentuity.dev/SDKs/python/api-reference](https://agentuity.dev/SDKs/python/api-reference)
frameworks/agno/competitor-analysis-agent/server.py (2)

11-18: Clarify error message and write to stderr.

Mention both keys checked; use stderr for errors.

Apply this diff:

-        print(
-            "\033[31m[ERROR] AGENTUITY_SDK_KEY is not set. This should have been set automatically by the Agentuity CLI or picked up from the .env file.\033[0m"
-        )
+        print(
+            "\033[31m[ERROR] Neither AGENTUITY_API_KEY nor AGENTUITY_SDK_KEY is set. These should be set by the Agentuity CLI or loaded from .env.\033[0m",
+            file=sys.stderr,
+        )
         if os.environ.get("_", "").endswith("uv") and os.path.exists(".env"):
-            print(
-                "\033[31m[ERROR] Re-run the command with `uv run --env-file .env server.py`\033[0m"
-            )
+            print(
+                "\033[31m[ERROR] Re-run the command with `uv run --env-file .env server.py`\033[0m",
+                file=sys.stderr,
+            )

20-27: Use yellow for warnings and write to stderr.

Distinguish warnings from errors and send to stderr.

Apply this diff:

-        print(
-            "\033[31m[WARN] You are running this agent outside of the Agentuity environment. Any automatic Agentuity features will be disabled.\033[0m"
-        )
-        print(
-            "\033[31m[WARN] Recommend running `agentuity dev` to run your project locally instead of `python script`.\033[0m"
-        )
+        print(
+            "\033[33m[WARN] You are running this agent outside of the Agentuity environment. Any automatic Agentuity features will be disabled.\033[0m",
+            file=sys.stderr,
+        )
+        print(
+            "\033[33m[WARN] Recommend running `agentuity dev` to run your project locally instead of `python script`.\033[0m",
+            file=sys.stderr,
+        )
frameworks/agno/competitor-analysis-agent/agentuity_agents/competitor_analysis_agent/agent.py (2)

9-11: Optional: allow model override via env

Make the model id configurable without code edits.

-from agno.models.openai import OpenAIChat
+from agno.models.openai import OpenAIChat
+import os
@@
-    model=OpenAIChat(id="gpt-4o"),
+    model=OpenAIChat(id=os.getenv("OPENAI_MODEL", "gpt-4o")),

112-113: Streaming flag without streaming handler

stream_intermediate_steps=True is set but intermediate steps aren’t surfaced. Either wire a streaming callback to the Agentuity response or disable to avoid unnecessary overhead.

-    stream_intermediate_steps=True,
+    # Enable when wiring a streaming callback
+    stream_intermediate_steps=False,
frameworks/agno/competitor-analysis-agent/.env.example (1)

1-9: Include cloud API key for completeness

Server accepts AGENTUITY_API_KEY or AGENTUITY_SDK_KEY; add the cloud key template to reduce setup confusion.

 # Agentuity SDK Key (required for local development)
 AGENTUITY_SDK_KEY=your_sdk_key_here
 
+# Agentuity Cloud API Key (if using Agentuity Cloud)
+# AGENTUITY_API_KEY=your_cloud_api_key_here
+
 # Optional: OpenAI API Key (if not using Agentuity AI Gateway)
 # OPENAI_API_KEY=your_openai_api_key_here
 
 # Optional: Firecrawl API Key (if not using Agentuity AI Gateway)  
 # FIRECRAWL_API_KEY=your_firecrawl_api_key_here
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 61337c0 and b596478.

⛔ Files ignored due to path filters (1)
  • frameworks/agno/competitor-analysis-agent/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • frameworks/agno/competitor-analysis-agent/.env.example (1 hunks)
  • frameworks/agno/competitor-analysis-agent/AGENTS.md (1 hunks)
  • frameworks/agno/competitor-analysis-agent/README.md (1 hunks)
  • frameworks/agno/competitor-analysis-agent/agentuity.yaml (1 hunks)
  • frameworks/agno/competitor-analysis-agent/agentuity_agents/__init__.py (1 hunks)
  • frameworks/agno/competitor-analysis-agent/agentuity_agents/competitor_analysis_agent/__init__.py (1 hunks)
  • frameworks/agno/competitor-analysis-agent/agentuity_agents/competitor_analysis_agent/agent.py (1 hunks)
  • frameworks/agno/competitor-analysis-agent/main.py (1 hunks)
  • frameworks/agno/competitor-analysis-agent/pyproject.toml (1 hunks)
  • frameworks/agno/competitor-analysis-agent/server.py (1 hunks)
🧰 Additional context used
🧠 Learnings (23)
📚 Learning: 2025-06-23T17:16:16.519Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/openai/from-oai/.cursor/rules/agentuity.mdc:0-0
Timestamp: 2025-06-23T17:16:16.519Z
Learning: The Agentuity configuration file (agentuity.yaml) is reserved for configuring the AI Agent project and should not be edited or suggested for edits during code review.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity_agents/__init__.py
  • frameworks/agno/competitor-analysis-agent/agentuity.yaml
  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-06-23T17:16:33.550Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/pydantic/basic/.cursor/rules/agentuity.mdc:0-0
Timestamp: 2025-06-23T17:16:33.550Z
Learning: The agentuity.yaml file is a configuration file used by Agentuity to configure the AI Agent project and should not be edited or suggested for edits during code review.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity_agents/__init__.py
  • frameworks/agno/competitor-analysis-agent/agentuity.yaml
  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-06-23T17:15:30.804Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/miscellaneous/grokLiveSearch/.cursor/rules/agentuity.mdc:0-0
Timestamp: 2025-06-23T17:15:30.804Z
Learning: In the context of Agentuity AI projects, the 'agentuity.yaml' file is a configuration file that should not be edited or suggested for edits during code review.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity_agents/__init__.py
  • frameworks/agno/competitor-analysis-agent/agentuity.yaml
  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-06-23T17:13:52.368Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/crewai/socialagent/.cursor/rules/agentuity.mdc:0-0
Timestamp: 2025-06-23T17:13:52.368Z
Learning: The 'agentuity.yaml' file is a configuration file used by Agentuity to configure the AI Agent project and should not be edited or suggested for edits.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity_agents/__init__.py
  • frameworks/agno/competitor-analysis-agent/agentuity.yaml
  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-06-23T17:14:18.092Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/langchain/basic/.cursor/rules/agentuity.mdc:0-0
Timestamp: 2025-06-23T17:14:18.092Z
Learning: The file 'agentuity.yaml' is used to configure the Agentuity AI Agent project and should not be edited or suggested for edits.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity_agents/__init__.py
  • frameworks/agno/competitor-analysis-agent/agentuity.yaml
  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-06-23T17:17:12.992Z
Learnt from: CR
PR: agentuity/examples#0
File: patterns/llmAsJury/.cursor/rules/agentuity.mdc:0-0
Timestamp: 2025-06-23T17:17:12.992Z
Learning: In the context of Agentuity AI projects, the agentuity.yaml file is a configuration file that should not be edited or suggested for edits during code review.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity_agents/__init__.py
  • frameworks/agno/competitor-analysis-agent/agentuity.yaml
  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-07-17T13:41:01.314Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/agno/from_agno/.cursor/rules/agentuity.mdc:0-0
Timestamp: 2025-07-17T13:41:01.314Z
Learning: Applies to frameworks/agno/from_agno/**/agentuity.yaml : Do not suggest edits to the Agentuity AI Configuration file (agentuity.yaml)

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity_agents/__init__.py
  • frameworks/agno/competitor-analysis-agent/agentuity.yaml
  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-06-23T17:16:13.875Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/openai/from-oai/.cursor/rules/agent.mdc:0-0
Timestamp: 2025-06-23T17:16:13.875Z
Learning: In Agentuity AI Agent Python files (agents/**/*.py), the main entry point should be an async function named `run` that accepts parameters of types AgentRequest, AgentResponse, and AgentContext.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity_agents/competitor_analysis_agent/agent.py
  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-06-23T17:15:53.658Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/miscellaneous/mem0/mem0demo/.cursor/rules/sdk.mdc:0-0
Timestamp: 2025-06-23T17:15:53.658Z
Learning: In the Agentuity Python SDK, the main entry point for an agent is an async function named 'run' that takes three arguments: request (AgentRequest), response (AgentResponse), and context (AgentContext).

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity_agents/competitor_analysis_agent/agent.py
📚 Learning: 2025-06-23T17:16:43.214Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/pydantic/basic/.cursor/rules/sdk.mdc:0-0
Timestamp: 2025-06-23T17:16:43.214Z
Learning: In the Agentuity Python SDK, the main handler for an agent is an async function named 'run' that takes 'request', 'response', and 'context' as parameters.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity_agents/competitor_analysis_agent/agent.py
📚 Learning: 2025-06-23T17:14:03.437Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/crewai/socialagent/.cursor/rules/sdk.mdc:0-0
Timestamp: 2025-06-23T17:14:03.437Z
Learning: In the Agentuity Python SDK, the main agent handler should be an async function named 'run' that accepts 'request: AgentRequest', 'response: AgentResponse', and 'context: AgentContext' as arguments.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity_agents/competitor_analysis_agent/agent.py
  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-06-23T17:15:39.390Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/miscellaneous/grokLiveSearch/.cursor/rules/sdk.mdc:0-0
Timestamp: 2025-06-23T17:15:39.390Z
Learning: In the Agentuity Python SDK, the main agent handler should be an async function named 'run' that accepts 'request: AgentRequest', 'response: AgentResponse', and 'context: AgentContext' as parameters.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity_agents/competitor_analysis_agent/agent.py
  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-06-23T17:16:25.368Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/openai/from-oai/.cursor/rules/sdk.mdc:0-0
Timestamp: 2025-06-23T17:16:25.368Z
Learning: In the Agentuity Python SDK, the main handler function for an agent should be defined as an async function named 'run' with the signature: async def run(request: AgentRequest, response: AgentResponse, context: AgentContext) -> Any.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity_agents/competitor_analysis_agent/agent.py
  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-06-23T17:15:46.735Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/miscellaneous/mem0/mem0demo/.cursor/rules/agentuity.mdc:0-0
Timestamp: 2025-06-23T17:15:46.735Z
Learning: The Agentuity configuration file (agentuity.yaml) is used to configure the AI Agent project and should not be edited or suggested for edits.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity.yaml
  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-06-23T17:16:02.063Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/openai/from-oai-typescript/.cursor/rules/agentuity.mdc:0-0
Timestamp: 2025-06-23T17:16:02.063Z
Learning: The Agentuity AI Configuration file (agentuity.yaml) is used to configure the AI Agent project and should not be edited or suggested for edits.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity.yaml
  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-07-17T13:39:39.665Z
Learnt from: CR
PR: agentuity/examples#0
File: agents/composio/.cursor/rules/agentuity.mdc:0-0
Timestamp: 2025-07-17T13:39:39.665Z
Learning: Applies to agents/composio/**/agentuity.yaml : Do NOT suggest edits to the Agentuity AI Configuration file (agentuity.yaml)

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity.yaml
  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-07-17T13:39:58.483Z
Learnt from: CR
PR: agentuity/examples#0
File: agents/deep-research-js/.cursor/rules/agentuity.mdc:0-0
Timestamp: 2025-07-17T13:39:58.483Z
Learning: Applies to agents/deep-research-js/**/agentuity.yaml : Do not suggest edits to the agentuity.yaml configuration file

Applied to files:

  • frameworks/agno/competitor-analysis-agent/agentuity.yaml
📚 Learning: 2025-05-28T21:02:10.403Z
Learnt from: jhaynie
PR: agentuity/examples#12
File: frameworks/agno/from-agno/pyproject.toml:1-9
Timestamp: 2025-05-28T21:02:10.403Z
Learning: The `agentuity` Python SDK has versions 0.0.87 and higher available on PyPI, and dependency specifications like `agentuity>=0.0.87` in pyproject.toml files are valid and correct for projects using this SDK.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/pyproject.toml
📚 Learning: 2025-06-23T17:15:27.163Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/miscellaneous/grokLiveSearch/.cursor/rules/agent.mdc:0-0
Timestamp: 2025-06-23T17:15:27.163Z
Learning: When developing Agentuity AI Agents in Python, prefer importing types such as AgentRequest, AgentResponse, and AgentContext from the `agentuity` package to ensure compatibility and leverage built-in helper methods.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-06-23T17:16:13.875Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/openai/from-oai/.cursor/rules/agent.mdc:0-0
Timestamp: 2025-06-23T17:16:13.875Z
Learning: When writing Agentuity AI Agents in Python, always use type hints and adhere to Python best practices for code quality and maintainability.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-06-23T17:16:30.899Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/pydantic/basic/.cursor/rules/agent.mdc:0-0
Timestamp: 2025-06-23T17:16:30.899Z
Learning: When writing agent code in 'agents/**/*.py', prefer importing types such as AgentRequest, AgentResponse, and AgentContext from the 'agentuity' package to ensure compatibility and consistency.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-06-23T17:14:53.981Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/llamaindex/basic/.cursor/rules/agent.mdc:0-0
Timestamp: 2025-06-23T17:14:53.981Z
Learning: When writing Python AI Agent files for the Agentuity platform (in files matching agents/**/*.py), always define an async function named `run` as the entry point.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/AGENTS.md
📚 Learning: 2025-06-23T17:14:15.333Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/langchain/basic/.cursor/rules/agent.mdc:0-0
Timestamp: 2025-06-23T17:14:15.333Z
Learning: When writing Python AI Agent files for Agentuity in the 'agents/' directory, always define an async function named 'run' as the entry point.

Applied to files:

  • frameworks/agno/competitor-analysis-agent/AGENTS.md
🪛 Ruff (0.13.1)
frameworks/agno/competitor-analysis-agent/agentuity_agents/competitor_analysis_agent/agent.py

143-143: Do not catch blind exception: Exception

(BLE001)


144-144: Use logging.exception instead of logging.error

Replace with exception

(TRY400)

🪛 markdownlint-cli2 (0.18.1)
frameworks/agno/competitor-analysis-agent/README.md

53-53: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (6)
frameworks/agno/competitor-analysis-agent/agentuity_agents/__init__.py (1)

1-1: LGTM — package marker is fine.

frameworks/agno/competitor-analysis-agent/agentuity_agents/competitor_analysis_agent/__init__.py (1)

1-1: LGTM — package marker is fine.

frameworks/agno/competitor-analysis-agent/agentuity.yaml (1)

1-66: LGTM — config aligns with the new agent structure.

No changes suggested.

frameworks/agno/competitor-analysis-agent/pyproject.toml (1)

6-11: Fix pyproject.toml: do not pin to non‑existent PyPI versions

agno==2.0.8 and firecrawl-py==4.3.6 are not published on PyPI; update frameworks/agno/competitor-analysis-agent/pyproject.toml to use published releases (e.g., agno==1.7.6, firecrawl-py==4.3.5) or switch to >= constraints / a private index and update the PR.

⛔ Skipped due to learnings
Learnt from: jhaynie
PR: agentuity/examples#12
File: frameworks/agno/from-agno/pyproject.toml:1-9
Timestamp: 2025-05-28T21:02:10.403Z
Learning: The `agentuity` Python SDK has versions 0.0.87 and higher available on PyPI, and dependency specifications like `agentuity>=0.0.87` in pyproject.toml files are valid and correct for projects using this SDK.
Learnt from: jhaynie
PR: agentuity/examples#12
File: frameworks/agno/from-agno/pyproject.toml:1-9
Timestamp: 2025-05-28T21:02:10.403Z
Learning: The `agentuity` Python SDK has versions 0.0.87 and higher available on PyPI, and dependency specifications like `agentuity>=0.0.87` in pyproject.toml files are valid and correct for projects using this SDK.
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/agno/from_agno/.cursor/rules/sdk.mdc:0-0
Timestamp: 2025-07-17T13:41:16.151Z
Learning: Applies to frameworks/agno/from_agno/agents/**/*.py : Import types from `agentuity`
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/crewai/basic/.cursor/rules/sdk.mdc:0-0
Timestamp: 2025-07-17T13:41:34.015Z
Learning: Applies to frameworks/crewai/basic/agents/**/*.py : Import types from `agentuity`
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/llamaindex/basic/.cursor/rules/agent.mdc:0-0
Timestamp: 2025-06-23T17:14:53.981Z
Learning: For Agentuity AI Agents, import types such as AgentRequest, AgentResponse, and AgentContext from the `agentuity` package to ensure compatibility and access to helper methods.
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/agno/from_agno/.cursor/rules/agent.mdc:0-0
Timestamp: 2025-07-17T13:40:58.033Z
Learning: Applies to frameworks/agno/from_agno/agents/**/*.py : Prefer importing types from the `agentuity` package
frameworks/agno/competitor-analysis-agent/agentuity_agents/competitor_analysis_agent/agent.py (2)

115-132: Welcome payload format looks correct

Matches the required {welcome, prompts[]} structure with contentType "text/plain".

Please hit /welcome locally and confirm exact JSON shape (keys and casing).


9-25: No changes required — FirecrawlTools args and OpenAIChat(id="gpt-4o") are compatible with agno==2.0.8
frameworks/agno/competitor-analysis-agent/uv.lock pins agno 2.0.8 and firecrawl_py 4.3.6; Agno docs confirm FirecrawlTools supports search, crawl, mapping (map), formats (list), search_params and limit, and OpenAIChat accepts id="gpt-4o".

Comment on lines +1 to +3
from textwrap import dedent
import traceback
from agentuity import AgentRequest, AgentResponse, AgentContext
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Avoid blocking the event loop; use a thread for Agno run and improve exception logging

The synchronous competitor_analysis_agent.run() can block the async handler. Also, prefer logger.exception and don’t catch Exception alone without propagating cancellations. Remove traceback import.

Apply:

-from textwrap import dedent
-import traceback
+from textwrap import dedent
+import asyncio
-async def run(request: AgentRequest, response: AgentResponse, context: AgentContext):
-    try:
-        user_input = (await request.data.text()).strip()
-        context.logger.info(f"Received competitive analysis request: {user_input}")
-        
-        result = competitor_analysis_agent.run(user_input)
-        
-        return response.text(result)
-        
-    except Exception as e:
-        context.logger.error(f"Competitor Analysis Agent Error: {e}")
-        context.logger.debug(traceback.format_exc())
-        msg = str(e).lower()
-        if "rate limit" in msg:
-            return response.text("❌ API rate limit exceeded. Please try again later.")
-        if "network" in msg:
-            return response.text("❌ Network error. Please check your internet connection and try again later.")
-        return response.text("❌ Unexpected error during competitive analysis. Please try again later.")
+async def run(request: AgentRequest, response: AgentResponse, context: AgentContext):
+    try:
+        user_input = (await request.data.text()).strip()
+        if not user_input:
+            return response.text("Please provide a company or query to analyze.")
+        context.logger.info(f"Received competitive analysis request: {user_input}")
+        result = await asyncio.to_thread(competitor_analysis_agent.run, user_input)
+        return response.text(result)
+    except asyncio.CancelledError:
+        raise
+    except Exception as e:
+        context.logger.exception("Competitor Analysis Agent Error")
+        msg = str(e).lower()
+        if "rate limit" in msg:
+            return response.text("❌ API rate limit exceeded. Please try again later.")
+        if "network" in msg or "timeout" in msg:
+            return response.text("❌ Network/timeout error. Please try again later.")
+        return response.text("❌ Unexpected error during competitive analysis. Please try again later.")

Also applies to: 134-151

Comment on lines +51 to +55
## Ported From

This agent was ported from: https://docs.agno.com/examples/use-cases/agents/competitor_analysis_agent

The original Agno agent functionality is preserved while being wrapped in the Agentuity framework for seamless deployment and management.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick

Replace bare URL with a Markdown link (MD034).

Avoid bare URL to satisfy markdownlint and improve readability.

Apply this diff:

-This agent was ported from: https://docs.agno.com/examples/use-cases/agents/competitor_analysis_agent
+This agent was ported from: [Agno Competitor Analysis Agent](https://docs.agno.com/examples/use-cases/agents/competitor_analysis_agent)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## Ported From
This agent was ported from: https://docs.agno.com/examples/use-cases/agents/competitor_analysis_agent
The original Agno agent functionality is preserved while being wrapped in the Agentuity framework for seamless deployment and management.
## Ported From
This agent was ported from: [Agno Competitor Analysis Agent](https://docs.agno.com/examples/use-cases/agents/competitor_analysis_agent)
The original Agno agent functionality is preserved while being wrapped in the Agentuity framework for seamless deployment and management.
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

53-53: Bare URL used

(MD034, no-bare-urls)

🤖 Prompt for AI Agents
In frameworks/agno/competitor-analysis-agent/README.md around lines 51 to 55,
replace the bare URL with a Markdown link to satisfy MD034 and improve
readability: change the plain URL into link text with the URL in parentheses
(e.g., [source
link](https://docs.agno.com/examples/use-cases/agents/competitor_analysis_agent))
and update the sentence to use that link instead of the bare URL.

@dhilanfye34 dhilanfye34 closed this Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants