# Akash Chat Integration

The *Akash Chat* API is an open and permissionless Llamma3 API that is powered by the *Akash* Supercloud.

Before any scraping task begins, user input is processed by the Akash Chat API to generate more accurate and context-rich queries. This ensures that Scout collects the **most relevant and comprehensive datasets** for AI and ML workflows.

Purpose of Integration

* **Improve Data Relevance:** Refines raw user inputs into optimized queries that yield higher-quality results.
* **Enable Autonomous Agents:** Allows AI agents to autonomously expand and refine queries before scraping.

#### How It Works

1. **User Input**
   * The user or agent specifies topics, keywords, or domains to scrape.
2. **Query Enrichment via Akash Chat API**
   * Akash Chat analyzes the input.
   * It adds semantic context, expands keywords, and refines phrasing.
   * Example: `"AI ethics"` → enriched into `"AI ethics in healthcare, bias in AI models, responsible machine learning"`.
3. **Integration with Brave Search**
   * The enriched query is then sent to Brave Search API.
   * Brave provides a list of authoritative links that are passed into the Sentinel Scout Scraper Engine.
4. **Scraper Engine Execution**
   * The enriched and targeted links are scraped using Scout’s proxy nodes, headless Chrome, and bot bypass mechanisms.
   * This ensures higher success rates and clean, structured data.

#### Benefits of Using Akash Chat API

* **Precision:** Eliminates irrelevant results by sharpening the focus of queries.
* **Coverage:** Expands narrow inputs into comprehensive multi-keyword queries.
* **Autonomy:** Enables autonomous ML agents to operate end-to-end without human supervision.
* **Scalability:** Runs queries at scale across Scout’s distributed network.
* **Privacy:** Akash Chat is a fully private LLM that maintains user privacy.

#### Example Workflow

```mermaid
flowchart LR
    A[User Input] --> B[Akash Chat API - Enrichment]
    B --> C[Refined Query]
    C --> D[Brave Search API - Link Retrieval]
    D --> E[Sentinel Scout Scraper Engine]
    E --> F[Clean Dataset for AI Models]
```

#### Example Use Case

If a user requests:

```json
{
  "query": "renewable energy policies"
}
```

Akash Chat might enrich it into:

```json
{
  "enriched_query": "renewable energy policies 2025, solar policy EU, US wind farm regulations, global clean energy targets"
}
```

Scout then processes these enriched queries through Brave Search and distributes scraping jobs across its global proxy network.

***

The **Akash Chat API integration** ensures that Sentinel Scout delivers **datasets with higher relevance, context, and coverage**, making it a powerful partner for both developers and autonomous AI agents.
