Skip to main content
Install google-genai and doconda (or the AI SDK with @ai-sdk/google-vertex) and declare doconda.tools() as Gemini functions. When you ask for a spreadsheet, Gemini calls create_document with format: "xlsx" and you get an Excel file with real formulas and its PDF, with their download links.

Steps

  1. Authenticate with Google Cloud (gcloud auth application-default login or a service account) and have a project with Vertex AI enabled.
  2. Put your Doconda API key (dashboard → API keys) in DOCONDA_API_KEY.
  3. Declare the tools and run the loop: while Gemini asks for functions, run them and hand back the result.
parameters_json_schema (parametersJsonSchema in @google/genai) takes each tool’s JSON Schema as is.

What you get back

  • An Excel file with real formulas (not pasted numbers), with the assumptions in their own cells, and its PDF.
  • status: ready, ready_with_warnings, needs_review or failed (not charged).
  • Links expire after 5 minutes; the agent gets fresh ones with get_document.

FAQ

Yes, it’s the same code without vertexai=True. See the Gemini guide.
Yes. Upload your files with upload_file and the agent passes them as sources (up to 5 documents: Word, PowerPoint, Excel, PDF, TXT or Markdown).
Documents and files are stored in the European Union (Ireland), and the AI that processes them also runs in the EU.
You pay per delivered document; failed ones are not charged. See pricing.

Keep reading