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

# Agent with Tools

> Investment analyst agent with financial tools and web interface

## Code

```python a2a_agent_with_tools.py theme={null}
from agno.agent.agent import Agent
from agno.models.openai import OpenAIChat
from agno.os import AgentOS
from agno.os.interfaces.a2a import A2A
from agno.tools.yfinance import YFinanceTools

agent = Agent(
    model=OpenAIChat(id="gpt-5-mini"),
    tools=[
        DuckDuckGoTools(),
    ],
    description="You are an investment analyst that researches stock prices, analyst recommendations, and stock fundamentals.",
    instructions="Format your response using markdown and use tables to display data where possible.",
)

agent_os = AgentOS(
    agents=[agent],
    a2a_interface=True,
)
app = agent_os.get_app()

if __name__ == "__main__":
    agent_os.serve(app="a2a_agent_with_tools:app", reload=True)
```

## Usage

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Set Environment Variables">
    ```bash theme={null}
    export OPENAI_API_KEY=your_openai_api_key
    ```
  </Step>

  <Step title="Install libraries">
    ```bash theme={null}
    pip install -U agno openai ddgs a2a-protocol
    ```
  </Step>

  <Step title="Run Example">
    <CodeGroup>
      ```bash Mac theme={null}
      python a2a_agent_with_tools.py
      ```

      ```bash Windows theme={null}
      python a2a_agent_with_tools.py
      ```
    </CodeGroup>
  </Step>
</Steps>

## Key Features

* **Financial Data Tools**: Real-time stock prices, analyst recommendations, fundamentals via web searches
* **Investment Analysis**: Comprehensive company analysis and recommendations
* **Data Visualization**: Tables and formatted financial information
* **Web Interface**: Professional browser-based interaction
* **GPT-5 Powered**: Advanced reasoning for financial insights
