Agentic AI powerlifting coach & analytics platform
Live agentic fitness tracker deployed on Railway, processing natural-language workout logs into TimescaleDB hypertables with real-time 1RM projections.
Architecture
Data flow from user interface through API layer to persistence and cloud deployment
The problem
Existing fitness tracking apps require rigid manual data entry. As a powerlifter, I wanted to log a workout the way I actually think about it: "5x3 squat at 315, felt solid." The data still needed to be structured for meaningful analytics.
Approach
I built a Claude tool-use agent as the ingestion layer. The agent receives natural-language input, calls structured tools to parse and validate workout data, then writes time-series records to TimescaleDB hypertables. This kept the AI layer stateless, each ingestion call is independent.
- Claude tool-use agents for NL → structured data parsing
- TimescaleDB hypertables for time-series workout storage
- Continuous aggregates pre-compute 7-day and 30-day rolling windows
- FastAPI handles agent orchestration and REST endpoints
- Streamlit dashboard renders Plotly charts from aggregated data
The hard part
TimescaleDB continuous aggregates require careful schema design upfront. Hypertable chunk intervals need to match your query patterns, too coarse and real-time inserts lag; too fine and the aggregation overhead spikes. I ended up with 1-week chunks and daily aggregates, which gave sub-100ms reads for the dashboard while keeping write latency under 20ms.
What I learned
Tool-use agents are significantly more reliable than free-form LLM output for structured data extraction. By defining strict tool schemas, the agent can't hallucinate fields or types, the API rejects malformed calls before they reach the database.