> For the complete documentation index, see [llms.txt](https://blackswanwtf.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blackswanwtf.gitbook.io/docs/smart-agents/sentiment-analysis-agent.md).

# Sentiment Analysis Agent

The sentiment analysis agent provides real-time insights into cryptocurrency market sentiment by continuously collecting and analyzing cryptocurrency-related tweets from the last 6 hours. It leverages advanced AI models to determine overall market mood, sentiment intensity, and identify key events driving sentiment.

## Key Features

**AI-Powered Sentiment Analysis**\
Utilizes GPT models (via OpenRouter) to perform sophisticated sentiment analysis on tweet data

**Real-time Tweet Collection**\
Automatically fetches recent tweets from the tweet database populated by the Twitter Scraping Service

**Comprehensive Metrics**\
Provides detailed sentiment metrics, including overall sentiment, sentiment intensity, and narrative analysis

**Engagement Analysis**\
Incorporates tweet engagement metrics (likes, retweets, replies) into the sentiment calculation

**Thread Support**\
Intelligently processes both individual tweets and detected Twitter threads for complete understanding

**Historical Data**\
Stores analysis results for historical tracking and trend analysis

## Sentiment Categories

* **Extremely Bullish**: Very positive market sentiment
* **Bullish**: Positive market sentiment
* **Neutral**: Mixed or neutral sentiment
* **Bearish**: Negative market sentiment
* **Extremely Bearish**: Very negative market sentiment

## Sentiment Intensity

* **Low**: Mild expressions and sentiment
* **Moderate**: Noticeable patterns and sentiment
* **High**: Strong expressions and sentiment
* **Extreme**: Highly emotional and intense sentiment


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://blackswanwtf.gitbook.io/docs/smart-agents/sentiment-analysis-agent.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
