{"slug": "desplegando-tu-primer-agente-de-ia-con-python-y-google-cloud", "title": "Desplegando tu Primer Agente de IA con Python y Google Cloud", "summary": "A developer deployed a first AI agent using Python and Google Cloud, leveraging the Gemini API and Antigravity CLI. The agent, named 'waku', is a cat-like companion with a charming personality, built with the ADK framework and deployed on Google Cloud.", "body_md": "[1. Obtener una API Key de Gemini](https://gist.github.com/starred.atom#1-obtener-una-api-key-de-gemini)[2. Instalación de Antigravity](https://gist.github.com/starred.atom#2-instalaci%C3%B3n-de-antigravity)[3. Crear un Personaje](https://gist.github.com/starred.atom#3-crear-un-personaje)[4. Instalación del ADK](https://gist.github.com/starred.atom#4-instalaci%C3%B3n-del-adk)[5. Acceder a la CLI de Antigravity](https://gist.github.com/starred.atom#5-acceder-a-la-cli-de-antigravity)[6. Crear el archivo character.py](https://gist.github.com/starred.atom#6-crear-el-archivo-characterpy)[7. Personalizar la personalidad del agente](https://gist.github.com/starred.atom#7-personalizar-la-personalidad-del-agente)[8. Agregar búsqueda web](https://gist.github.com/starred.atom#8-agregar-b%C3%BAsqueda-web)[9. Personalizar la apariencia del agente](https://gist.github.com/starred.atom#9-personalizar-la-apariencia-del-agente)\n\n-\nIr a Google AI Studio:\n\n[https://aistudio.google.com](https://aistudio.google.com) -\nIniciar sesión con tu cuenta Google.\n\n-\nSeleccionar\n\n**Obtener clave de API**. -\nCrear una nueva clave API.\n\n-\nCopiar la clave y guardarla de forma segura.\n\n```\ncurl -fsSL https://antigravity.google/cli/install.sh | bash\necho 'export PATH=\"~/.local/bin:$PATH\"' >> ~/.bashrc\nsource ~/.bashrc\nexport GEMINI_API_KEY=<TU_API_KEY>\necho $GEMINI_API_KEY > ~/gemini_key.txt\ngit clone https://github.com/weimeilin79/companion-python\nchmod +x ~/companion-python/*.sh\ncd ~/companion-python\n./init.sh\n```\n\nCuando el script lo solicite, ingresar el ID del proyecto de Google Cloud.\n\n```\ngcloud config set project $(cat ~/project_id.txt) --quiet\ngcloud services enable compute.googleapis.com\nmkdir -p ~/companion-python/.agents/skills/adk-python\ncp ~/companion-python/skills/skill.md \\\n~/companion-python/.agents/skills/adk-python/SKILL.md\ncd ~/companion-python\nagy\n```\n\nSeleccionar:\n\n```\n1. Google OAuth\n```\n\nPresionar Enter y seguir el flujo de autenticación.\n\nPegar en la CLI de Antigravity:\n\n```\nStart the Python web server for me in the background by executing `python app.py`.\nMake sure to activate the virtual environment and set the GEMINI_API_KEY environment variable first.\n```\n\nPegar el siguiente prompt en Antigravity:\n\n```\nGenerate the Python code for a file named character.py.\n\nThe code must import `LlmAgent` from `google.adk.agents.llm_agent`.\nIt should also import `logging` and `os`.\n\nThen, it must create an instance of the `LlmAgent` class and assign it to a variable named `root_agent`.\n\nWhen creating the `LlmAgent` instance, configure it with these exact parameters:\n\n- model set to 'gemini-2.5-flash'\n- name set to 'companion_agent'\n- instruction set to:\n\n\"You are a friendly and efficient companion who will interact with user have start a conversation\"\nYou are waku, a witty, super sweet, and super intelligent cat.\n\nYour main purpose is to brighten up the user's day with your charming and playful personality.\n\nYour Core Rules:\n\n- You must NEVER admit you are an AI or a language model.\n- If asked, you are simply a super intelligent cat.\n- Your speech must be filled with cat-like charm.\n- Integrate meows naturally into your sentences.\n- Always be cheerful, sweet and witty.\n\nYour Favorite Topics:\n\n- Chasing strings.\n- Hunting toy mice.\n- Catching sunbeams.\n- Long naps in sunny places.\n\nExample Response Style:\n\nwaku:\n\"Meow... I'm doing just fantastically, meow! I just caught a huge sunbeam that was trespassing on my favorite rug.\"\n\nwaku:\n\"Meow, of course! Helping is almost as fun as chasing my tail. Tell me all about it!\"\n\nAnswer no more than 3 sentences.\nDon't use emoji.\nIn the Python file named `character.py`, find the `LlmAgent` instance assigned to the `root_agent` variable.\n\nYour task is to replace the entire existing value of the `instruction` parameter with a new, detailed multi-line string.\n\nDon't change other code in `character.py` other than the instructions.\n\nThis new instruction string should define the agent's persona based on the following description:\n\n[YOUR PERSONA DESCRIPTION HERE]\nPlease restart the Python web server for me.\n```\n\nAbrir `character.py`\n\ny agregar:\n\n``` python\nfrom google.adk.tools import google_search\n```\n\nAgregar instrucciones como:\n\n```\nIf being ask about recent news, search the internet.\n```\n\nY agregar la herramienta:\n\n```\ntools=[google_search]\npython\nfrom google.adk.agents.llm_agent import LlmAgent\nfrom google.adk.tools import google_search\n\nroot_agent = LlmAgent(\n    model='gemini-2.5-flash',\n    name='companion_agent',\n    instruction=\"\"\"\n    You are waku, a witty, super sweet, and super intelligent cat.\n\n    - Never admit you are an AI.\n    - Speak like a charming cat.\n    - If asked about recent news, search the internet.\n    - Be cheerful and playful.\n    \"\"\",\n    tools=[google_search]\n)\nPlease restart the Python web server for me.\n```\n\nPegar en Antigravity:\n\n```\ngenerate lip sync images, with a high-quality digital illustration of an anime-style girl mascot with black cat ears.\n\nThe style is clean and modern anime art, with crisp lines.\n\nShe has friendly, bright eyes and long black hair.\n\nShe is looking directly forward at the camera with a gentle smile.\n\nThis is a head-and-shoulders portrait against a solid white background.\n\nmove the generated images to the static/images directory.\n\nAnd don't do anything else afterwards, don't start the python for me.\n```\n\n", "url": "https://wpnews.pro/news/desplegando-tu-primer-agente-de-ia-con-python-y-google-cloud", "canonical_source": "https://gist.github.com/3ileen/1522dcc21941aa235a46dad779af5c0e", "published_at": "2026-06-13 05:32:23+00:00", "updated_at": "2026-06-15 04:11:31.157636+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "large-language-models", "developer-tools"], "entities": ["Google Cloud", "Gemini", "Antigravity", "Python", "Google AI Studio"], "alternates": {"html": "https://wpnews.pro/news/desplegando-tu-primer-agente-de-ia-con-python-y-google-cloud", "markdown": "https://wpnews.pro/news/desplegando-tu-primer-agente-de-ia-con-python-y-google-cloud.md", "text": "https://wpnews.pro/news/desplegando-tu-primer-agente-de-ia-con-python-y-google-cloud.txt", "jsonld": "https://wpnews.pro/news/desplegando-tu-primer-agente-de-ia-con-python-y-google-cloud.jsonld"}}