Great! Below is a **step-by-step guide** to build an **AI agent using Relevance AI** (also known as [Relevance](https://relevance.ai/)) that:
– Goes to the **SEC EDGAR website**
– Searches for a company
– Downloads its last 5 **10-K filings**
– Extracts **Balance Sheet**, **Income Statement**, and **Cash Flow Statement**
– Outputs all into a structured format like **Google Sheets or Excel**
This version uses **no-code tools only**, so it’s perfect for non-technical users.
—
# 🧩 Step-by-Step Guide Using Relevance AI
## 🔹 Step 1: Sign Up for Relevance AI
Go to [https://relevance.ai](https://relevance.ai) and sign up for a free account.
> Relevance allows you to create “agents” that can automate workflows by reading websites, documents, and exporting data to spreadsheets.
—
## 🔹 Step 2: Create a New Agent
Click on **”Create Agent”**.
Name your agent something like:
**“10-K Financial Data Extractor”**
—
## 🔹 Step 3: Define the Agent’s Role
In the “Instructions” or “Agent Prompt” section, write:
> You are an AI agent that finds and downloads the latest 5 annual 10-K filings for a given company from the SEC EDGAR database. You extract the Balance Sheet, Income Statement, and Cash Flow Statement from each filing and organize them in a structured format (e.g., Google Sheets or Excel).
—
## 🔹 Step 4: Set Up Web Interaction — Search SEC EDGAR
Use Relevance’s **”Web Scraper”** tool to interact with the SEC EDGAR site.
### Sub-steps:
1. Go to the **Tools** tab.
2. Click **Add Tool > Web Scraper**.
3. Configure it with this URL:
`https://www.sec.gov/edgar`
Now tell the agent what to do:
> Use the search bar on the SEC EDGAR site to look up the company name provided by the user. Navigate to the company page and find the 10-K filings section. Collect the links to the last 5 years of 10-K filings.
You can use prompts like:
“`
Search for the company “Apple Inc.” on the SEC EDGAR homepage.
Click on the correct result.
Navigate to the 10-K filings section.
Find the most recent 5 filings and collect their PDF links.
“`
—
## 🔹 Step 5: Download and Read Each 10-K
Use Relevance’s **Document Reader** or **PDF Reader** tool to read the downloaded filings.
### Sub-steps:
1. Add a **”Document Reader”** tool.
2. Instruct the agent to:
– For each link found:
– Download the document (usually PDF or HTML).
– Load the content.
– Locate the sections containing:
– Balance Sheet
– Income Statement
– Cash Flow Statement
Prompt example:
> For each 10-K document, extract the full Balance Sheet, Income Statement, and Cash Flow Statement. Make sure to capture the year associated with each statement.
—
## 🔹 Step 6: Structure the Data
Tell the agent how to organize the financial data.
Example instruction:
> Organize the extracted financial statements into a table with columns:
> – Year
> – Metric Name (e.g., Total Revenue, Net Income, etc.)
> – Value
Or if you want separate tables:
> Create three separate tables: one for Balance Sheet, one for Income Statement, and one for Cash Flow Statement, each with the corresponding values for each year.
—
## 🔹 Step 7: Export to Google Sheets
Use Relevance’s **”Google Sheets Integration”** to export the final data.
### Sub-steps:
1. Go to the **Integrations** tab.
2. Connect your **Google Sheets** account.
3. Instruct the agent:
– After collecting and organizing the data,
– Create a new sheet called `[Company Name]_Financials`
– Paste each table (Balance Sheet, Income Statement, Cash Flow) into separate tabs or sections.
Prompt example:
> Export the final structured financial data into a Google Sheet. Create a new tab for each financial statement (Balance Sheet, Income Statement, Cash Flow Statement), and include the year for each row.
—
## 🔹 Step 8: Run the Agent
Now you’re ready to run the agent.
1. Go to the **Chat** tab.
2. Ask the agent:
> Extract the last 5 years of financial statements for Apple Inc.
The agent will:
– Go to SEC EDGAR
– Search for Apple
– Find the 10-Ks
– Download and parse them
– Extract the financial data
– Output it into your Google Sheet
—
# 📁 Optional: Save Templates or Automate More
Once this agent works once, you can:
– Save the configuration as a template
– Reuse it for other companies by just changing the company name
– Schedule recurring runs (if supported)
– Share the Google Sheet with others
—
# ✅ Summary Table
| Step | Action |
|——|——–|
| 1 | Create a new agent in Relevance AI |
| 2 | Give it instructions to scrape SEC EDGAR |
| 3 | Add tools to interact with websites and read documents |
| 4 | Instruct it to extract financial statements |
| 5 | Structure the data |
| 6 | Export to Google Sheets |
| 7 | Test with a company name |
—