Skip to content

Commit b5df3fe

Browse files
committed
feat: adding rss tool to Strands tool repository
1 parent c445966 commit b5df3fe

File tree

4 files changed

+1034
-5
lines changed

4 files changed

+1034
-5
lines changed

README.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Strands Agents Tools is a community-driven project that provides a powerful set
5555
- 🔄 **Multiple tools in Parallel** - Call multiple other tools at the same time in parallel with Batch Tool
5656
- 🔍 **Browser Tool** - Tool giving an agent access to perform automated actions on a browser (chromium)
5757
- 📈 **Diagram** - Create AWS cloud diagrams, basic diagrams, or UML diagrams using python libraries
58+
- 📰 **RSS Feed Manager** - Subscribe, fetch, and process RSS feeds with content filtering and persistent storage
5859

5960
## 📦 Installation
6061

@@ -67,7 +68,7 @@ pip install strands-agents-tools
6768
To install the dependencies for optional tools:
6869

6970
```bash
70-
pip install strands-agents-tools[mem0_memory, use_browser]
71+
pip install strands-agents-tools[mem0_memory, use_browser, rss]
7172
```
7273

7374
### Development Install
@@ -130,6 +131,7 @@ Below is a comprehensive table of all available tools, how to use them with an a
130131
| batch| `agent.tool.batch(invocations=[{"name": "current_time", "arguments": {"timezone": "Europe/London"}}, {"name": "stop", "arguments": {}}])` | Call multiple other tools in parallel. |
131132
| browser | `browser = LocalChromiumBrowser(); agent = Agent(tools=[browser.browser])` | Web scraping, automated testing, form filling, web automation tasks |
132133
| diagram | `agent.tool.diagram(diagram_type="cloud", nodes=[{"id": "s3", "type": "S3"}], edges=[])` | Create AWS cloud architecture diagrams, network diagrams, graphs, and UML diagrams (all 14 types) |
134+
| rss | `agent.tool.rss(action="subscribe", url="https://example.com/feed.xml", feed_id="tech_news")` | Manage RSS feeds: subscribe, fetch, read, search, and update content from various sources |
133135

134136
\* *These tools do not work on windows*
135137

@@ -504,6 +506,46 @@ result = agent.tool.diagram(
504506
)
505507
```
506508

509+
### RSS Feed Management
510+
511+
```python
512+
from strands import Agent
513+
from strands_tools import rss
514+
515+
agent = Agent(tools=[rss])
516+
517+
# Subscribe to a feed
518+
result = agent.tool.rss(
519+
action="subscribe",
520+
url="https://news.example.com/rss/technology"
521+
)
522+
523+
# List all subscribed feeds
524+
feeds = agent.tool.rss(action="list")
525+
526+
# Read entries from a specific feed
527+
entries = agent.tool.rss(
528+
action="read",
529+
feed_id="news_example_com_technology",
530+
max_entries=5,
531+
include_content=True
532+
)
533+
534+
# Search across all feeds
535+
search_results = agent.tool.rss(
536+
action="search",
537+
query="machine learning",
538+
max_entries=10
539+
)
540+
541+
# Fetch feed content without subscribing
542+
latest_news = agent.tool.rss(
543+
action="fetch",
544+
url="https://blog.example.org/feed",
545+
max_entries=3
546+
)
547+
```
548+
507549
## 🌍 Environment Variables Configuration
508550

509551
Agents Tools provides extensive customization through environment variables. This allows you to configure tool behavior without modifying code, making it ideal for different environments (development, testing, production).
@@ -659,6 +701,14 @@ The Mem0 Memory Tool supports three different backend configurations:
659701
| STRANDS_BROWSER_WIDTH | Default width of the browser | 1280 |
660702
| STRANDS_BROWSER_HEIGHT | Default height of the browser | 800 |
661703

704+
#### RSS Tool
705+
706+
| Environment Variable | Description | Default |
707+
|----------------------|-------------|---------|
708+
| STRANDS_RSS_MAX_ENTRIES | Default setting for maximum number of entries per feed | 100 |
709+
| STRANDS_RSS_UPDATE_INTERVAL | Default amount of time between updating rss feeds in minutes | 60 |
710+
| STRANDS_RSS_STORAGE_PATH | Default storage path where rss feeds are stored locally | ~/.strands/rss_feeds |
711+
662712

663713
## Contributing ❤️
664714

@@ -684,4 +734,3 @@ This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENS
684734
## Security
685735

686736
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
687-

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,10 @@ diagram = [
9797
"networkx>=2.8.0,<4.0.0",
9898
"diagrams>=0.23.0,<1.0.0",
9999
]
100+
rss = ["feedparser>=6.0.10,<7.0.0", "html2text>=2020.1.16,<2021.0.0"]
100101

101102
[tool.hatch.envs.hatch-static-analysis]
102-
features = ["mem0_memory", "local_chromium_browser", "agent_core_browser", "agent_core_code_interpreter", "a2a_client", "diagram"]
103+
features = ["mem0_memory", "local_chromium_browser", "agent_core_browser", "agent_core_code_interpreter", "a2a_client", "diagram", "rss"]
103104
dependencies = [
104105
"strands-agents>=1.0.0",
105106
"mypy>=0.981,<1.0.0",
@@ -118,7 +119,7 @@ lint-check = [
118119
lint-fix = ["ruff check --fix"]
119120

120121
[tool.hatch.envs.hatch-test]
121-
features = ["mem0_memory", "local_chromium_browser", "agent_core_browser", "agent_core_code_interpreter", "a2a_client", "diagram"]
122+
features = ["mem0_memory", "local_chromium_browser", "agent_core_browser", "agent_core_code_interpreter", "a2a_client", "diagram", "rss"]
122123
extra-dependencies = [
123124
"moto>=5.1.0,<6.0.0",
124125
"pytest>=8.0.0,<9.0.0",
@@ -208,4 +209,4 @@ name = "cz_conventional_commits"
208209
tag_format = "v$version"
209210
bump_message = "chore(release): bump version $current_version -> $new_version"
210211
version_files = ["pyproject.toml:version"]
211-
update_changelog_on_bump = true
212+
update_changelog_on_bump = true

0 commit comments

Comments
 (0)