COOKBOOK_FINANCIAL_ANALYST
COOKBOOKBuild an agent that can fetch real-time stock data, analyze trends, and generate PDF reports.
OVERVIEW#
This recipe demonstrates how to chain multiple tools together: an API fetcher, a data analyzer, and a file generator.
INPUT
"Analyze AAPL and MSFT performance over the last month and summarize the key differences."
→
OUTPUT
"Here is the comparison table and a downloadable PDF report..."
INGREDIENTS#
- AKIOS SDK for the agent loop.
- Yahoo Finance API (or mock) for data.
- PDFKit for report generation.
- Zod for schema validation.
1
Create the Stock Tool
tools/stock.ts
2
Create the Analysis Tool
tools/analyze.ts
3
Assemble the Agent
agent.ts
GOING_FURTHER
Add a generate_chart tool using a library like chart.js or matplotlib (if using python backend) to return image URLs that the agent can display.