> ## Documentation Index
> Fetch the complete documentation index at: https://ikun.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 监控与调试

> 实时监控您的 Agent、Teams 和 Workflows。

# 监控

您可以在 [app.agno.com](https://app.agno.com) 上实时跟踪您的 Agent。

## 身份验证

通过 [agno.com](https://app.agno.com) 身份验证，开始监控您的会话。
请查阅[身份验证指南](how-to/authentication)，了解如何与 Agno 进行身份验证。

## 启用监控

通过设置 `AGNO_MONITOR=true`，为单个 Agent 或所有 Agent 全局启用监控。

### 为特定 Agent

```python theme={null}
agent = Agent(markdown=True, monitoring=True)
```

### 为所有 Agent 全局设置

```bash theme={null}
export AGNO_MONITOR=true
```

## 监控您的 Agent

运行您的 Agent，并在[会话页面](https://app.agno.com/sessions)上查看会话。

<Steps>
  <Step title="创建包含示例代码的文件">
    ```python monitoring.py theme={null}
    from agno.agent import Agent

    agent = Agent(markdown=True, monitoring=True)
    agent.print_response("Share a 2 sentence horror story")
    ```
  </Step>

  <Step title="运行您的 Agent">
    ```shell theme={null}
    python monitoring.py
    ```
  </Step>

  <Step title="查看您的会话">
    在 [app.agno.com/sessions](https://app.agno.com/sessions) 查看您的会话

    <img height="200" src="https://mintcdn.com/ikun/fXmeJ7wKTC-4Xav-/images/monitoring.png?fit=max&auto=format&n=fXmeJ7wKTC-4Xav-&q=85&s=9d83064578e36c7464d348a8a9821321" style={{ borderRadius: "8px" }} data-path="images/monitoring.png" />
  </Step>
</Steps>

<Info>遇到问题？请查看我们的[故障排除指南](/faq/cli-auth)</Info>

## 调试日志

想查看 system prompt、用户消息和工具调用吗？

Agno 内置了一个调试器，它将在终端中打印调试日志。在任何 Agent 上设置 `debug_mode=True`，或在您的环境中设置 `AGNO_DEBUG=true`。

```python debug_logs.py theme={null}
from agno.agent import Agent
from agno.models.anthropic import Claude
from agno.tools.yfinance import YFinanceTools

agent = Agent(
    model=Claude(id="claude-sonnet-4-20250514"),
    tools=[YFinanceTools(stock_price=True)],
    instructions="Use tables to display data. Don't include any other text.",
    markdown=True,
    debug_mode=True,
)
agent.print_response("What is the stock price of Apple?", stream=True)
```

运行 Agent 以在终端中查看调试日志：

```shell theme={null}
python debug_logs.py
```

<video autoPlay muted controls className="w-full aspect-video" style={{ borderRadius: '8px' }} src="https://mintcdn.com/ikun/fXmeJ7wKTC-4Xav-/videos/debug_logs.mp4?fit=max&auto=format&n=fXmeJ7wKTC-4Xav-&q=85&s=850fdc1615b978fdaed07709b6e21018" data-path="videos/debug_logs.mp4" />
