Set up free AI data analysis with OpenCode and BigQuery

Follow a zero-cost setup that connects the free OpenCode agent to BigQuery and runs a real analysis.

Who it's for: Beginners breaking into data and data professionals who want to add AI to their skill set without paying for tools.

The problem: An AI agent that cannot reach a database can write SQL but cannot run it.

Starting from nothing, the video installs OpenCode with free models through OpenRouter, sets up GitHub and Git, and connects OpenCode to a free BigQuery sandbox through the gcloud CLI. OpenCode then compares programming languages by Stack Overflow reputation and writes the results back to BigQuery.

Takeaways:

  • The BigQuery sandbox needs only a Google account, with no credit card.
  • Keep passwords and API keys out of your chat with the agent.
  • When the agent struggles, have it write the fix into AGENTS.md.

Resources