Copy
Ask AI
from agno.agent import Agent
from agno.models.fireworks import Fireworks
agent = Agent(
model=Fireworks(id="accounts/fireworks/models/llama-v3p1-70b-instruct"),
markdown=True,
)
agent.print_response("Explain microservices architecture", stream=True)
Tool Use
Copy
Ask AI
from agno.agent import Agent
from agno.models.fireworks import Fireworks
from agno.tools.yfinance import YFinanceTools
agent = Agent(
model=Fireworks(id="accounts/fireworks/models/llama-v3p1-70b-instruct"),
tools=[YFinanceTools(stock_price=True)],
markdown=True,
)
agent.print_response("What's AMZN's stock price?", stream=True)
Structured Output
Copy
Ask AI
from pydantic import BaseModel, Field
from agno.agent import Agent
from agno.models.fireworks import Fireworks
class Summary(BaseModel):
title: str = Field(..., description="Title")
key_points: list[str] = Field(..., description="Key points")
agent = Agent(
model=Fireworks(id="accounts/fireworks/models/llama-v3p1-70b-instruct"),
output_schema=Summary,
)
agent.print_response("Summarize cloud computing benefits")
Run Examples
Copy
Ask AI
export FIREWORKS_API_KEY=xxx
git clone https://github.com/agno-agi/agno.git
cd agno/cookbook/92_models/fireworks
python basic.py
python tool_use.py
python structured_output.py