-
Notifications
You must be signed in to change notification settings - Fork 5
[examples] Add agno/competitor-analysis-agent via template #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[examples] Add agno/competitor-analysis-agent via template #60
Conversation
- 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 EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
WalkthroughIntroduces 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
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
Comment |
There was a problem hiding this 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: Preferwarningoverwarnfor logging method name.Matches Python logging conventions;
warnis 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 envMake 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=Trueis 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 completenessServer 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
⛔ Files ignored due to path filters (1)
frameworks/agno/competitor-analysis-agent/uv.lockis 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__.pyframeworks/agno/competitor-analysis-agent/agentuity.yamlframeworks/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__.pyframeworks/agno/competitor-analysis-agent/agentuity.yamlframeworks/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__.pyframeworks/agno/competitor-analysis-agent/agentuity.yamlframeworks/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__.pyframeworks/agno/competitor-analysis-agent/agentuity.yamlframeworks/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__.pyframeworks/agno/competitor-analysis-agent/agentuity.yamlframeworks/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__.pyframeworks/agno/competitor-analysis-agent/agentuity.yamlframeworks/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__.pyframeworks/agno/competitor-analysis-agent/agentuity.yamlframeworks/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.pyframeworks/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.pyframeworks/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.pyframeworks/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.pyframeworks/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.yamlframeworks/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.yamlframeworks/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.yamlframeworks/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 versionsagno==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` packageframeworks/agno/competitor-analysis-agent/agentuity_agents/competitor_analysis_agent/agent.py (2)
115-132: Welcome payload format looks correctMatches 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".
| from textwrap import dedent | ||
| import traceback | ||
| from agentuity import AgentRequest, AgentResponse, AgentContext |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
| ## 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. |
There was a problem hiding this comment.
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.
| ## 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.
[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:
frameworks/agno/competitor-analysis-agent/following Python template structure exactlyagno==2.0.8,firecrawl-py==4.3.6welcome()andasync run()functions per template requirementsagentuity.yaml(removed project_id, updated names) andpyproject.tomlREADME.mdwith capabilities and usage instructions,.env.examplewith placeholder keysThe 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
agentuity devin the agent directory and verify it starts without import/dependency errors/welcomeendpoint: Check that GET request to/welcomereturns exact JSON format:{ "welcome": string, "prompts": [{ "data": string, "contentType": "text/plain" }, ...] }AgentRequest,AgentResponse,AgentContextimports work correctly at runtime (LSP showed import warnings)agno==2.0.8andfirecrawl-py==4.3.6are compatible and install correctlyNotes
agentuity devfailed due to authentication timeout, so the/welcomeendpoint was never testedSummary by CodeRabbit
New Features
Documentation
Chores