Skip to content

Commit f43f924

Browse files
committed
feat: adding rss tool to Strands tool repository
1 parent d1de6cf commit f43f924

File tree

4 files changed

+1005
-3
lines changed

4 files changed

+1005
-3
lines changed

README.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ Strands Agents Tools is a community-driven project that provides a powerful set
5454
- 🐝 **Swarm Intelligence** - Coordinate multiple AI agents for parallel problem solving with shared memory
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)
57-
57+
- 📰 **RSS Feed Manager** - Subscribe, fetch, and process RSS feeds with content filtering and persistent storage
58+
5859
## 📦 Installation
5960

6061
### Quick Install
@@ -128,6 +129,7 @@ Below is a comprehensive table of all available tools, how to use them with an a
128129
| workflow | `agent.tool.workflow(action="create", name="data_pipeline", steps=[{"tool": "file_read"}, {"tool": "python_repl"}])` | Define, execute, and manage multi-step automated workflows |
129130
| batch| `agent.tool.batch(invocations=[{"name": "current_time", "arguments": {"timezone": "Europe/London"}}, {"name": "stop", "arguments": {}}])` | Call multiple other tools in parallel. |
130131
| browser | `browser = LocalChromiumBrowser(); agent = Agent(tools=[browser.browser])` | Web scraping, automated testing, form filling, web automation tasks |
132+
| 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 |
131133

132134
\* *These tools do not work on windows*
133135

@@ -450,6 +452,46 @@ response = agent("discover available agents and send a greeting message")
450452
# - send_message(message_text, target_agent_url) to communicate
451453
```
452454

455+
### RSS Feed Management
456+
457+
```python
458+
from strands import Agent
459+
from strands_tools import rss
460+
461+
agent = Agent(tools=[rss])
462+
463+
# Subscribe to a feed
464+
result = agent.tool.rss(
465+
action="subscribe",
466+
url="https://news.example.com/rss/technology"
467+
)
468+
469+
# List all subscribed feeds
470+
feeds = agent.tool.rss(action="list")
471+
472+
# Read entries from a specific feed
473+
entries = agent.tool.rss(
474+
action="read",
475+
feed_id="news_example_com_technology",
476+
max_entries=5,
477+
include_content=True
478+
)
479+
480+
# Search across all feeds
481+
search_results = agent.tool.rss(
482+
action="search",
483+
query="machine learning",
484+
max_entries=10
485+
)
486+
487+
# Fetch feed content without subscribing
488+
latest_news = agent.tool.rss(
489+
action="fetch",
490+
url="https://blog.example.org/feed",
491+
max_entries=3
492+
)
493+
```
494+
453495
## 🌍 Environment Variables Configuration
454496

455497
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).
@@ -605,6 +647,13 @@ The Mem0 Memory Tool supports three different backend configurations:
605647
| STRANDS_BROWSER_WIDTH | Default width of the browser | 1280 |
606648
| STRANDS_BROWSER_HEIGHT | Default height of the browser | 800 |
607649

650+
#### RSS Tool
651+
652+
| Environment Variable | Description | Default |
653+
|----------------------|-------------|---------|
654+
| STRANDS_RSS_MAX_ENTRIES | Default setting for maximum number of entries per feed | 100 |
655+
| STRANDS_RSS_UPDATE_INTERVAL | Default amount of time between updating rss feeds in minutes | 60 |
656+
| STRANDS_RSS_STORAGE_PATH | Default storage path where rss feeds are stored locally | ~/.strands/rss_feeds |
608657

609658
## Contributing ❤️
610659

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,10 @@ agent_core_code_interpreter = [
9191
"bedrock-agentcore==0.1.0"
9292
]
9393
a2a_client = ["a2a-sdk[sql]>=0.2.11"]
94+
rss = ["feedparser>=6.0.10,<7.0.0", "html2text>=2020.1.16,<2021.0.0"]
9495

9596
[tool.hatch.envs.hatch-static-analysis]
96-
features = ["mem0_memory", "local_chromium_browser", "agent_core_browser", "agent_core_code_interpreter", "a2a_client"]
97+
features = ["mem0_memory", "local_chromium_browser", "agent_core_browser", "agent_core_code_interpreter", "a2a_client", "rss"]
9798
dependencies = [
9899
"strands-agents>=1.0.0",
99100
"mypy>=0.981,<1.0.0",
@@ -112,7 +113,7 @@ lint-check = [
112113
lint-fix = ["ruff check --fix"]
113114

114115
[tool.hatch.envs.hatch-test]
115-
features = ["mem0_memory", "local_chromium_browser", "agent_core_browser", "agent_core_code_interpreter", "a2a_client"]
116+
features = ["mem0_memory", "local_chromium_browser", "agent_core_browser", "agent_core_code_interpreter", "a2a_client", "rss"]
116117
extra-dependencies = [
117118
"moto>=5.1.0,<6.0.0",
118119
"pytest>=8.0.0,<9.0.0",

0 commit comments

Comments
 (0)