Skip to content

Commit 184e3c4

Browse files
Add Adanos Market Sentiment integration (#553)
* Add Adanos Market Sentiment integration * docs: avoid key-shaped example placeholder * docs: add Adanos investment research agent example * docs: install Adanos integration from PyPI
1 parent 50b413d commit 184e3c4

2 files changed

Lines changed: 155 additions & 0 deletions

File tree

integrations/adanos.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
---
2+
layout: integration
3+
name: Adanos Market Sentiment
4+
description: Stock and crypto market sentiment from Reddit, X / FinTwit, financial news, and Polymarket
5+
authors:
6+
- name: Adanos
7+
socials:
8+
github: adanos-software
9+
repo: https://github.com/adanos-software/adanos-haystack
10+
report_issue: https://github.com/adanos-software/adanos-haystack/issues
11+
type: Tool Integration
12+
logo: /logos/adanos.svg
13+
version: Haystack 2.0
14+
toc: true
15+
---
16+
17+
### Table of Contents
18+
19+
- [Overview](#overview)
20+
- [Installation](#installation)
21+
- [Usage](#usage)
22+
- [Component](#component)
23+
- [Investment Research Agent](#investment-research-agent)
24+
- [License](#license)
25+
26+
## Overview
27+
28+
[Adanos](https://adanos.org/) provides structured market sentiment for stocks and crypto. The
29+
`AdanosMarketSentiment` component makes signals from Reddit, X / FinTwit, financial news, and
30+
Polymarket available to Haystack pipelines and agents without adding trading or portfolio logic.
31+
32+
The community-maintained integration supports sentiment lookups, trending assets, aggregate market
33+
sentiment, asset comparisons, search, and dataset statistics. Stock requests can use Reddit, X,
34+
news, or Polymarket; crypto requests use Reddit.
35+
36+
Create an API key at [adanos.org/register](https://adanos.org/register). Free, Hobby, and
37+
Professional accounts use the same component; the API applies the quota and historical access
38+
available to the key's plan.
39+
40+
## Installation
41+
42+
Install the released component from PyPI:
43+
44+
```bash
45+
pip install "adanos-haystack==0.1.1"
46+
```
47+
48+
Provide the API key through the `ADANOS_API_KEY` environment variable.
49+
50+
## Usage
51+
52+
### Component
53+
54+
```python
55+
from haystack_integrations.components.tools.adanos import AdanosMarketSentiment
56+
57+
sentiment = AdanosMarketSentiment()
58+
result = sentiment.run(
59+
operation="sentiment",
60+
asset_type="stock",
61+
source="news",
62+
symbol="NVDA",
63+
)
64+
65+
print(result["result"])
66+
```
67+
68+
Both synchronous `run` and asynchronous `run_async` calls are supported.
69+
70+
### Investment Research Agent
71+
72+
A research agent can combine private investment notes retrieved by Haystack with current external
73+
sentiment from Adanos. In this example, the agent searches an internal document store, calls Adanos
74+
for relevant stock sentiment, and keeps the two evidence sources distinct in its assessment:
75+
76+
```python
77+
from haystack.components.agents import Agent
78+
from haystack.components.generators.chat import OpenAIChatGenerator
79+
from haystack.components.retrievers.in_memory import InMemoryBM25Retriever
80+
from haystack.dataclasses import ChatMessage, Document
81+
from haystack.document_stores.in_memory import InMemoryDocumentStore
82+
from haystack.tools import ComponentTool
83+
from haystack_integrations.components.tools.adanos import AdanosMarketSentiment
84+
85+
document_store = InMemoryDocumentStore()
86+
document_store.write_documents(
87+
[
88+
Document(
89+
content=(
90+
"NVDA research note: data-center demand remains the main growth driver, "
91+
"while customer concentration is a material risk."
92+
),
93+
meta={"ticker": "NVDA"},
94+
)
95+
]
96+
)
97+
98+
research_tool = ComponentTool(
99+
component=InMemoryBM25Retriever(document_store=document_store, top_k=3),
100+
name="internal_research",
101+
description="Search approved internal investment research and return relevant documents.",
102+
)
103+
adanos_tool = ComponentTool(
104+
component=AdanosMarketSentiment(),
105+
name="market_sentiment",
106+
description=(
107+
"Get current and historical stock or crypto market sentiment from Reddit, "
108+
"X / FinTwit, financial news, and Polymarket."
109+
),
110+
)
111+
112+
agent = Agent(
113+
chat_generator=OpenAIChatGenerator(model="gpt-4o-mini"),
114+
tools=[research_tool, adanos_tool],
115+
system_prompt=(
116+
"You are an investment research assistant. Use internal_research for private notes "
117+
"and market_sentiment for external sentiment evidence. Clearly distinguish the two "
118+
"sources, mention conflicting signals, and do not present the result as financial advice."
119+
),
120+
)
121+
122+
result = agent.run(
123+
messages=[
124+
ChatMessage.from_user(
125+
"Assess NVDA using our internal research and external sentiment from "
126+
"2026-07-21 through 2026-07-28."
127+
)
128+
]
129+
)
130+
print(result["last_message"].text)
131+
```
132+
133+
See the [Adanos API reference](https://api.adanos.org/docs) and the
134+
[integration repository](https://github.com/adanos-software/adanos-haystack) for all operations and
135+
parameters.
136+
137+
## License
138+
139+
`adanos-haystack` is distributed under the terms of the Apache-2.0 license.

logos/adanos.svg

Lines changed: 16 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)