Building an Economic Dashboard with Codex and FRED Search
Building an economic dashboard means choosing the right data series before writing any frontend code. Which FRED series ID is the right one for inflation? Is there a monthly version or only quarterly? What units does it report in? With AgentPatch connected, Codex can search FRED’s catalog of 800,000+ series to answer these questions while it scaffolds the dashboard.
Why This Matters
Dashboard projects stall at the data selection phase. You know you want to show “inflation” but FRED has dozens of inflation measures: CPI, PCE, core versions of both, trimmed-mean variants, regional breakdowns. Each has a different series ID, frequency, and unit. Picking the wrong one means your dashboard shows the wrong thing or updates at the wrong cadence.
The typical workflow is: open fred.stlouisfed.org, search manually, compare series, copy the ID, paste it into config, repeat for every indicator. Codex with FRED Search collapses that into a conversation — you describe what the dashboard should show, Codex finds the right series, and then uses those IDs directly in the code it generates.
Setup
Add AgentPatch to ~/.codex/config.toml:
[mcp_servers.agentpatch]
url = "https://agentpatch.ai/mcp"
bearer_token_env_var = "AGENTPATCH_API_KEY"
Then set your API key:
export AGENTPATCH_API_KEY=your_api_key
Replace your_api_key with your actual key from the AgentPatch dashboard. Codex discovers all AgentPatch tools automatically on next start.
Example
You’re building a macroeconomic overview dashboard and tell Codex:
“I’m building a dashboard that shows the big picture of the US economy. I need FRED series for: inflation, GDP growth, unemployment, the fed funds rate, and the yield curve. Find the best series for each — monthly frequency where possible, seasonally adjusted.”
Codex searches FRED for each indicator:
Searching FRED for "consumer price index monthly seasonally adjusted"...
Searching FRED for "real gross domestic product"...
Searching FRED for "unemployment rate"...
Searching FRED for "federal funds effective rate"...
Searching FRED for "10-year 2-year treasury spread"...
Here's the series lineup for the dashboard:
- Inflation: CPIAUCSL — CPI All Urban Consumers (monthly, SA, index)
- GDP Growth: GDPC1 — Real GDP (quarterly, SA, billions of chained 2017$)
Note: GDP is only available quarterly. No monthly equivalent.
- Unemployment: UNRATE — Unemployment Rate (monthly, SA, percent)
- Fed Funds: FEDFUNDS — Federal Funds Effective Rate (monthly, not SA, percent)
- Yield Curve: T10Y2Y — 10-Year minus 2-Year Treasury Spread (daily, not SA, percent)
GDP is the only one that's quarterly — the rest are monthly or daily.
T10Y2Y updates daily, so you may want to resample it to monthly to match
the others.
Setting up the dashboard config with these series IDs now...
Codex found the right series for each indicator, flagged the frequency mismatch with GDP, and suggested a resampling approach for the yield curve data. It then used the actual series IDs in the dashboard config — no placeholder strings, no wrong IDs.
If you realize later that you want core inflation instead of headline, you just say so. Codex searches FRED again, finds CPILFESL, and swaps it in.
Wrapping Up
FRED Search lets Codex discover the right economic data series as part of the build process. Each search costs 50 credits, and the companion fred-series-data tool can pull the actual data points once you have the IDs. Both are available through the same AgentPatch connection — along with every other tool on the marketplace. Get started at agentpatch.ai.