> For the complete documentation index, see [llms.txt](https://sentinelagent.gitbook.io/sentinel-agent/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sentinelagent.gitbook.io/sentinel-agent/getting-started/publish-your-docs.md).

# How It Works: The Autonomous Agent Loop

### Sentinel operates through a continuous, autonomous cycle that requires zero human intervention after initial setup.

### The 5-Step Loop

#### Step 1: Deploy Your Sentinel 🚀

Click "Deploy Sentinel" and our integration with **Coinbase CDP Embedded Wallets** instantly creates a dedicated Solana wallet for your agent.

**No seed phrases. No manual setup. Just instant deployment.**

👉

<figure><img src="/files/FD2wRq6hukxSuUg9nblR" alt=""><figcaption></figcaption></figure>

***

#### Step 2: Fund with USDC/CASH 💰

Send USDC from your Phantom wallet to your Sentinel's new wallet address. This becomes the agent's autonomous budget.

**Example:** Fund with $1 USDC = \~3,300 price checks = 55 hours of monitoring

<br>

<figure><img src="/files/AgLQY84ohL9Jv7EjPmJA" alt=""><figcaption></figcaption></figure>

***

<figure><img src="/files/5RlMjEnzhv0wbcxe65wD" alt=""><figcaption></figcaption></figure>

#### Step 3: Configure Monitoring Rules ⚙️

Set your condition using our simple interface:

```
Monitor: Switchboard SOL/USD Feed
Condition: Price drops below $150
Action: Send Discord webhook + AI analysis
```

***

<figure><img src="/files/U1ix3TSK9GmyINr1v3wg" alt=""><figcaption></figcaption></figure>

#### Step 4: The Autonomous Loop 🔄

Every 30 seconds, your Sentinel executes this sequence:

**A. Request Data**

```
Agent → x402 Server: GET /api/check-price
Server → Agent: 402 Payment Required (0.0003 USDC)
```

<br>

<figure><img src="/files/lvbyJl5BDGTUGXZ4BQU8" alt=""><figcaption></figcaption></figure>

\
\
**B. Autonomous Payment**

```
Agent signs transaction with its own wallet
Sends 0.0003 USDC to payment address
Transaction confirms on Solana (~400ms)
```

<div align="left"><figure><img src="/files/7az6glqpN7EHiZI0diYm" alt=""><figcaption></figcaption></figure></div>

\
\
**C. Receive Data**

```
Agent → x402 Server: GET /api/check-price (with tx signature)
Server verifies payment on-chain
Server → Agent: { "price": 155.02, "timestamp": ... }
```

<figure><img src="/files/B29KhzEauWs539569Afz" alt=""><figcaption></figcaption></figure>

\
**D. Evaluate Condition**

```
IF price < $150 THEN trigger alert
ELSE continue monitoring
```

***

#### Step 5: Intelligent Alerts 🧠

When your condition triggers:

1. **Basic Alert**: Instant notification via Discord/Telegram/Email
2. **AI Analysis** (optional, +0.04 USDC): Agent pays Claude/DeepSeek AI to analyze:
   * WHY the price moved
   * Market context (news, volume, trends)
   * Recommended actions

**Example AI Analysis:**

```
🚨 ALERT: SOL dropped to $149.50 (below your $150 threshold)

AI Analysis:
"This 3.2% drop follows Fed interest rate commentary. 
Trading volume up 40% in last hour. Historical patterns 
suggest support at $145. Consider: wait for confirmation 
below $145 before action."
```

***

### Live Transaction Proof

Every action is verifiable on-chain:

* **Oracle Payment**: 2juJbSk3KGdjtfq5ReWZsk2Xu7hE63tS9qcHGRJHeoTUypDuCjgzJ6Fba8MKCwroc1uhS2UWh7hmg1LV9pXXJHU

All payments use **USDC or CASH**

***

### Why This Works

✅ **Autonomous**: Agent operates 24/7 without human intervention ✅ **Transparent**: Every payment visible on Solscan\
✅ **Efficient**: Pay only for what you use (0.0003 USDC per check) ✅ **Intelligent**: Optional AI analysis when it matters ✅ **Trustless**: Your agent, your wallet, your rules


---

# 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:

```
GET https://sentinelagent.gitbook.io/sentinel-agent/getting-started/publish-your-docs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
