-
Notifications
You must be signed in to change notification settings - Fork 5
Add Agno Finance Agent wrapper for Agentuity #42
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
Conversation
- Convert original Agno finance agent from https://docs.agno.com/examples/agents/finance-agent - Preserve ALL original Agno framework imports and functionality - Implement Agentuity wrapper following established patterns - Add comprehensive financial analysis with YFinanceTools - Include proper error handling and logging - Follow frameworks/agno directory structure conventions Features: - Real-time stock data with YFinanceTools integration - Professional financial analysis with market insights - Analyst recommendations and rating changes - Industry trends and competitive analysis - Risk disclosure and forward-looking analysis - Comprehensive error handling with context logging Structure: - finance_agent.py: Original Agno agent with all framework imports - agent.py: Agentuity wrapper with welcome() and run() functions - Complete project setup with dependencies and configuration 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:
|
WalkthroughAdds a new Agno Finance Agent packaged for Agentuity: agent implementation, project config, server bootstrap, packaging, docs, env/gitignore, and crash/config artifacts. Introduces an async Agentuity run handler that delegates to an Agno finance agent instance via an executor. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant HTTP as Agentuity Server
participant Agent as FinanceAgent.run
participant Exec as Thread Executor
participant Agno as agno.finance_agent
participant Tools as OpenAI/YFinance
User->>HTTP: POST prompt
HTTP->>Agent: invoke run(request,response,context)
Agent->>Agent: extract & log prompt
Agent->>Exec: run_in_executor(finance_agent.run(prompt))
Exec->>Agno: run(prompt)
Agno->>Tools: model & tool calls
Tools-->>Agno: results
Agno-->>Exec: reply (obj/str)
Exec-->>Agent: raw result
Agent->>Agent: normalize/validate output
alt success
Agent-->>HTTP: response.text(output)
HTTP-->>User: 200 OK (text)
else empty/error
Agent-->>HTTP: error/warning text
HTTP-->>User: 500/handled text
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 3
🧹 Nitpick comments (10)
frameworks/agno/finance-agent/.gitignore (2)
24-29: Consolidate .env ignores and keep the template trackedUse a wildcard to ignore all env variants while ensuring
.env.examplestays committed.# Environment variables .env -.env.local -.env.development -.env.production +.env.* +!.env.example
46-47: Ignore common local/virtual env and Python cachesPrevents accidental commits of local environments and per-tool caches.
# UV uv.lock + +# Virtualenvs and Python local artifacts +.venv/ +.python-version +__pypackages__/ +.pytest_cache/ +.mypy_cache/ +.ruff_cache/ +.coverageframeworks/agno/finance-agent/.env.example (1)
1-5: Add optional OpenAI config and a “do not commit secrets” noteHelps users on Azure/proxy setups and reinforces secret hygiene.
# OpenAI API Key for the Agno agent OPENAI_API_KEY=your_openai_api_key_here + +# Optional: Override base URL (e.g., Azure OpenAI or a proxy) +# OPENAI_BASE_URL=https://api.openai.com/v1 +# Optional: Organization ID +# OPENAI_ORG= # Optional: Set log level LOG_LEVEL=INFO + +# Security note: Never commit real API keys. .env* is ignored in .gitignore.frameworks/agno/finance-agent/pyproject.toml (2)
1-5: Include README in metadata for better packaging ergonomicsIf you ever publish, this ensures PyPI shows the project description.
[project] name = "agno-finance-agent" version = "0.1.0" description = "Agno Finance Agent wrapped for Agentuity" +readme = "README.md" requires-python = ">=3.10, <3.13"
6-11: Constrain agno and yfinance to tested releasesBased on the latest PyPI versions—agno 1.8.1 and yfinance 0.2.65—adding upper bounds will help avoid unintentional breakages when new major or minor versions are released.
• Update the ranges in frameworks/agno/finance-agent/pyproject.toml:
dependencies = [ "agentuity>=0.0.90", - "agno", - "yfinance", + "agno>=1.8.1,<2.0.0", + "yfinance>=0.2.65,<0.3.0", "openai>=1.82.1", ]• (Optional) You may also evaluate adding upper bounds for agentuity (current 0.0.103) and openai (current 1.102.0) to lock in the versions you've tested.
frameworks/agno/finance-agent/README.md (1)
47-55: Optional: Add a brief “not financial advice” disclaimerSince this agent provides financial analysis, include a short disclaimer in docs.
## 📋 Prerequisites @@ ## 🚀 Getting Started + +> Note: This agent provides informational analysis only and does not constitute financial advice.frameworks/agno/finance-agent/agents/FinanceAgent/finance_agent.py (1)
51-53: Disable tool-call echoing for production output.
show_tool_calls=Truecan clutter user-visible responses and leak internals. Recommend defaulting toFalseunless explicitly debugging.Apply:
- show_tool_calls=True, + show_tool_calls=False,frameworks/agno/finance-agent/agents/FinanceAgent/agent.py (3)
12-13: Trim and short-circuit on empty input.Avoid sending empty prompts to the model; give the user a quick hint instead and keep logs concise.
Apply:
- prompt = await request.data.text() - context.logger.info(f"[FinanceAgent] prompt: {prompt!r}") + prompt = (await request.data.text()).strip() + if not prompt: + return response.text("Please provide a ticker or finance question (e.g., “Analyze AAPL”).") + context.logger.info(f"[FinanceAgent] prompt: {prompt[:512]!r}")
16-18: Prefer async path when available; fall back to executor otherwise.If the underlying agent exposes
arun, avoid thread offloading to reduce overhead and potential thread-safety pitfalls.Apply:
- loop = asyncio.get_running_loop() - raw = await loop.run_in_executor(None, lambda: finance_agent.run(prompt)) + if hasattr(finance_agent, "arun"): + raw = await finance_agent.arun(prompt) # type: ignore[attr-defined] + else: + loop = asyncio.get_running_loop() + raw = await loop.run_in_executor(None, lambda: finance_agent.run(prompt))
19-27: Harden result normalization (handle None explicitly).Covers rare cases where upstream returns
None.Apply:
- if isinstance(raw, str): + if raw is None: + output = "" + elif isinstance(raw, str): output = raw elif hasattr(raw, "content"): output = raw.content elif hasattr(raw, "reply"): output = raw.reply else: output = str(raw)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (8)
frameworks/agno/finance-agent/.env.example(1 hunks)frameworks/agno/finance-agent/.gitignore(1 hunks)frameworks/agno/finance-agent/README.md(1 hunks)frameworks/agno/finance-agent/agents/FinanceAgent/agent.py(1 hunks)frameworks/agno/finance-agent/agents/FinanceAgent/finance_agent.py(1 hunks)frameworks/agno/finance-agent/agentuity.yaml(1 hunks)frameworks/agno/finance-agent/pyproject.toml(1 hunks)frameworks/agno/finance-agent/server.py(1 hunks)
🧰 Additional context used
🧠 Learnings (28)
📓 Common learnings
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.
📚 Learning: 2025-06-23T17:15:43.688Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/miscellaneous/mem0/mem0demo/.cursor/rules/agent.mdc:0-0
Timestamp: 2025-06-23T17:15:43.688Z
Learning: When writing Agentuity AI Agents in Python, always define an async function named `run` that serves as the entry point for the agent.
Applied to files:
frameworks/agno/finance-agent/server.pyframeworks/agno/finance-agent/agents/FinanceAgent/agent.py
📚 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/finance-agent/server.pyframeworks/agno/finance-agent/agents/FinanceAgent/agent.py
📚 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/finance-agent/server.pyframeworks/agno/finance-agent/agents/FinanceAgent/agent.py
📚 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/finance-agent/server.pyframeworks/agno/finance-agent/agents/FinanceAgent/agent.py
📚 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` package is a Python SDK developed by Agentuity Inc., available on PyPI at https://pypi.org/project/agentuity/ with the GitHub repository at https://github.com/agentuity/sdk-py. This is a different package from `agentUniverse` and should not be confused with other agent-related packages.
Applied to files:
frameworks/agno/finance-agent/README.md
📚 Learning: 2025-07-17T13:41:16.151Z
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`
Applied to files:
frameworks/agno/finance-agent/README.md
📚 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/finance-agent/pyproject.toml
📚 Learning: 2025-07-17T13:40:58.033Z
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 : The file should define an async function named `run`
Applied to files:
frameworks/agno/finance-agent/agents/FinanceAgent/agent.py
📚 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: In Python agent files under 'agents/**/*.py', always define an async function named 'run' as the entry point for the agent.
Applied to files:
frameworks/agno/finance-agent/agents/FinanceAgent/agent.py
📚 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/finance-agent/agents/FinanceAgent/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/finance-agent/agents/FinanceAgent/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/finance-agent/agents/FinanceAgent/agent.py
📚 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/finance-agent/agents/FinanceAgent/agent.py
📚 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/finance-agent/agents/FinanceAgent/agent.py
📚 Learning: 2025-06-23T17:15:05.904Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/llamaindex/basic/.cursor/rules/sdk.mdc:0-0
Timestamp: 2025-06-23T17:15:05.904Z
Learning: In the Agentuity Python SDK, the main agent handler function should be defined as an async function named 'run' that accepts 'request' (AgentRequest), 'response' (AgentResponse), and 'context' (AgentContext) as parameters.
Applied to files:
frameworks/agno/finance-agent/agents/FinanceAgent/agent.py
📚 Learning: 2025-07-17T13:40:30.298Z
Learnt from: CR
PR: agentuity/examples#0
File: agents/tavily_agent/.cursor/rules/sdk.mdc:0-0
Timestamp: 2025-07-17T13:40:30.298Z
Learning: Applies to agents/tavily_agent/agents/**/*.py : The main handler function for an agent should be defined as an async function named 'run' with parameters (request: AgentRequest, response: AgentResponse, context: AgentContext)
Applied to files:
frameworks/agno/finance-agent/agents/FinanceAgent/agent.py
📚 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/finance-agent/agentuity.yaml
📚 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/finance-agent/agentuity.yaml
📚 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/finance-agent/agentuity.yaml
📚 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/finance-agent/agentuity.yaml
📚 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/finance-agent/agentuity.yaml
📚 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/finance-agent/agentuity.yaml
📚 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/finance-agent/agentuity.yaml
📚 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/finance-agent/agentuity.yaml
📚 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/finance-agent/agentuity.yaml
📚 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/finance-agent/agentuity.yaml
📚 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/finance-agent/agentuity.yaml
🧬 Code graph analysis (3)
frameworks/agno/finance-agent/server.py (2)
frameworks/agno/from_agno/agents/FinanceAgent/agent.py (1)
FinanceAgent(11-140)frameworks/agno/finance-agent/agents/FinanceAgent/agent.py (2)
run(11-36)welcome(6-9)
frameworks/agno/finance-agent/agents/FinanceAgent/agent.py (1)
frameworks/agno/from_agno/agents/FinanceAgent/agent.py (1)
FinanceAgent(11-140)
frameworks/agno/finance-agent/agents/FinanceAgent/finance_agent.py (1)
frameworks/agno/from_agno/agents/FinanceAgent/yfinance_tools.py (1)
YFinanceTools(5-103)
🪛 LanguageTool
frameworks/agno/finance-agent/README.md
[grammar] ~19-~19: There might be a mistake here.
Context: ...t recommendations, company information, and latest news to deliver professional-gra...
(QB_NEW_EN)
[grammar] ~23-~23: There might be a mistake here.
Context: ..., 52-week highs/lows, and market metrics - Financial Analysis: P/E ratios, market...
(QB_NEW_EN)
[grammar] ~24-~24: There might be a mistake here.
Context: ...ket cap, EPS, and other key fundamentals - Analyst Insights: Professional recomme...
(QB_NEW_EN)
[grammar] ~25-~25: There might be a mistake here.
Context: ...ional recommendations and rating changes - Market Context: Industry trends, compe...
(QB_NEW_EN)
[grammar] ~26-~26: There might be a mistake here.
Context: ...itive analysis, and sentiment indicators - News Integration: Latest company news ...
(QB_NEW_EN)
[grammar] ~41-~41: There might be a mistake here.
Context: ...nai.OpenAIChatfor AI model integration - Utilizesagno.tools.yfinance.YFinanceTo...
(QB_NEW_EN)
[grammar] ~42-~42: There might be a mistake here.
Context: ...nanceTools` for financial data retrieval - Maintains all original instructions, con...
(QB_NEW_EN)
[grammar] ~47-~47: There might be a mistake here.
Context: ... Agno agent intact. ## 📋 Prerequisites Before you begin, ensure you have the fo...
(QB_NEW_EN)
[grammar] ~51-~51: There might be a mistake here.
Context: ...d: - Python: Version 3.10 or higher - UV: Version 0.5.25 or higher ([Documen...
(QB_NEW_EN)
[grammar] ~54-~54: There might be a mistake here.
Context: ...s.astral.sh/uv/)) ## 🚀 Getting Started 1. Install dependencies: ```bash uv i...
(QB_NEW_EN)
[grammar] ~73-~73: There might be a mistake here.
Context: ...t public companies. ## 📖 Documentation For comprehensive documentation on the A...
(QB_NEW_EN)
[grammar] ~75-~75: There might be a mistake here.
Context: ...tion on the Agentuity Python SDK, visit: [https://agentuity.dev/SDKs/python](http...
(QB_NEW_EN)
[grammar] ~78-~78: There might be a mistake here.
Context: ...nal Agno framework documentation, visit: [https://docs.agno.com/](https://docs.ag...
(QB_NEW_EN)
[grammar] ~81-~81: There might be a mistake here.
Context: ...//docs.agno.com/) ## 🆘 Troubleshooting If you encounter any issues: 1. Check t...
(QB_NEW_EN)
[grammar] ~90-~90: There might be a mistake here.
Context: ...he Agentuity support team ## 📝 License This project is licensed under the terms...
(QB_NEW_EN)
🪛 markdownlint-cli2 (0.17.2)
frameworks/agno/finance-agent/README.md
6-6: Images should have alternate text (alt text)
(MD045, no-alt-text)
15-15: Bare URL used
(MD034, no-bare-urls)
🔇 Additional comments (7)
frameworks/agno/finance-agent/server.py (2)
1-12: Server wiring looks correctImports are clean; agent map matches Agentuity expectations.
1-12: Verification complete: entrypoints and configuration are correctThe
async def run(request: AgentRequest, response: AgentResponse, context: AgentContext)function and thedef welcome()function both exist inframeworks/agno/finance-agent/agents/FinanceAgent/agent.py, andagentuity.yamlproperly registersFinanceAgent. Since factoring out theagentsmapping into a named constant is purely optional, there are no required changes.frameworks/agno/finance-agent/agents/FinanceAgent/finance_agent.py (2)
7-54: Overall config looks solid and mirrors the Agno example well.Good use of dedented multi-section instructions, datetime injection, and markdown output.
8-8: Manual Verification Required: ConfirmOpenAIChat(id="gpt-4o")I was unable to locate the
OpenAIChatclass definition in the codebase, nor could I import it in a sandboxed environment. Please confirm the following before merging:
- Ensure the
OpenAIChatwrapper is present under the correct module path (e.g.agno.models.openai) and is included in your project’s Python path.- Verify that your OpenAI provider supports the model identifier
"gpt-4o"as-is. Some environments require alternate or suffixed IDs (for example,"gpt-4o-vision"or similar).- If your stack uses a different identifier, update the code accordingly:
- model=OpenAIChat(id="gpt-4o"), + model=OpenAIChat(id="your-supported-model-id"),frameworks/agno/finance-agent/agentuity.yaml (1)
1-63: Agentuity config acknowledged (no edit suggestions by policy).File structure and wiring align with project conventions. Per our standing guidance, we do not suggest edits to
agentuity.yaml.frameworks/agno/finance-agent/agents/FinanceAgent/agent.py (2)
34-36: Error handling is appropriate and user-friendly.Exceptions are logged with stack traces and mapped to a generic message—sensible default.
4-4: Unable to load theagno.agentmodule in this environment, so I can’t confirm whetherAgentor the importedfinance_agentare safe for concurrent use. Please manually verify:
- That you’re importing from the correct path (
frameworks/agno/finance-agent/agents/FinanceAgent/finance_agent.py).- Whether the shared
finance_agentinstance holds any mutable state (conversation buffers, caches, clients, etc.) that could be corrupted when called by multiple threads.- If it does maintain state, consider either:
- Creating a fresh
finance_agentper request, or- Wrapping calls in a lock or another synchronization mechanism to prevent interleaving.
| YFinanceTools( | ||
| stock_price=True, | ||
| analyst_recommendations=True, | ||
| stock_fundamentals=True, | ||
| historical_prices=True, | ||
| company_info=True, | ||
| company_news=True, | ||
| ) | ||
| ], |
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.
💡 Verification agent
🧩 Analysis chain
Verify YFinanceTools import path and constructor signature at runtime.
Your flags look right, but agno.tools.yfinance.YFinanceTools may differ across versions. Validate the signature to avoid runtime TypeError.
Run:
🏁 Script executed:
#!/bin/bash
python - <<'PY'
import inspect, importlib
m = importlib.import_module('agno.tools.yfinance')
print("YFinanceTools.__init__ signature:", inspect.signature(m.YFinanceTools.__init__))
PYLength of output: 1131
🏁 Script executed:
#!/bin/bash
# Search for YFinanceTools class definition within the repository
rg -n "class YFinanceTools" -g "*.py"
# Locate the file path containing the class definition
file=$(rg -l "class YFinanceTools" -g "*.py")
echo "YFinanceTools class found in: $file"
# Print the first 200 lines of the file to inspect the __init__ constructor signature
sed -n '1,200p' "$file"Length of output: 4767
🏁 Script executed:
#!/bin/bash
# Find finance_agent.py in the repository
fd finance_agent.py -t fLength of output: 93
🏁 Script executed:
#!/bin/bash
# Display the first 200 lines of finance_agent.py to inspect imports
sed -n '1,200p' frameworks/agno/finance-agent/agents/FinanceAgent/finance_agent.pyLength of output: 1820
🏁 Script executed:
#!/bin/bash
# Find any 'tools' directories under frameworks/agno/from_agno to verify module path
find frameworks/agno/from_agno -type d -name "tools"Length of output: 52
🏁 Script executed:
#!/bin/bash
echo "Top-level contents of frameworks/agno/from_agno:"
ls -1 frameworks/agno/from_agno
echo ""
echo "Directories under frameworks/agno/from_agno (depth 1):"
find frameworks/agno/from_agno -maxdepth 1 -type d -print
echo ""
echo "Directories under frameworks/agno/from_agno (depth 2):"
find frameworks/agno/from_agno -maxdepth 2 -type d -printLength of output: 1207
🏁 Script executed:
#!/bin/bash
# List files in the FinanceAgent directory of the finance-agent project
ls -1 frameworks/agno/finance-agent/agents/FinanceAgentLength of output: 95
🏁 Script executed:
#!/bin/bash
# Inspect package definitions in from_agno agents
echo "--- frameworks/agno/from_agno/agents/__init__.py ---"
sed -n '1,200p' frameworks/agno/from_agno/agents/__init__.py
echo ""
echo "--- frameworks/agno/from_agno/agents/FinanceAgent/__init__.py ---"
sed -n '1,200p' frameworks/agno/from_agno/agents/FinanceAgent/__init__.pyLength of output: 483
Critical: Fix broken import path for YFinanceTools
The current import in frameworks/agno/finance-agent/agents/FinanceAgent/finance_agent.py
from agno.tools.yfinance import YFinanceToolswill raise ModuleNotFoundError at runtime because no agno/tools/yfinance.py module exists in this repo. The YFinanceTools class is actually defined in frameworks/agno/from_agno/agents/FinanceAgent/yfinance_tools.py. Please update the import (or relocate the file) so Python can resolve it:
• File needing update:
frameworks/agno/finance-agent/agents/FinanceAgent/finance_agent.py
• Change the import to the correct module path—for example:
- from agno.tools.yfinance import YFinanceTools
+ from agno.from_agno.agents.FinanceAgent.yfinance_tools import YFinanceTools• No changes are required to the constructor flags—YFinanceTools.__init__ already matches the provided boolean parameters.
🤖 Prompt for AI Agents
In frameworks/agno/finance-agent/agents/FinanceAgent/finance_agent.py around
lines 10 to 18, the import "from agno.tools.yfinance import YFinanceTools" is
incorrect and causes ModuleNotFoundError; update the import to point to the
actual module location (for example: "from
frameworks.agno.from_agno.agents.FinanceAgent.yfinance_tools import
YFinanceTools") so Python can resolve the class, or alternatively relocate
yfinance_tools.py into agno/tools and keep the existing import; do not change
the constructor flags.
| <a target="_blank" href="https://app.agentuity.com/deploy" alt="Agentuity"> | ||
| <img src="https://app.agentuity.com/img/deploy.svg" /> | ||
| </a> |
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.
Add alt text to image for accessibility (MD045)
Improves accessibility and fixes markdownlint warning.
- <img src="https://app.agentuity.com/img/deploy.svg" />
+ <img src="https://app.agentuity.com/img/deploy.svg" alt="Deploy to Agentuity" />📝 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.
| <a target="_blank" href="https://app.agentuity.com/deploy" alt="Agentuity"> | |
| <img src="https://app.agentuity.com/img/deploy.svg" /> | |
| </a> | |
| <a target="_blank" href="https://app.agentuity.com/deploy" alt="Agentuity"> | |
| <img src="https://app.agentuity.com/img/deploy.svg" alt="Deploy to Agentuity" /> | |
| </a> |
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
6-6: Images should have alternate text (alt text)
(MD045, no-alt-text)
🤖 Prompt for AI Agents
frameworks/agno/finance-agent/README.md around lines 5-7: the embedded image tag
lacks meaningful alt text which triggers markdownlint MD045; update the <img>
element to include a descriptive alt attribute (for example alt="Deploy to
Agentuity") so the image is accessible to screen readers and the MD045 warning
is resolved.
| **Original Source**: https://docs.agno.com/examples/agents/finance-agent | ||
|
|
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.
Replace bare URL with Markdown link (MD034)
Enhances readability and fixes markdownlint warning.
-**Original Source**: https://docs.agno.com/examples/agents/finance-agent
+**Original Source**: [Agno Finance Agent](https://docs.agno.com/examples/agents/finance-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.
| **Original Source**: https://docs.agno.com/examples/agents/finance-agent | |
| **Original Source**: [Agno Finance Agent](https://docs.agno.com/examples/agents/finance-agent) |
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
15-15: Bare URL used
(MD034, no-bare-urls)
🤖 Prompt for AI Agents
In frameworks/agno/finance-agent/README.md around lines 15 to 16, replace the
bare URL "https://docs.agno.com/examples/agents/finance-agent" with a Markdown
link to satisfy markdownlint rule MD034; update the line to use link text such
as "Original Source" (e.g. [Original
Source](https://docs.agno.com/examples/agents/finance-agent)) so the URL is not
left bare.
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: 0
🧹 Nitpick comments (2)
frameworks/agno/finance-agent/server.py (2)
8-12: Env key check is fine; relax uv detection for the hint.The
os.environ.get("_", "").endswith("uv")heuristic is brittle; users may miss the helpful hint even when using uv. Suggest always showing the hint when.envexists.- if os.environ.get("_", "").endswith("uv") and os.path.exists(".env"): - print("\033[31m[ERROR] Re-run with: uv run --env-file .env server.py\033[0m") + if os.path.exists(".env"): + print("\033[31m[ERROR] Re-run with: uv run --env-file .env server.py\033[0m")
18-18: Nit: add trailing newline.Add a newline at EOF to satisfy linters and POSIX tooling.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (5)
frameworks/agno/finance-agent/.agentuity-crash-1756494133.json(1 hunks)frameworks/agno/finance-agent/.agentuity-crash-1756746738.json(1 hunks)frameworks/agno/finance-agent/.agentuity/config.json(1 hunks)frameworks/agno/finance-agent/agentuity.yaml(1 hunks)frameworks/agno/finance-agent/server.py(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- frameworks/agno/finance-agent/.agentuity-crash-1756494133.json
- frameworks/agno/finance-agent/.agentuity-crash-1756746738.json
🧰 Additional context used
🧠 Learnings (16)
📓 Common learnings
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: Agentuity Agent files should 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/miscellaneous/mem0/mem0demo/.cursor/rules/agent.mdc:0-0
Timestamp: 2025-06-23T17:15:43.688Z
Learning: Agent files should import types such as AgentRequest, AgentResponse, and AgentContext from the `agentuity` package to ensure compatibility and leverage provided helper methods.
📚 Learning: 2025-07-17T13:40:30.298Z
Learnt from: CR
PR: agentuity/examples#0
File: agents/tavily_agent/.cursor/rules/sdk.mdc:0-0
Timestamp: 2025-07-17T13:40:30.298Z
Learning: Applies to agents/tavily_agent/agents/**/*.py : Import types from 'agentuity' when using Agentuity SDK types
Applied to files:
frameworks/agno/finance-agent/server.py
📚 Learning: 2025-06-23T17:15:43.688Z
Learnt from: CR
PR: agentuity/examples#0
File: frameworks/miscellaneous/mem0/mem0demo/.cursor/rules/agent.mdc:0-0
Timestamp: 2025-06-23T17:15:43.688Z
Learning: When writing Agentuity AI Agents in Python, always define an async function named `run` that serves as the entry point for the agent.
Applied to files:
frameworks/agno/finance-agent/server.py
📚 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/finance-agent/server.py
📚 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/finance-agent/server.py
📚 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/finance-agent/.agentuity/config.jsonframeworks/agno/finance-agent/agentuity.yaml
📚 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/finance-agent/.agentuity/config.jsonframeworks/agno/finance-agent/agentuity.yaml
📚 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/finance-agent/.agentuity/config.jsonframeworks/agno/finance-agent/agentuity.yaml
📚 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/finance-agent/.agentuity/config.jsonframeworks/agno/finance-agent/agentuity.yaml
📚 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/finance-agent/.agentuity/config.jsonframeworks/agno/finance-agent/agentuity.yaml
📚 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/finance-agent/.agentuity/config.jsonframeworks/agno/finance-agent/agentuity.yaml
📚 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/finance-agent/.agentuity/config.jsonframeworks/agno/finance-agent/agentuity.yaml
📚 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/finance-agent/.agentuity/config.jsonframeworks/agno/finance-agent/agentuity.yaml
📚 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/finance-agent/.agentuity/config.jsonframeworks/agno/finance-agent/agentuity.yaml
📚 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/finance-agent/agentuity.yaml
📚 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/finance-agent/agentuity.yaml
🔇 Additional comments (5)
frameworks/agno/finance-agent/server.py (2)
17-18: LGTM on bootstrap.Logging setup and
autostart()under main guard look correct for Agentuity runners.
8-9: Env var names confirmed. Only AGENTUITY_SDK_KEY (and AGENTUITY_API_KEY) appear in code, configs, and CI; no references to AGENTUITY_SDK_API_KEY were found.frameworks/agno/finance-agent/.agentuity/config.json (2)
1-1: Wiring looks consistent with YAML.Agent id and filename align with agentuity.yaml and the agents dir layout. No changes needed.
1-1: Agent entrypoints and finance_agent definition verified
All required entrypoints (welcome(), async run(...)) exist in agent.py, and finance_agent is defined in finance_agent.py.frameworks/agno/finance-agent/agentuity.yaml (1)
8-65: Configuration alignment looks good.Version range, bundler settings, dev command, and agent id match the generated config; no edits suggested (noting this file is CLI-managed).
|
Closing due to inactivity for more than 30 days. Configure here. |
Add Agno Finance Agent wrapper for Agentuity
Summary
This PR adds a new Finance Agent that wraps the original Agno Finance Agent for use with the Agentuity platform. The implementation preserves ALL original Agno framework functionality while providing the Agentuity interface layer.
Key changes:
frameworks/agno/finance-agent/directory structure following established conventionsfinance_agent.pyagent.pywithwelcome()and asyncrun()functionsagno,yfinance, andopenaiFramework preservation:
agno.agent.Agentfor core agent logicagno.models.openai.OpenAIChatfor AI model integrationagno.tools.yfinance.YFinanceToolsfor real-time financial dataReview & Testing Checklist for Human
OPENAI_API_KEYand test the agent with actual stock queries (e.g., "Analyze Apple (AAPL)") to verify it can fetch real financial data and provide comprehensive analysisagno,yfinance,agentuity,openai) install correctly and don't have version conflicts in different Python environmentsNotes
Link to Devin run: https://app.devin.ai/sessions/7a103097a6204edabd551b35b7faa532
Requested by: Dhilan Fye (dfye@agentuity.com)
The implementation follows the same pattern as other Agno agents in the
frameworks/agno/from_agno/directory. Basic import and structure testing was performed, but full end-to-end testing with live APIs requires proper API keys and should be done manually to verify the financial data retrieval and analysis features work correctly.The agent provides sophisticated financial analysis including real-time stock data, analyst recommendations, company fundamentals, and market news integration - all powered by the original Agno framework's YFinanceTools.
Summary by CodeRabbit
New Features
Documentation
Chores