Code
Python or TypeScript
Gemini writes. Doconda delivers the file.
Give your Vertex AI agent Doconda's tools and it will deliver finished, editable, reviewed Word, Excel, PowerPoint and PDF files.
Your project and your region
The client is created with `genai.Client(vertexai=True, project=…, location="europe-west1")`. The model must be available in that `location`; if Vertex AI can't find it, check `project` and `location`.
Google Cloud credentials
Vertex AI uses the credentials in your environment: `gcloud auth application-default login` or a service account. Doconda only adds its key in `DOCONDA_API_KEY`.
The schema goes in as is
Gemini takes each tool's JSON Schema unchanged in `parameters_json_schema` (`parametersJsonSchema` in TypeScript). The loop ends when Gemini stops calling functions, and `res.text` has the download links.
- 01Install the SDKpip install doconda or npm install @doconda/sdk, and your API key.
- 02Give your agent the toolsDoconda's tools, in Vertex AI's format.
- 03Your agent delivers the fileYour agent gets the link to the reviewed file.

from doconda import Doconda
from google import genai
from google.genai import types
client = genai.Client(vertexai=True, project="my-project", location="europe-west1")
tools = Doconda().tools()
config = types.GenerateContentConfig(tools=[types.Tool(function_declarations=[
types.FunctionDeclaration(name=t.name, description=t.description,
parameters_json_schema=t.input_schema) for t in tools])])
res = client.models.generate_content(model="gemini-3.8-flash", config=config,
contents="Create a 5-slide deck with the quarter's results")
call = res.function_calls[0] # create_document
out = next(t for t in tools if t.name == call.name).run(dict(call.args))
out["links"] # {"pptx": "https://…", "pdf": "https://…"}
