How redbarron23/obs-agent works
obs-agent answers natural-language Azure and GCP logging-cost questions using an LLM tool-use loop over deterministic synthetic data. Users enter through the CLI/REPL or Streamlit chat; the agent calls cost-analysis tools, receives formatted results, and returns a concise answer, with streaming and conversation history supported. The graph also preserves provider integration and the documented evaluation harness. Source excerpts show the main calls; provider API behavior and some agent-loop details are documented in the README.
Main entry points: tools.py Tool dispatch · agent.py Agent loop · data.py Billing DataFrames · evals.py Ground-truth evals
Components 13
User interfaces
- CLI / REPL
agent.py - Streamlit chat
app.py
Agent runtime
- Agent loop
agent.py - LLM providers
agent.py
Cost analysis
- Tool dispatch
tools.py - Azure overages
tools.py - GCP rankings
tools.py - Daily trends
tools.py - Spike detection
tools.py - Cross-cloud comparison
tools.py
Synthetic billing data
- Billing DataFrames
data.py
Evaluation
- Ground-truth evals
evals.py
Other components
- Cost analyst
Connections 19
- Cost analyst → CLI / REPL: asks
README.md - Cost analyst → Streamlit chat: asks
README.md - CLI / REPL → Agent loop: runs
README.md - Streamlit chat → Agent loop: calls
app.py - Agent loop → LLM providers: requests
README.md - LLM providers → Agent loop: returns response
README.md - Agent loop → Tool dispatch: dispatches tools
README.md - Tool dispatch → Azure overages: invokes
tools.py - Tool dispatch → GCP rankings: invokes
tools.py - Tool dispatch → Daily trends: invokes
tools.py - Tool dispatch → Spike detection: invokes
tools.py - Tool dispatch → Cross-cloud comparison: invokes
tools.py - Azure overages → Billing DataFrames: reads
tools.py - GCP rankings → Billing DataFrames: reads
tools.py - Daily trends → Billing DataFrames: reads
tools.py - Spike detection → Billing DataFrames: reads
tools.py - Cross-cloud comparison → Billing DataFrames: reads
tools.py - Ground-truth evals → Tool dispatch: dry-run checks
evals.py - Ground-truth evals → Agent loop: live checks
evals.py