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

# Finance Agent

> Summarize stock fundamentals with a YFinance analyst agent on LangDB.

```python finance_agent.py theme={null}
"""Run `uv pip install yfinance` to install dependencies."""

from agno.agent import Agent
from agno.models.langdb import LangDB
from agno.tools.yfinance import YFinanceTools

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------

agent = Agent(
    model=LangDB(id="llama3-1-70b-instruct-v1.0"),
    tools=[YFinanceTools()],
    description="You are an investment analyst that researches stocks and helps users make informed decisions.",
    instructions=["Use tables to display data where possible."],
    markdown=True,
)

# agent.print_response("Share the NVDA stock price and analyst recommendations", stream=True)
agent.print_response("Summarize fundamentals for TSLA", stream=True)

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------

if __name__ == "__main__":
    pass
```

## Run the Example

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

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno openai yfinance
    ```
  </Step>

  <Step title="Export environment variables">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export LANGDB_API_KEY="your_langdb_api_key_here"
      export LANGDB_PROJECT_ID="your_langdb_project_id_here"
      ```

      ```bash Windows theme={null}
      $Env:LANGDB_API_KEY="your_langdb_api_key_here"
      $Env:LANGDB_PROJECT_ID="your_langdb_project_id_here"
      ```
    </CodeGroup>
  </Step>

  <Step title="Run the example">
    Save the code above as `finance_agent.py`, then run:

    ```bash theme={null}
    python finance_agent.py
    ```
  </Step>
</Steps>

Full source: [cookbook/90\_models/langdb/finance\_agent.py](https://github.com/agno-agi/agno/blob/main/cookbook/90_models/langdb/finance_agent.py)
