<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mohammad Omar on Medium]]></title>
        <description><![CDATA[Stories by Mohammad Omar on Medium]]></description>
        <link>https://medium.com/@mohammad-omar?source=rss-d0d212a40df5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*uUn8lB7Wnukfh6JxyFMvnQ.jpeg</url>
            <title>Stories by Mohammad Omar on Medium</title>
            <link>https://medium.com/@mohammad-omar?source=rss-d0d212a40df5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 08:20:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mohammad-omar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Deploy an AI App to Cloud Run With No Keys: GitHub Actions, Workload Identity Federation, and…]]></title>
            <link>https://mohammad-omar.medium.com/deploy-an-ai-app-to-cloud-run-with-no-keys-github-actions-workload-identity-federation-and-b9af86c24c23?source=rss-d0d212a40df5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9af86c24c23</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Mohammad Omar]]></dc:creator>
            <pubDate>Sun, 22 Nov 2026 23:13:34 GMT</pubDate>
            <atom:updated>2026-11-22T23:13:34.903Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deploy an AI App to Cloud Run With No Keys: GitHub Actions, Workload Identity Federation, and Gemini</h3><p><em>The code, commands and the full working folder is on GitHub: </em><a href="https://github.com/mohammad0omar/gcp-ai-in-production/tree/main/01-keyless-ai-app"><em>01-keyless-ai-app</em></a><em>.</em></p><figure><img alt="Terminal window showing the real pytest run of the 01-keyless-ai-app tests: 18 tests collected, each listed as PASSED with a percentage, ending in a passed summary line." src="https://cdn-images-1.medium.com/max/1024/1*ExUJIN1oROindHpBgNwFag.jpeg" /></figure><p>Harbor Lane is a small team that manages rental properties. Their support staff write short notes about tenant problems: a door code that stopped working, a heater that makes a noise. The team built a small FastAPI service that reads one note and returns a two-sentence summary from Gemini. It runs on Cloud Run.</p><p>Deploying it raised one question: how does GitHub Actions get permission to deploy to Google Cloud?</p><p>The quick answer is a service account key. You create a JSON file, paste it into a GitHub secret, and the workflow uses it. It works on the first try. It also puts a long-lived credential in a place that many people can reach, and it leaves you with a second secret to guard: the Gemini API key the app uses at runtime.</p><p>This tutorial builds the other answer. There is no service account key and no Gemini API key anywhere. GitHub proves who it is with a short-lived token. Google checks that token against a rule. Two separate service accounts do two separate jobs. At the end, an optional policy makes it impossible to create a key in the project at all.</p><p>This post walks through the working folder in the same order as its README, and says why each choice is there.</p><p>The code is checked with unit tests and static checks; see <a href="https://github.com/mohammad0omar/gcp-ai-in-production/tree/main/01-keyless-ai-app#how-this-was-checked">How this was checked</a> in the folder README.</p><h3>What we are building</h3><p>Here is the whole chain. Read it once and the rest of the post is detail.</p><figure><img alt="Diagram of the identity chain. In the deploy job, a GitHub OIDC token goes to Google STS, where an attribute condition checks repository id, owner id and main, and then to the deploy service account. The deploy sets the runtime service account on Cloud Run. At run time, Cloud Run uses the runtime service account to call Gemini 3.8 Flash with Application Default Credentials." src="https://cdn-images-1.medium.com/max/896/1*Ip_E3td9B2dVhr6aQH0qfg.jpeg" /></figure><p>Four ideas carry the design:</p><ol><li><strong>GitHub gives each job an OIDC token.</strong> It is a signed statement that says “this job runs in repository X, on branch Y.” The workflow asks for it with one permission, id-token: write.</li><li><strong>Google trusts that token only if a rule says so.</strong> A Workload Identity Pool and provider hold the rule. Tokens that do not match are refused before anything else happens.</li><li><strong>There are two service accounts.</strong> One deploys. One runs the app. Neither has a key.</li><li><strong>The app finds its identity by itself.</strong> Cloud Run gives the service the runtime account, and the Google client library picks it up through Application Default Credentials (ADC). The app has no credential setting to get wrong.</li></ol><h3>Why not just use a key?</h3><p>A service account key is a file. That is the whole problem. A file can be copied, and a copy works from anywhere until someone finds it and deletes it. <a href="https://docs.cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys">Google’s own guidance on service account keys</a> covers the risks and the alternatives, and for GitHub Actions an alternative exists.</p><p>A key lives in a GitHub secret, on the laptop that created it, and sometimes in a chat pasted to debug a failing deploy. Each copy can leak, and you control none of them. The same goes for a Gemini API key in an environment variable.</p><p>With federation there is nothing to copy. The GitHub token exists for one job. It is useless without the rule on the Google side that accepts it. And the rule is narrow, as you will see in step 3.</p><h3>Before you start</h3><p>You need a Google Cloud project you can bill. Use a disposable one, because the clean up is easiest if you can delete the whole project. You need gcloud, terraform, and the gh CLI, and you must run gh auth login first because step 1 calls gh api. You also need these permissions on the project: Project IAM Admin, Service Account Admin, Workload Identity Pool Admin, Service Usage Admin, and Artifact Registry Administrator. To grant yourself invoke rights and read the service URL in step 6, you also need Cloud Run Admin on the project, or at least run.services.get, run.services.getIamPolicy and run.services.setIamPolicy. For the optional key policy at the end, see the requirements in that section.</p><p>These steps change your project. Run them yourself, in your own project, and read the Terraform plan before you apply it.</p><h3>Step 1: Sign in and set the variables</h3><p>Sign in with gcloud twice. The first login is for the gcloud commands. The second, gcloud auth application-default login, gives Terraform its credentials. Then set the variables the rest of the steps use.</p><p>From README.md:</p><pre>gcloud auth login<br>gcloud auth application-default login<br>export PROJECT_ID=YOUR_PROJECT_ID REGION=europe-west1 REPO=OWNER/NAME<br>gcloud config set project &quot;$PROJECT_ID&quot;<br>export REPO_ID=$(gh api &quot;repos/$REPO&quot; --jq .id) OWNER_ID=$(gh api &quot;repos/$REPO&quot; --jq .owner.id)</pre><p>Look at the last line. It asks GitHub for two numbers: the numeric id of the repository, and the numeric id of its owner. Keep them. They matter in step 3.</p><p>REGION is where Cloud Run and Artifact Registry live. Gemini is called in a different location, global, set by GEMINI_LOCATION in config.py. The <a href="https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/3-8-flash">Gemini 3.8 Flash model page</a> lists global and the us and eu multi-regions for pay-as-you-go use, and does not list europe-west1. That is why the service runs in one place and calls the model in another. Check the page before you change either.</p><h3>Step 2: Enable the one API Terraform needs</h3><p>Terraform enables the other APIs for you, but it needs the Service Usage API to do that. Enable it, and the Resource Manager API, by hand first:</p><p>gcloud services enable serviceusage.googleapis.com cloudresourcemanager.googleapis.com</p><p>The rest come from one list, REQUIRED_APIS in config.py. A test keeps that list in step with the Terraform list, so the two cannot drift apart without a failing build.</p><h3>Step 3: Create the identity setup with Terraform</h3><p>This is the core of the tutorial. One terraform apply creates the service accounts, the roles, the pool, the provider, and the binding that connects GitHub to the deploy account. Run the commands from the folder that holds the README:</p><p>From README.md:</p><pre>terraform -chdir=terraform init<br>terraform -chdir=terraform apply -var project_id=&quot;$PROJECT_ID&quot; -var region=&quot;$REGION&quot; \<br>  -var github_repo=&quot;$REPO&quot; -var github_repository_id=&quot;$REPO_ID&quot; -var github_owner_id=&quot;$OWNER_ID&quot;</pre><p>Run plan first if you want to read what it will create. The sections below go through terraform/main.tf in the order it creates things, and explain each decision.</p><h4>Two service accounts, and why</h4><p>The two accounts are notes-deploy and notes-runtime, defined at the top of terraform/main.tf. Neither has a key.</p><p>Why two? Because the two jobs have almost nothing in common, and a service account should hold only what its job needs.</p><p>The deploy account changes infrastructure. It creates Cloud Run revisions and pushes images. It runs for a few minutes, inside a GitHub job, and it is the account an attacker would want.</p><p>The runtime account does one thing: call Gemini on behalf of the app. It runs on every request, inside your container, next to code that handles input from users. If a bug or an injection gives someone control of that code, they inherit the runtime account. You want that account to be almost useless.</p><p>If both jobs used one account, the app would carry deploy rights. A flaw in the summariser could then become a flaw in your infrastructure. With two accounts, a flaw in the summariser reaches only what the runtime account can do, and that is far less than deploying. The role in this tutorial is still broad, as the next sections explain.</p><h4>What the deploy account may do</h4><p>From terraform/main.tf:</p><pre># Deployer: deploy Cloud Run, push images, and act as the runtime account (below).<br># Cloud Run Admin, not Developer: the Cloud Run docs say changing invoker access (the<br># --no-allow-unauthenticated and --invoker-iam-check flags in the workflow) needs<br># run.services.setIamPolicy, which Developer lacks. Limitation: this covers every service in the<br># project, so use a project that only holds this service.<br>resource &quot;google_project_iam_member&quot; &quot;deploy_run_admin&quot; {<br>  project = var.project_id<br>  role    = &quot;roles/run.admin&quot;<br>  member  = &quot;serviceAccount:${google_service_account.deploy.email}&quot;<br>}<br> <br>resource &quot;google_artifact_registry_repository_iam_member&quot; &quot;deploy_push&quot; {<br>  repository = google_artifact_registry_repository.images.name<br>  location   = google_artifact_registry_repository.images.location<br>  role       = &quot;roles/artifactregistry.writer&quot;<br>  member     = &quot;serviceAccount:${google_service_account.deploy.email}&quot;<br>}<br> <br>resource &quot;google_service_account_iam_member&quot; &quot;deploy_acts_as_runtime&quot; {<br>  service_account_id = google_service_account.runtime.name<br>  role               = &quot;roles/iam.serviceAccountUser&quot;<br>  member             = &quot;serviceAccount:${google_service_account.deploy.email}&quot;<br>}</pre><p>The deploy account gets three things: Cloud Run Admin on the project, write access to one Artifact Registry repository, and permission to act as the runtime account.</p><p>The third one is easy to miss. To deploy a service that runs as another service account, the deployer needs roles/iam.serviceAccountUser on that account. The binding is on the runtime account only, not on the whole project. The deployer can hand out that one identity and no other.</p><p>The comment in the code explains why the role is Cloud Run Admin and not the smaller Developer role. The workflow in step 5 changes who may invoke the service, with --no-allow-unauthenticated. The <a href="https://docs.cloud.google.com/run/docs/authenticating/public">Cloud Run docs</a> say that needs run.services.setIamPolicy, which the Developer role lacks. That has a cost, and the code says so: Cloud Run Admin covers every service in the project. Use a project that holds only this service.</p><h4>What the runtime account may do</h4><p>From terraform/main.tf:</p><pre># Runtime: the predefined Agent Platform User role, which is the documented way to call Gemini.<br>resource &quot;google_project_iam_member&quot; &quot;runtime_gemini&quot; {<br>  project = var.project_id<br>  role    = &quot;roles/aiplatform.user&quot;<br>  member  = &quot;serviceAccount:${google_service_account.runtime.email}&quot;<br>}</pre><p>The runtime account gets the predefined roles/aiplatform.user role, called &quot;Agent Platform User&quot; in the <a href="https://docs.cloud.google.com/vertex-ai/docs/general/access-control">current IAM docs</a> (Vertex AI is now part of the Gemini Enterprise Agent Platform). It is the documented role for calling Gemini, and it is the only role this account has. It cannot deploy, and it has no rights on your Cloud Run service. But it is a broad role: it allows more than calling Gemini. For example, it also covers creating, deleting and exporting Agent Platform datasets, as the <a href="https://docs.cloud.google.com/iam/docs/roles-permissions/aiplatform">Agent Platform permissions list</a> shows. If someone takes over the runtime identity, the damage depends on what else lives in the project, so keep the project small.</p><p>That is why a tested custom role is the next step. The <a href="https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1/projects.locations.endpoints/generateContent">generateContent API reference</a> names the permission aiplatform.endpoints.predict for the call. The folder does not use it, because it was not tested on a real project. Test a custom role yourself, with a first call and a redeploy, before you rely on it.</p><h4>The pool, the provider, and the condition</h4><p>Now the part that replaces the key.</p><p>From terraform/main.tf:</p><pre># Workload Identity Federation: trust GitHub&#39;s OIDC tokens for one repo, main branch only.<br>resource &quot;google_iam_workload_identity_pool&quot; &quot;github&quot; {<br>  workload_identity_pool_id = &quot;github&quot;<br>  display_name              = &quot;GitHub Actions&quot;<br> <br>  depends_on = [google_project_service.api]<br>}<br> <br>resource &quot;google_iam_workload_identity_pool_provider&quot; &quot;github&quot; {<br>  workload_identity_pool_id          = google_iam_workload_identity_pool.github.workload_identity_pool_id<br>  workload_identity_pool_provider_id = &quot;github-oidc&quot;<br>  display_name                       = &quot;GitHub OIDC&quot;<br>  description                        = &quot;Deploys from ${var.github_repo}, main branch only&quot;<br> <br>  attribute_mapping = {<br>    &quot;google.subject&quot;                = &quot;assertion.sub&quot;<br>    &quot;attribute.repository_id&quot;       = &quot;assertion.repository_id&quot;<br>    &quot;attribute.repository_owner_id&quot; = &quot;assertion.repository_owner_id&quot;<br>    &quot;attribute.ref&quot;                 = &quot;assertion.ref&quot;<br>  }<br> <br>  # Numeric ids cannot be reclaimed by a new repository with the same name.<br>  # Tokens from any other repository, owner or branch are rejected before any impersonation.<br>  attribute_condition = &quot;assertion.repository_id == &#39;${var.github_repository_id}&#39; &amp;&amp; assertion.repository_owner_id == &#39;${var.github_owner_id}&#39; &amp;&amp; assertion.ref == &#39;refs/heads/main&#39;&quot;<br> <br>  oidc {<br>    issuer_uri = &quot;https://token.actions.githubusercontent.com&quot;<br>  }<br>}</pre><p>A Workload Identity Pool is a container for outside identities. The provider says “I trust tokens from this issuer,” here GitHub’s OIDC issuer. The attribute_mapping copies fields from the GitHub token into attributes Google can reason about. The attribute_condition is the rule, and it is the most important line in the folder.</p><figure><img alt="Code view of terraform/main.tf lines 97 to 110: the attribute mapping and the attribute condition that accepts only the repository id, the owner id and the main branch, with the GitHub OIDC issuer below." src="https://cdn-images-1.medium.com/max/1024/1*IZBbqdbuLIjU7mtMVNXhUg.jpeg" /></figure><p>Read the condition slowly. A token is accepted only when all three of these are true:</p><ul><li>assertion.repository_id equals your repository&#39;s numeric id.</li><li>assertion.repository_owner_id equals the numeric id of its owner.</li><li>assertion.ref equals refs/heads/main.</li></ul><p><strong>Why the numeric id and not the name?</strong> A name is not a stable identity. If you delete a repository, or rename it, someone else can create a new repository with the old name. A condition that matches on owner/name would then trust a stranger&#39;s repository. A numeric id is assigned once and is not reused. Google&#39;s <a href="https://docs.cloud.google.com/iam/docs/workload-identity-federation-with-deployment-pipelines">workload identity federation guide for deployment pipelines</a> recommends the numeric repository id and owner id in conditions for this reason. The comment in the code says the same: numeric ids cannot be reclaimed by a new repository with the same name.</p><p><strong>Why pin the owner id as well as the repository id?</strong> It is a second check on the same idea, and it costs one line. Both numbers have to match.</p><p><strong>Why pin the branch?</strong> Without it, any branch in your repository could get a token and deploy to production. A pull request from a branch, or a workflow someone adds in a feature branch, would reach the deploy account. With refs/heads/main, pushes from other branches fail at the token exchange, before any impersonation happens.</p><p>Be precise about what this proves. The condition proves that the job runs for this repository, owner and refs/heads/main. It does not check which workflow file ran or which event started it. The workflow builds github.sha, which on a push to main is the pushed commit. What makes that code reviewed is branch protection on main, required review, and CODEOWNERS on .github/workflows. To make one workflow the boundary, also constrain the workflow_ref and event_name claims, which the <a href="https://docs.github.com/en/actions/reference/security/oidc">GitHub OIDC docs</a> list.</p><p>So a workflow on a feature branch cannot deploy, and the error says it could not get a token. That is the rule working. For preview deploys, use a separate pool and a weaker service account. Do not loosen this one.</p><h4>Let GitHub impersonate the deploy account</h4><p>From terraform/main.tf:</p><pre># Let identities from that repository impersonate the deploy account.<br>resource &quot;google_service_account_iam_member&quot; &quot;github_impersonates_deploy&quot; {<br>  service_account_id = google_service_account.deploy.name<br>  role               = &quot;roles/iam.workloadIdentityUser&quot;<br>  member             = &quot;principalSet://iam.googleapis.com/${google_iam_workload_identity_pool.github.name}/attribute.repository_id/${var.github_repository_id}&quot;<br>}</pre><p>The condition decides which tokens get in. This binding decides what they may do once in: impersonate the deploy account through roles/iam.workloadIdentityUser, and nothing else. The member is a principalSet that matches the attribute.repository_id you mapped earlier.</p><p>So there are two locks. The provider condition keeps wrong tokens out. The binding limits what the right tokens can reach. Neither one holds a secret.</p><p>The values you need for the next step come from the Terraform outputs in terraform/outputs.tf. They are names and resource paths, not credentials.</p><p>A note on recreating the repository: because the pool trusts numeric ids, deleting and recreating the repository gives it a new id, and you must run terraform apply again with the new values. That is the design working as intended.</p><h3>Step 4: Set the repository variables in GitHub</h3><p>In GitHub, open Settings, then Secrets and variables, then Actions, then the Variables tab. Add five repository variables. Set the first two from the variables you exported in step 1, and take the other three from terraform -chdir=terraform output:</p><ul><li>GCP_PROJECT_ID, the same $PROJECT_ID</li><li>GCP_REGION, the same $REGION</li><li>WORKLOAD_IDENTITY_PROVIDER, from the output workload_identity_provider</li><li>DEPLOY_SERVICE_ACCOUNT, from deploy_service_account</li><li>RUNTIME_SERVICE_ACCOUNT, from runtime_service_account</li></ul><p>Use variables, not secrets. None of these values lets anyone do anything. They are identifiers. The workflow file in this folder reads no repository secret at all, and a test checks that.</p><h3>Step 5: Add the workflow and the app, then push to main</h3><p>Copy .github-example/deploy.yml to .github/workflows/deploy.yml in your repository. Copy app/, config.py, Dockerfile and .dockerignore to the repository root next to it. Also add gha-creds-*.json to your own .gitignore: the auth action may write a credential file with that name, and the folder&#39;s .dockerignore already keeps it out of the image. Push to main.</p><p>The workflow is short. Here are its parts.</p><h4>Ask for the token, and nothing more</h4><p>From .github-example/deploy.yml:</p><pre>permissions:<br>  id-token: write # lets the job ask GitHub for an OIDC token<br>  contents: read</pre><p>id-token: write lets the job request an OIDC token. It does not give write access to anything in the repository, and the second line keeps repository access at read-only. These are the only two permissions the workflow has.</p><h4>One deploy at a time</h4><p>Two pushes in a row start two runs, and the older one can finish last and overwrite the newer deploy. The concurrency group queues runs, and cancel-in-progress: false lets a running deploy finish instead of being cut off halfway. GitHub keeps only one waiting run per group, so a queued run can be replaced by a newer one, and a run can stop at the head check below. If no run has deployed the current head, start the workflow by hand with workflow_dispatch on main.</p><h4>Build first, then log in</h4><p>From .github-example/deploy.yml:</p><pre># Build first: the Google credentials below then live for less time.<br>      - name: Build the image<br>        run: docker build -t &quot;$IMAGE&quot; .<br> <br>      - uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0<br>        with:<br>          workload_identity_provider: ${{ vars.WORKLOAD_IDENTITY_PROVIDER }}<br>          service_account: ${{ vars.DEPLOY_SERVICE_ACCOUNT }}<br> <br>      - uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1<br> <br>      - name: Push the image<br>        run: |<br>          gcloud auth configure-docker &quot;${REGION}-docker.pkg.dev&quot; --quiet<br>          docker push &quot;$IMAGE&quot;</pre><p>The image builds before the Google login. That is deliberate, as the comment says: the Google credentials then live for less time.</p><p>The google-github-actions/auth step takes two inputs, the provider and the deploy service account. It reads the OIDC token, exchanges it at Google&#39;s Security Token Service, and the job then acts as the deploy account. No service account key file and no stored Google Cloud secret is involved. The action can write a temporary gha-creds-*.json file, which is a credential configuration that points at the token exchange, not a key, and its post-job step removes it. The <a href="https://github.com/google-github-actions/auth">action&#39;s repository</a> documents the inputs.</p><p>Notice that every uses: line in the workflow pins a full commit SHA, with the version in a comment. A tag can be moved. A SHA cannot.</p><h4>Do not let an old run deploy</h4><p>The step named “Skip if main has moved on” asks GitHub for the current head of main. If it is not the commit this run is building, the run stops with an error. It is a check of main at that moment, and it guards against a quiet problem: an older run overwriting a newer release. The queue does not guarantee the newest commit deploys, because a run can fail. If no run has succeeded for the current head, dispatch the workflow by hand on main. The most common way to hit it is to re-run an old workflow run. Do not do that to redeploy. Push a commit, or start the workflow by hand with workflow_dispatch on main. The workflow has both triggers, and the job runs only when github.ref is refs/heads/main.</p><h4>The deploy, and why it is not public</h4><p>From .github-example/deploy.yml:</p><pre># --no-allow-unauthenticated removes the service-level allUsers grant; --invoker-iam-check turns the<br>      # Invoker check back on in case someone disabled it. The service stays private.<br>      - name: Deploy to Cloud Run<br>        run: |<br>          gcloud run deploy note-summariser \<br>            --image &quot;$IMAGE&quot; \<br>            --region &quot;$REGION&quot; \<br>            --service-account &quot;$RUNTIME_SA&quot; \<br>            --set-env-vars &quot;GOOGLE_CLOUD_PROJECT=$PROJECT&quot; \<br>            --no-allow-unauthenticated \<br>            --invoker-iam-check</pre><p>Three flags here are production choices, not defaults.</p><p><strong>--service-account &quot;$RUNTIME_SA&quot;</strong> runs the new revision as the runtime account from step 3. If you leave this out, Cloud Run uses the project&#39;s default compute service account, which often has far more access than your app needs. This flag is how the two-account split becomes real.</p><p><strong>--no-allow-unauthenticated</strong> removes the service-level public grant (allUsers), so callers then need the Cloud Run Invoker role and a Google-signed ID token. An AI endpoint that anyone on the internet can call is a billing endpoint that anyone can call. Without the public grant, a leaked URL is not a leaked wallet. The flag does not remove other grants, and a broad grant inherited from the project can still allow calls, so check who can invoke an existing service before you rely on it.</p><p><strong>--invoker-iam-check</strong> turns the Invoker check back on if someone disabled it. The <a href="https://docs.cloud.google.com/run/docs/authenticating/public">Cloud Run docs</a> describe the check as on by default, and say that disabling or re-enabling it needs permissions in roles/run.admin. Passing the flag on every deploy means the next deploy repairs a service that was quietly opened up.</p><h4>The app that runs behind it</h4><p>The app never touches a credential. Here is how it gets its identity.</p><p>From app/main.py:</p><pre>def get_client() -&gt; genai.Client:<br>    &quot;&quot;&quot;Create the client once, on first use, even when cold requests arrive together.&quot;&quot;&quot;<br>    global _client<br>    with _client_lock:<br>        if _client is None:<br>            # Vertex mode with no key: the client finds the Cloud Run service account through ADC.<br>            _client = genai.Client(<br>                vertexai=True,<br>                project=os.environ[&quot;GOOGLE_CLOUD_PROJECT&quot;],<br>                location=GEMINI_LOCATION,<br>                http_options=types.HttpOptions(timeout=GEMINI_TIMEOUT_SECONDS * 1000),  # milliseconds<br>            )<br>    return _client</pre><p>Look at what is missing. There is no api_key=, no path to a JSON file, no secret read from the environment. The only environment value is GOOGLE_CLOUD_PROJECT, a project name, which the workflow sets with --set-env-vars. With vertexai=True and no key, the google-genai client uses ADC, which on Cloud Run means the runtime service account. The runtime account then needs only the permission from step 3.</p><p>The timeout is worth a line. The client sets a 30 second HTTP transport timeout, written in config.py and converted to milliseconds. It is not an end-to-end deadline for the whole request. Cloud Run&#39;s own request timeout is longer.</p><p>The rest of the file maps failures to status codes. The pinned google-genai==3.6.1 in app/requirements.txt keeps the SDK from changing under you between deploys. That matters here because of the timeout case: the SDK&#39;s HTTP library differs between versions, so the code looks up the transport errors by name instead of importing one library.</p><p>The code looks up the transport errors by name (_transport_errors() in app/main.py), so a missing library cannot stop the app from starting, and a timeout or network failure is caught either way. When Gemini is busy or rate limited, the service answers 503 with Retry-After: 5. A transport timeout or network failure returns 504, and an empty or blocked answer returns 502, not a blank 200. One warning from the README applies if your caller retries POST requests: each retry can be billed as another Gemini call.</p><h3>Step 6: Call the service</h3><p>The service has no public grant, so your own account needs permission to invoke it. Grant yourself the Invoker role (the curl uses your active gcloud account, which must be the account you named; a new IAM binding can take a few minutes to propagate, so retry a 403 after a short wait), read the service URL (the commands name your project with --project), and send a request with an identity token.</p><p>From README.md:</p><pre>gcloud run services add-iam-policy-binding note-summariser --region &quot;$REGION&quot; --project &quot;$PROJECT_ID&quot; \<br>  --member &quot;user:YOU@example.com&quot; --role roles/run.invoker<br>URL=$(gcloud run services describe note-summariser --region &quot;$REGION&quot; --project &quot;$PROJECT_ID&quot; --format &#39;value(status.url)&#39;)<br>curl -X POST &quot;$URL/summarize&quot; \<br>  -H &quot;Authorization: Bearer $(gcloud auth print-identity-token)&quot; \<br>  -H &quot;Content-Type: application/json&quot; \<br>  -d &#39;{&quot;text&quot;: &quot;Customer says the door code stopped working after the update.&quot;}&#39;</pre><p>You should get back a JSON summary. Now run the check that matters more: the same curl without the Authorization header. Add -i so you can see the status line. It must return 403. If it returns a summary, the service is public, and something is wrong with the deploy flags.</p><h3>Prove there are no keys</h3><p>“No keys anywhere” is a claim, and claims should have tests. The folder checks it in code. These are static regression tests: they scan local files for strings, and they do not inspect cloud or GitHub state.</p><p>The test test_no_keys_anywhere walks every file in the folder and fails on words that belong to a key: GOOGLE_API_KEY, GEMINI_API_KEY, credentials_json or a &quot;private_key&quot; field. test_wif_pins_ids_and_main fails if the condition drops the repository id, the owner id or main. A third test checks the workflow for id-token: write, no secrets. reference, and the deploy flags. Treat them as guard rails for whoever edits the files in a hurry.</p><h3>Optional: block key creation for good</h3><p>Everything above avoids keys by design. Nothing yet stops a person from creating one later, the next time a deploy fails and someone reaches for the old habit. An organization policy can forbid it.</p><p>From terraform/main.tf:</p><pre># Optional: forbid creating service account keys at all. Needs the Organization Policy<br># Administrator role, so it is off by default. Not retroactive: existing keys stay.<br>resource &quot;google_org_policy_policy&quot; &quot;no_sa_keys&quot; {<br>  count = var.block_key_creation ? 1 : 0<br> <br>  name   = &quot;projects/${data.google_project.this.number}/policies/iam.managed.disableServiceAccountKeyCreation&quot;<br>  parent = &quot;projects/${data.google_project.this.number}&quot;<br> <br>  spec {<br>    rules {<br>      enforce = &quot;TRUE&quot;<br>    }<br>  }<br> <br>  depends_on = [google_project_service.api]<br>}</pre><p>Add -var block_key_creation=true to the apply command in step 3. Terraform then sets the managed constraint iam.managed.disableServiceAccountKeyCreation on the project. The <a href="https://docs.cloud.google.com/resource-manager/docs/organization-policy/restricting-service-accounts">organization policy docs</a> recommend the managed constraint and list a legacy one with a similar name. Two things to know:</p><ul><li>It needs a project that sits under an organization, and someone who can manage that organization’s policies. The predefined roles/orgpolicy.policyAdmin role can only be granted at the organization level. That is why the step is off by default.</li><li>It blocks creating keys. Uploading a key you made elsewhere has its own constraint, iam.managed.disableServiceAccountKeyUpload, which this folder does not set.</li><li>It is not retroactive. Keys that already exist stay valid. If you are moving an existing project to this design, list and delete the old keys yourself.</li></ul><p>The policy turns a convention (“we do not use keys”) into a rule the platform enforces. That is a different kind of safety.</p><h3>Limits you should know</h3><p>This list is honest, and it is short.</p><ul><li><strong>The deploy account has Cloud Run Admin on the whole project.</strong> Changing the invoker rules needs run.services.setIamPolicy, which Cloud Run Developer lacks. Use a project that holds only this service. To narrow it later, replace roles/run.admin with a custom role that has run.services.create, run.services.update, run.services.get, run.services.getIamPolicy, run.services.setIamPolicy and run.operations.get, keep read access to the image repository, and keep the roles/iam.serviceAccountUser binding on the runtime account. I did not test that role, so check both a first deploy and a redeploy with your real flags.</li><li><strong>The runtime role is the broad predefined one.</strong> A narrower custom role is possible. Test it on a real project first.</li><li><strong>Deleting and recreating the repository needs a new apply.</strong> The ids change, and the pool trusts the ids.</li></ul><h3>What this costs you</h3><p>I will not give you a total, because prices change and the total depends on how many notes your team writes. Read the current pages:</p><ul><li>Cloud Run scales to zero, so an idle service costs nothing for compute. See <a href="https://cloud.google.com/run/pricing">Cloud Run pricing</a>.</li><li>Artifact Registry charges for stored images. See <a href="https://cloud.google.com/artifact-registry/pricing">Artifact Registry pricing</a>.</li><li>Gemini charges per token. See <a href="https://cloud.google.com/vertex-ai/generative-ai/pricing">Gemini Enterprise Agent Platform pricing</a>.</li></ul><p>The app also limits one cost driver in code. It rejects any note longer than 8,000 characters, which caps the input tokens of a single call. That limit is a request-size guard, not a budget. If you want a spend alert, add a budget on the project.</p><h3>Clean up</h3><p>The easiest clean up is to delete the whole project, if you made it for this tutorial:</p><p>gcloud projects delete &quot;$PROJECT_ID&quot;</p><p>Otherwise, from the folder that holds the README, with the same variables as in step 1, delete the service and destroy the Terraform resources.</p><p>From README.md:</p><pre>gcloud run services delete note-summariser --region &quot;$REGION&quot; --project &quot;$PROJECT_ID&quot;<br>terraform -chdir=terraform destroy -var project_id=&quot;$PROJECT_ID&quot; -var region=&quot;$REGION&quot; \<br>  -var github_repo=&quot;$REPO&quot; -var github_repository_id=&quot;$REPO_ID&quot; -var github_owner_id=&quot;$OWNER_ID&quot; \<br>  -var block_key_creation=false</pre><p>Use the same block_key_creation value as in your apply. Set it to true only if you applied it with true, so the policy is removed with the rest.</p><p>Destroy deletes the Artifact Registry repository and its images, the pool, the provider, the service accounts and the bindings. It leaves the APIs enabled, because the Terraform sets disable_on_destroy = false. To turn them off, run gcloud services disable for the ones in REQUIRED_APIS that you did not use before.</p><p>Then remove the GitHub side: delete .github/workflows/deploy.yml and the five repository variables.</p><p>One trap: Google keeps a deleted workload identity pool for 30 days. If you apply again with the same pool id inside that time, it fails. You can undelete the pool, but that does not put it back into Terraform state. Either pick a new pool id, or undelete the pool and provider and import both (terraform import on google_iam_workload_identity_pool.github and google_iam_workload_identity_pool_provider.github) before you apply. The <a href="https://docs.cloud.google.com/iam/docs/manage-workload-identity-pools-providers">pool management docs</a> explain the 30 day window.</p><h3>What to take away</h3><p>Four points to keep:</p><ol><li>Store a rule, not a credential. A pool condition replaces a secret.</li><li>Pin the repository by numeric id, plus the owner id and the branch, and protect the workflow path too.</li><li>Split deploying from running, and keep the runtime role small.</li><li>Remove the public grant on every deploy, and check inherited project access.</li></ol><p>The full folder, with the Terraform, the app, the workflow and the tests, is at <a href="https://github.com/mohammad0omar/gcp-ai-in-production/tree/main/01-keyless-ai-app">github.com/mohammad0omar/gcp-ai-in-production, folder 01-keyless-ai-app</a>. Run it in a disposable project first.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9af86c24c23" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What AI on Google Cloud Really Costs: A Guide for the Person Who Approves the Invoice]]></title>
            <link>https://mohammad-omar.medium.com/what-ai-on-google-cloud-really-costs-a-guide-for-the-person-who-approves-the-invoice-20769dabfeb3?source=rss-d0d212a40df5------2</link>
            <guid isPermaLink="false">https://medium.com/p/20769dabfeb3</guid>
            <dc:creator><![CDATA[Mohammad Omar]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 10:54:18 GMT</pubDate>
            <atom:updated>2026-11-12T10:54:18.134Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Every price and rule below was checked on Google’s pricing and billing pages on 30 October 2026 and is linked to its source. AI prices are changing quickly this year, and two of them change within the next nine weeks, so check again before you sign anything.</em></p><p><em>Olive Court Property Management, the company in this post, is invented. The prices and rules are Google’s.</em></p><p>Olive Court manages forty residential buildings. Last spring, its operations team built two small AI tools on Google Cloud. One is a chat assistant that answers tenant questions about rent dates, maintenance requests, and building rules. The other runs overnight and summarises the day’s new documents: lease renewals, contractor quotes, inspection reports.</p><p>Both work well. Then the finance director asked a simple question: what will this cost us next year?</p><p>Nobody on the team could answer with confidence. Not because the numbers are secret, but because AI pricing does not look like the software pricing most finance teams know. There is no per-seat licence. There is a meter, and it runs on units most people have never heard of.</p><p>This post explains that meter in plain terms, with no code, so that whoever approves the invoice can ask the right questions.</p><h3>The price on the page today is not next year’s price</h3><p>Start with the most urgent fact. Google lists introductory prices for its newest Gemini models, and both end soon.</p><figure><img alt="Figure titled Two Gemini prices double in the next nine weeks. Gemini 4 Argon, the most capable model, costs 2 dollars input and 10 dollars output per million tokens through 30 November 2026, then 4 and 20 dollars from 1 December 2026. Gemini 3.8 Flash, the fast everyday model, costs 0.75 and 3.75 dollars through 31 December 2026, then 1.50 and 7.50 dollars from 1 January 2027. Prices checked 30 October 2026." src="https://cdn-images-1.medium.com/max/1024/1*wZ54DEniHcuYJFmEBiejTw.png" /></figure><p>According to Google’s <a href="https://ai.google.dev/gemini-api/docs/pricing">Gemini API pricing page</a> and its <a href="https://cloud.google.com/vertex-ai/generative-ai/pricing">Agent Platform pricing page</a>:</p><ul><li><strong>Gemini 4 Argon</strong>, the most capable model, costs 2 dollars per million input tokens and 10 dollars per million output tokens through 30 November 2026. From <strong>1 December 2026</strong> it costs 4 and 20 dollars.</li><li><strong>Gemini 3.8 Flash</strong>, the fast everyday model, costs 0.75 and 3.75 dollars through 31 December 2026. From <strong>1 January 2027</strong> it costs 1.50 and 7.50 dollars.</li></ul><p>Both prices double. If your team built a budget on this autumn’s bills, that budget is half of what next year will cost for the same work. This is the single most important thing in this post. Ask your team which models they use and whether their forecast uses the new prices.</p><h3>What a “token” is, and what you pay for</h3><p>A token is a small piece of text, roughly three quarters of an English word. Everything a model reads and writes is counted in tokens, and that count is the meter.</p><p>You pay for four things:</p><ol><li><strong>Input tokens.</strong> Everything the model reads: the question, the instructions your team wrote, any documents attached, and in a chat, the conversation so far. Long instructions are paid for on every single request.</li><li><strong>Output tokens.</strong> Everything the model writes. Output costs about five times more than input.</li><li><strong>Thinking tokens.</strong> Newer models “think” before they answer. Google’s <a href="https://ai.google.dev/gemini-api/docs/thinking">documentation</a> is clear that you are billed for these as output, even though nobody sees them. A short answer can carry a long, invisible bill.</li><li><strong>Extras.</strong> For example, answers grounded in live Google Search results. On the Gemini API, the first 5,000 grounded requests a month are free, then each 1,000 costs 14 dollars.</li></ol><p>There is also hosting: the servers that run your application around the model. For most small tools, this is a small part of the bill. In the examples I have worked through, the model was more than 95 percent of the total.</p><p>One piece of good news: Google’s Agent Platform pricing page says “You’re charged only for requests that return a 200 response code.” A request that fails is not billed. There is one new exception. From 13 November 2026, the same page says a Gemini 4 answer longer than 32,000 tokens is charged even if the request fails on a timeout. If your team generates very long documents with Gemini 4, they should know this.</p><h3>Olive Court’s real numbers</h3><p>Here is what Olive Court’s two tools cost at today’s prices and at next year’s.</p><p><strong>The tenant chat assistant</strong> handles about 12,000 messages a month. Each message sends about 2,500 tokens to the model (the instructions, the building rules, and the conversation so far) and gets about 400 tokens back.</p><ul><li>On Gemini 3.8 Flash: about <strong>40.50 dollars a month</strong> today, and <strong>81 dollars</strong> from January.</li><li>On Gemini 4 Argon: about <strong>108 dollars</strong> today, and <strong>216 dollars</strong> from December.</li></ul><p><strong>The overnight summaries</strong> process about 3,000 documents a month. Each is about 20,000 tokens long and produces an 800-token summary.</p><ul><li>On Gemini 3.8 Flash at the normal rate: about <strong>54 dollars a month</strong>.</li><li>The same work sent as a batch job: about <strong>27 dollars</strong>. More on that below.</li></ul><figure><img alt="Bar chart titled Same work, different bills, in US dollars per month on one scale. Tenant chat assistant, 12,000 messages a month: 3.8 Flash today 40.50, from 1 January 2027 81; 4 Argon today 108, from 1 December 2026 216. Overnight summaries, 3,000 documents a month on 3.8 Flash: standard 54, batch 27." src="https://cdn-images-1.medium.com/max/1024/1*FS740Ju-2z4VRg8v30Fg8A.png" /></figure><p>These are small numbers for a company of forty buildings. That is the point. AI on Google Cloud is not expensive for most small tools, <em>if</em> the tools are built with cost in mind. The same chat assistant on the wrong model, with long instructions and no limits, can cost ten times more for the same answers.</p><h3>Six levers that control the bill</h3><p>Each of these is a decision your team can make. The first three matter most.</p><figure><img alt="Six cards titled Six levers that control the bill. The first three matter most. 1, the model, the biggest lever: the same chat traffic costs 40.50 dollars a month on Flash and 108 on Argon. 2, batch: 50 percent off for work that can wait. 3, caching: 90 percent off repeated input. 4, shorter answers and less thinking. 5, Provisioned Throughput, reserved and not cancellable. 6, commitments through Flexible Savings Plans." src="https://cdn-images-1.medium.com/max/1024/1*v4mRvhyTa9VUMiN6NA5jZA.png" /></figure><h4>1. The model</h4><p>This is the biggest lever by far. In Olive Court’s chat example, the same traffic costs 40.50 dollars on Flash and 108 dollars on Argon today. After both price changes, the gap is 81 against 216 dollars. Most routine tasks, like answering questions from a known set of rules, do not need the most capable model.</p><p>A fair rule: start on the cheaper model, and move up only for a task where someone can show the cheaper model failing.</p><h4>2. Batch for work that can wait</h4><p>If a job does not need an answer in seconds, it can run as a batch. Google’s <a href="https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/batch-prediction-gemini">batch documentation</a> says: “Batch processing is offered at a 50% discounted rate compared to real-time inference.” Olive Court’s overnight summaries are a perfect fit. Nobody reads them until morning.</p><h4>3. Caching repeated text</h4><p>If every request starts with the same long instructions or the same reference document, the model can reuse that part. Google’s <a href="https://docs.cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview">caching documentation</a> gives a 90 percent discount on cached input. Some caching happens automatically. Your team should check how much of each request is the same every time, because in a chat assistant it is often most of it.</p><h4>4. Shorter answers and less thinking</h4><p>Output costs about five times more than input, and thinking counts as output. Asking for a two-sentence answer instead of a page, and turning down thinking for simple tasks, reduces the most expensive part of the bill.</p><h4>5. Reserved capacity, for steady high volume only</h4><p>Google sells <a href="https://docs.cloud.google.com/vertex-ai/generative-ai/docs/provisioned-throughput">Provisioned Throughput</a>, which Google describes as “a fixed-cost, fixed-term subscription available in several term-lengths.” You reserve model capacity for a week, a month, three months, or a year. It is not cancellable. It makes sense when usage is high and steady. For a company Olive Court’s size, it does not.</p><h4>6. Commitments</h4><p>Google also offers Flexible Savings Plans: a discount in exchange for committing to a level of spend. As with any commitment, it only pays off if your usage is stable enough to forecast.</p><h3>Controls: how to make sure the bill cannot surprise you</h3><h4>Spend caps</h4><p>This is new, and it is the most useful control for a finance team. Google Cloud now offers <a href="https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps">spend cap budgets</a> for a short list of services, including the Gemini API and Gemini Enterprise Agent Platform (the product formerly called Vertex AI).</p><p>A spend cap works per project and per service, over a month. When the estimated cost passes the cap, Google’s page says “all new usage for the specific service in the specified project is paused.” It resumes at the start of the next month, or when someone lifts it. Requests already running finish, and stored data keeps its normal charges.</p><p>Two details deserve attention:</p><ul><li><strong>A pause is an outage.</strong> When Olive Court’s chat cap triggers, tenants get no answers until someone acts. Set caps high enough that they only catch real accidents, such as a bug that calls the model in a loop.</li><li><strong>Caps count gross costs.</strong> The spend cap page says caps use “gross, estimated costs” that do not include savings and credits. Separately, the Agent Platform pricing page describes some promotional prices as “provided through 50% credits back on net spend.” If any of your rates come from credits, ask your Google contact how a cap will count them.</li></ul><h4>Alert budgets</h4><p>An ordinary <a href="https://docs.cloud.google.com/billing/docs/how-to/budgets">budget</a> sends emails at chosen levels, such as 50 and 90 percent of a monthly figure. Google is explicit that it does not stop spending on its own. Use both: an alert budget to warn, a spend cap to stop.</p><h4>Knowing which tool costs what</h4><p>Your team can attach <a href="https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/add-labels-to-api-calls">labels</a> to model requests, such as “tenant-chat” or “overnight-summaries”. Google’s billing can then be <a href="https://docs.cloud.google.com/billing/docs/how-to/export-data-bigquery">exported to BigQuery</a>, where those labels split the bill by tool. Without labels, the invoice shows one large AI line, and nobody can say which tool caused a jump.</p><p>Google’s billing documentation also now includes a page on analysing AI spend with an “AI Cost Summary Agent”. It is worth a look once your exports are in place.</p><h3>What is free, and what that really means</h3><ul><li><strong>Google AI Studio</strong>, the browser tool for trying prompts, is free to use. The <a href="https://ai.google.dev/gemini-api/docs/pricing">pricing page</a> says so directly.</li><li><strong>New Google Cloud customers</strong> get 300 dollars of credit for 90 days under Google’s <a href="https://docs.cloud.google.com/free/docs/free-cloud-features">free program</a>.</li><li><strong>The Gemini API has a free tier</strong>, but read the condition. Google’s pricing table says content on the free tier is “used to improve our products.” On the paid tier, it is not. For a property manager handling tenant names, addresses, and lease terms, that makes the free tier a privacy decision, not a saving. Real tenant data belongs on the paid tier.</li></ul><h3>Seven questions to ask your team</h3><p>If you approve the invoice, these questions will tell you quickly whether AI cost is under control:</p><ol><li>Which models do we use, and has our forecast been updated for the December and January price changes?</li><li>What share of the bill is the model, and what share is hosting?</li><li>Which jobs could run as a batch at half price?</li><li>How long are our instructions, and are they cached?</li><li>Do we have a spend cap on each AI service, and at what level?</li><li>Do we label each tool, so the bill can be split?</li><li>Is any real customer data going through a free tier?</li></ol><p>None of these needs a technical background to ask, and a team that has built carefully will answer each one in a sentence.</p><h3>What Olive Court decided</h3><p>Olive Court’s team moved the chat assistant to Gemini 3.8 Flash after checking that it answered the same test questions correctly. They switched the overnight summaries to batch. They added labels to both tools, set an alert budget, and set a spend cap on each service at about three times normal monthly spend.</p><p>Their forecast for next year, including both price rises, came to well under 200 dollars a month. The finance director’s question now has an answer, and a ceiling.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20769dabfeb3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Kind Thing Is the Clear Thing: Feedback and Hard Conversations for Engineering Leaders]]></title>
            <link>https://mohammad-omar.medium.com/the-kind-thing-is-the-clear-thing-feedback-and-hard-conversations-for-engineering-leaders-84d9f08aed5a?source=rss-d0d212a40df5------2</link>
            <guid isPermaLink="false">https://medium.com/p/84d9f08aed5a</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[human-behavior]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Mohammad Omar]]></dc:creator>
            <pubDate>Tue, 10 Nov 2026 20:05:04 GMT</pubDate>
            <atom:updated>2026-11-10T20:05:04.919Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Hand drawn sketch on off white dot grid paper. Text: Feedback and hard talks. Kind means clear. Say it early, in marker on a yellow highlight. Feedback for engineering leaders. On the right, a stick figure marked you has a speech bubble with four numbered steps: Situation, Behaviour, Impact, Ask. A second stick figure has a bubble with three dots and is marked listening in red pen." src="https://cdn-images-1.medium.com/max/1024/1*g-VTEyBhj6xU4HXTPYkQkA.jpeg" /></figure><p>The most expensive feedback is the feedback you give too late.</p><p>If an engineer hears about a problem for the first time in an annual review, the problem is not only theirs. It is also their manager’s. Somebody saw the issue months earlier, decided the conversation would be uncomfortable, and waited. The engineer lost months in which they could have fixed it. The team lost months of the better version of that person.</p><p>I think most engineering leaders are not bad at feedback because they are unkind. They are bad at it because they are kind in the wrong way. They protect the other person from a hard minute, and in exchange they cost them a hard year.</p><h3>Feedback is information, not a verdict</h3><p>The first change I suggest is in how you think about feedback. It is not a judgement on someone’s value. It is information they do not have yet, about the effect of what they do.</p><p>Seen that way, feedback should be:</p><ul><li><strong>Small.</strong> One behaviour, not a list of everything.</li><li><strong>Soon.</strong> Days after the event, not months. The details are still fresh for both of you.</li><li><strong>Often.</strong> If you give feedback every week, a single hard piece does not feel like an earthquake.</li><li><strong>Two-way.</strong> You ask for it as often as you give it.</li></ul><p>This applies to praise as well. “Great job” is pleasant and useless. “The way you wrote the rollback steps in that pull request meant the on-call engineer fixed the incident in ten minutes” tells the person exactly what to repeat.</p><h3>A structure that keeps it fair</h3><p>When feedback is hard, people fall into one of two traps. They become vague, so the message is lost. Or they become personal, so the message is rejected.</p><p>A simple structure prevents both. The Center for Creative Leadership calls it Situation, Behaviour, Impact. I add a fourth step: the ask.</p><figure><img alt="Four hand drawn boxes: Situation, Behaviour, Impact, Ask. Example: In Tuesday’s planning meeting, you rejected the estimate before Ali finished explaining it. Ali stopped talking, and we planned with a number nobody trusted. Next time, can you let people finish, then ask your question? Below, a judgement, you are not a team player, is crossed out in red. A fact you can discuss is highlighted and ticked. Model credit: Center for Creative Leadership." src="https://cdn-images-1.medium.com/max/1024/1*X_7-zAa1TR1OoAKh7ocSFA.jpeg" /></figure><p>The structure works because it stays on facts the other person can check. “You are not a team player” is a judgement, and people defend themselves against judgements. “In Tuesday’s planning meeting, you rejected the estimate before Ali finished explaining it” is a fact. You can discuss a fact.</p><p>Then, after you describe the impact, stop talking and listen. Very often there is a reason you did not know about. That reason does not cancel the feedback, but it usually changes the solution.</p><h3>Hard conversations</h3><p>Some conversations are harder than feedback. A performance problem that has lasted too long. A client who must hear that the date will move. A founder who wants a feature the team cannot build safely. A person whose role is ending.</p><p>These are the rules I try to follow:</p><ol><li><strong>Prepare the first sentence.</strong> Write it down. The first sentence is where people lose their nerve and start talking about the weather.</li><li><strong>Say the hard part in the first two minutes.</strong> Long introductions make the other person anxious, and they stop hearing anything until the real message arrives.</li><li><strong>Do not use the feedback sandwich.</strong> Praise, criticism, praise teaches people to ignore your praise, because they wait for the “but”.</li><li><strong>Say it with your voice, not in text.</strong> Hard messages in chat lose tone and gain imagined anger. Use a call, with video if possible, and follow up in writing.</li><li><strong>Agree the next step, and write it down.</strong> What will change, by when, and when you will talk again.</li><li><strong>Do it in private.</strong> Praise can be public. Correction is almost always private.</li></ol><figure><img alt="Hand drawn checklist titled A hard conversation, in three parts. Use a voice call, and correction stays private. Before, prepare: write your first sentence down, book a private call, have two or three facts ready. During, say it: say the hard part in the first two minutes, no feedback sandwich, listen, then agree the next step. After, follow up: a short written summary the same day, what changes and by when, talk again on the agreed date." src="https://cdn-images-1.medium.com/max/1024/1*f4mimMifGqAxlQDuAE3eJA.jpeg" /></figure><h3>The same words land differently in different places</h3><p>I work with engineers and clients across several countries, and I have learned to take one thing seriously: directness is cultural.</p><p>A sentence that sounds normal in a Paris meeting can sound harsh in Toronto. A message that sounds polite in Riyadh can sound so soft in Amsterdam that the listener misses the point completely. Erin Meyer’s book <em>The Culture Map</em> describes these differences well, and I recommend it to any lead with a mixed team.</p><p>My rule is simple: adjust the delivery, never the content. In a culture where directness is rare, I may spend more time on context and say the message in private, one to one. But I still say it, and I check that it was understood. “Can you tell me in your own words what you will change?” catches most misunderstandings before they cost anything.</p><p>Remote teams make this harder, because you lose the small signals of a room. One practical habit helps: after any hard conversation on a call, send a short written summary the same day. It protects both people from remembering two different conversations.</p><h3>Maya’s story</h3><p>Maya is a strong engineer on an invented product team. For two sprints in a row, her tasks slipped, and her code reviews for others arrived days late. Her lead noticed in the second week.</p><p>The lead had two options. Wait for the end of the quarter and hope it fixed itself, or talk now. He talked now, in a short private call:</p><p>“In the last two sprints, three of your tasks moved to the next sprint, and four reviews you were assigned waited more than two days. The team had to reorder work twice. I want to understand what is happening, and agree what we change.”</p><p>Then he listened. Maya had been pulled into support work by another team, informally, for about a third of her week. Nobody had decided this. It had simply happened, one request at a time.</p><p>The feedback did not disappear. Her reviews were still late. But the fix was now obvious: the support work was made official, put on a rotation, and taken off Maya’s sprint load. Two sprints later, the problem was gone. If the lead had waited for the quarterly review, Maya would have heard about a performance problem that was really a planning problem, three months too late.</p><h3>Feedback for the leader</h3><p>The last point is about you. If you give feedback but never ask for it, you teach the team that feedback flows in one direction, from power downwards.</p><p>Ask for it in a specific way. “Any feedback for me?” gets “No, all good.” “What is one thing I did this month that slowed you down?” gets a real answer. When you get one, thank the person, and then change something visible. Nothing makes people give honest feedback faster than seeing their last piece of feedback acted on.</p><h3>The short version</h3><ul><li>Late feedback is the expensive kind. Give it small, soon, and often.</li><li>Describe the situation, the behaviour, and the impact. Then ask, and listen.</li><li>Say the hard part early, by voice, in private, and write down the next step.</li><li>Adjust how you say it to the person and the culture. Never adjust what you say.</li><li>Ask for feedback yourself, and act on it where people can see.</li></ul><p>Being clear is not the opposite of being kind. Being clear is how you are kind in a way that still helps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84d9f08aed5a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Leading a Software Team When the Ground Keeps Moving]]></title>
            <link>https://mohammad-omar.medium.com/leading-a-software-team-when-the-ground-keeps-moving-ad09f422edc2?source=rss-d0d212a40df5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad09f422edc2</guid>
            <category><![CDATA[remote-work]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[leadership]]></category>
            <dc:creator><![CDATA[Mohammad Omar]]></dc:creator>
            <pubDate>Mon, 09 Nov 2026 08:07:11 GMT</pubDate>
            <atom:updated>2026-11-09T08:07:11.247Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Hand drawn sketch on off white dot grid paper. Text: Leading through instability. The ground moves. Keep shipping, in marker on a yellow highlight. Lessons from Lebanon and the Gulf. On the right, five hand drawn clocks show one moment in five cities: Toronto 07:00, Paris 13:00, Beirut 14:00, Riyadh 15:00 and Dubai 16:00. Below, three stick figures stand on wavy ground next to a red lightning bolt, with the note the team keeps working." src="https://cdn-images-1.medium.com/max/1024/1*OmgbUwEX_hjXid4PYCVt6g.jpeg" /></figure><p>I have worked remotely for clients in the USA, Canada, and France. Today I work between the UAE, Saudi Arabia, and Lebanon, as a CTO. That mix teaches you something that many leadership books leave out: a lot of leadership happens when things are not stable.</p><p>Anyone who has worked in tech in Lebanon since 2019 knows what instability can look like at country scale. A currency that lost most of its value. Banks that limited what people could withdraw. Power cuts that last longer than the working day. Periods of war. Teams there kept shipping software through all of it, and the way they did it is useful far beyond Lebanon.</p><p>Because instability is not only a Lebanese problem. Funding rounds fall through. A large client cancels. A key engineer resigns in the middle of a launch. A new AI tool changes half of next quarter’s roadmap. Every team works in some instability now. Some places just get it earlier and harder, and learn faster.</p><p>These are the four habits that helped my teams most when the ground was moving.</p><h3>1. Write it down, and work async</h3><p>When people cannot meet, written work keeps moving. When people can meet, written work still saves time. So the first habit is to write things down by default: decisions, status, plans, and the reasons behind them.</p><p>This matters more than it seems, for two reasons.</p><p>The first is power and connectivity. If a developer’s electricity returns at nine at night, a team that depends on live meetings loses that developer’s whole day. A team that works from written tasks and written decisions loses nothing. The developer reads the latest status, does the work, and writes an update for the morning.</p><p>The second is time zones and calendars. Look at an ordinary winter working day for a team spread across the places I work with.</p><figure><img alt="Hand drawn chart titled One winter working day, five cities. Each hatched bar is 09:00 to 17:00 local time on a UTC clock. Toronto works 14:00 to 22:00 UTC, Paris 08:00 to 16:00, Beirut 07:00 to 15:00, Riyadh 06:00 to 14:00, Dubai 05:00 to 13:00. A yellow band marks 08:00 to 13:00 UTC, where four cities overlap. A red note says Toronto and Dubai share no hours. Saudi Arabia works Sunday to Thursday, the UAE Monday to Friday." src="https://cdn-images-1.medium.com/max/1024/1*o0k-tHB8WTLiS2WqzN8FOw.jpeg" /></figure><p>From nine to five local time, Toronto and Dubai share no working hours at all. In winter, Toronto is five hours behind UTC and Dubai is four hours ahead, so when Toronto starts at nine, Dubai has already gone home. Calendars do not line up either. Saudi Arabia’s working week runs from Sunday to Thursday. The UAE moved its federal government to a Monday to Friday week <a href="https://www.simmons-simmons.com/en/publications/ckwz21zfz1ej50a78lgnd3kia/uae-employers---changes-to-the-uae-working-week-in-force-january-2022">from 1 January 2022</a>, and most private companies followed. A team split between Riyadh and Dubai usually has four shared working days, not five. Lebanon also changes its clocks twice a year, <a href="https://www.timeanddate.com/time/change/lebanon?year=2026">from UTC+2 to UTC+3 and back</a>, while Riyadh and Dubai do not.</p><p>A team in that situation cannot run on meetings. It runs on writing. In practice, that means:</p><ul><li><strong>A short daily written update.</strong> Three lines: what I finished, what I am doing next, what is blocking me.</li><li><strong>A decision log.</strong> Every decision in a few lines, with an owner and a date, in one place everyone can find.</li><li><strong>A single “state of the project” page.</strong> If a client asks for status, anyone on the team can answer from it.</li><li><strong>Recorded demos.</strong> A five-minute screen recording travels across time zones better than a live demo nobody can attend.</li></ul><h3>2. Few priorities, stated clearly</h3><p>In a crisis, the worst thing a leader can do is keep every priority. The team is already working with less: less time, less power, less attention, sometimes fewer people. If the list does not get shorter, everything gets a little bit done and nothing gets finished.</p><p>So when things become unstable, my first job is to cut. I tell the team the one to three things that matter right now, and, just as important, I say what we stop doing. A written “stop” list helps more than people expect, because it gives everyone permission to drop work without guilt.</p><p>Clear priorities also protect people from making guesses. In a stable week, an engineer can choose between two tasks and recover if they chose wrong. In an unstable week, a wrong guess may cost the only productive day they have.</p><h3>3. Trust people, and judge results</h3><p>When the internet or the power is unreliable, an online status light means nothing. Someone can be online for ten hours and achieve little. Someone else can be offline most of the day and finish the most important task in the evening, when the power comes back.</p><p>So I judge results, not online time. People choose their hours, inside a small agreed window of overlap for things that really need a conversation. Two shared hours a day are usually enough, if everything else is written.</p><p>This needs trust in both directions. The team trusts that the leader will not measure them by green dots. The leader trusts that people will deliver what they committed to, and says so early when they cannot. In my view, the second part is the real contract: flexibility in exchange for early, honest updates.</p><h3>4. Make backup plans before you need them</h3><p>A backup plan made during the crisis is not a plan. It is a reaction. The time to decide what happens when the power, the internet, or the bank fails is a calm Tuesday.</p><p>I think about four areas:</p><ul><li><strong>Power.</strong> Who on the team has a reliable source, and what is everyone’s backup? A laptop battery, a small UPS for the router, a place to work from when the building is dark.</li><li><strong>Internet.</strong> Two ways to connect, from two different providers, so one failure does not take a person offline.</li><li><strong>Payments.</strong> At least two ways to pay the team, and two ways to get paid by clients. When banks restrict transfers, a single payment route can stop salaries for weeks.</li><li><strong>People.</strong> No system should depend on one person. Every critical service has a second person who has deployed it at least once, and a written runbook.</li></ul><figure><img alt="Sticky notes titled Four habits for a team on moving ground. Write it down: a daily three line update, a decision log with owners, one status page, recorded demos. Few priorities: one to three things that matter now, a written stop list, no guessing between tasks. Trust, judge results: people choose their hours, two shared hours a day, early honest updates. Backup plans: power, two internet providers, two payment routes, a second person for every system." src="https://cdn-images-1.medium.com/max/1024/1*Z_xvdZAu2JJ6an1onnFRiw.jpeg" /></figure><h3>An example week</h3><p>Here is how those habits look together, on an invented team of seven: three engineers in Lebanon, two in Dubai, one in Riyadh, and a product manager working with a client in Toronto.</p><p>On Sunday, the engineer in Riyadh starts the week while the Dubai engineers are still off. She leaves a written handover, and the Dubai engineers pick it up on Monday morning.</p><p>On Monday, a power problem in one Lebanese city leaves two engineers with only a few hours of electricity a day for the rest of the week. Nobody calls an emergency meeting. The lead posts a short written message: the release date stays, the scope drops by one feature, and the two affected engineers move to tasks that need no live coordination.</p><p>On Wednesday, the product manager records a five-minute demo for the client, who watches it during their own morning, while the rest of the team is asleep.</p><p>By Thursday, the reduced release is ready. Nobody worked a heroic night. The team simply did fewer things, wrote everything down, and trusted each other to work when they could.</p><h3>Stability is how you work, not where you work</h3><p>It is tempting to think stable teams are a result of stable places. I think it is closer to the opposite. Teams that learned to work through instability often become the most reliable teams you can find, because their habits do not depend on everything going right.</p><p>Write it down. Keep the list short. Trust people and judge what they deliver. Prepare for the bad day while the day is still good.</p><p>None of these habits needs a crisis to be useful. But when the crisis comes, and it will, you will be very glad they are already in place.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad09f422edc2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Keep Hiring Junior Developers. Train Them for Judgement, Not Typing.]]></title>
            <link>https://mohammad-omar.medium.com/keep-hiring-junior-developers-train-them-for-judgement-not-typing-a70e9af5efb8?source=rss-d0d212a40df5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a70e9af5efb8</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[careers]]></category>
            <dc:creator><![CDATA[Mohammad Omar]]></dc:creator>
            <pubDate>Wed, 04 Nov 2026 12:35:47 GMT</pubDate>
            <atom:updated>2026-11-04T13:05:59.318Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Hand drawn sketch on off white dot grid paper. Text: AI and junior developers. Keep hiring juniors. Train them, in marker on a yellow highlight. For judgement, not typing. On the right, a ladder with rungs marked test, debug and review. A junior stick figure stands at the bottom and a senior at the top, with a red arrow marked 5 years. Beside it, a faded dashed ladder under a red question mark is marked no junior, no senior." src="https://cdn-images-1.medium.com/max/1024/1*tER5PFZVMOYuVubxXQdzkA.jpeg" /></figure><p>There is an argument I hear more every month. AI now writes the code that junior developers used to write: the forms, the simple endpoints, the small bug fixes. So why hire juniors at all? Hire a few seniors, give them good AI tools, and skip the expensive years of training.</p><p>I understand why the argument is attractive. I also think it is one of the most short-sighted ideas in our industry right now.</p><h3>No juniors today, no seniors in five years</h3><p>Every senior engineer you will ever hire was once a junior somewhere. Someone paid for their slow first year. Someone reviewed their bad pull requests and explained, patiently, why the database query would fall over in production.</p><p>If most companies stop hiring juniors now, the effect will not show this year, or next year. It will show in about five years, when everyone is looking for senior engineers and very few exist, because nobody trained them.</p><figure><img alt="Hand drawn timeline, No juniors today, no seniors in five years, an illustration, not a forecast. Company A keeps hiring juniors: a small stick figure hired in 2026 learns with AI, is mid level by 2028 and owns a service, and is a senior promoted from inside by 2031. Company B stops hiring juniors: a dashed line with question marks, no junior in 2026, nobody in the middle in 2028, and nobody to promote in 2031, so it competes for scarce seniors." src="https://cdn-images-1.medium.com/max/1024/1*FRcV8PMnL1CyiVikHbY88A.jpeg" /></figure><p>So my first position is simple: keep hiring juniors. A company that stops completely is not saving money. It is borrowing from its own future and from the industry’s.</p><h3>But fewer, and trained harder</h3><p>My second position may sound like it contradicts the first. It does not. I will probably hire fewer juniors than I would have five years ago, and I will train each one much harder.</p><p>The reason is that the work juniors used to learn on has changed. For years, the junior path was the same: you start with small, repetitive tasks, you write a lot of simple code, and over time you absorb how a real system works. Much of that simple code is now the easiest thing for an AI tool to produce.</p><p>If we give juniors only the work AI does well, two things happen. Either the AI does the work and the junior learns nothing, or the junior does the work slowly and the business wonders why. Neither builds a senior engineer.</p><p>So the training has to be designed on purpose. It cannot be a side effect of easy tickets anymore. That takes more senior time per junior, which is why the number goes down. But each of those juniors gets a real path, not a seat next to a code generator.</p><h3>AI is the best tutor juniors ever had, if they question it</h3><p>Not long ago, a junior who did not understand something searched forums, read documentation, and waited for a senior to have five free minutes. Today a junior can ask an AI tool to explain a concept, a piece of code, or an error, at any hour, with endless patience.</p><p>That is a huge gift. A junior who uses it well can learn faster than any generation before them.</p><p>The condition is in the words “uses it well”. A tutor is useful when you question it. It is dangerous when you copy from it. I encourage juniors to treat every AI answer as a confident colleague who is sometimes wrong:</p><ul><li>Ask <em>why</em>, not only <em>how</em>. “Why does this need a transaction?” teaches more than “write me the function”.</li><li>Ask for two other ways to solve the problem, and for the trade-offs between them.</li><li>Ask the tool to find the bugs in its own answer. It often finds some.</li><li>Check important claims against the official documentation, and against a test.</li></ul><h3>The skill that matters now is judgement</h3><p>If AI can produce code quickly, then producing code is no longer the scarce skill. The scarce skill is knowing whether the code is right: whether it handles the strange cases, whether it is secure, whether it fits the system it is going into, and whether it should exist at all.</p><p>That is judgement, and judgement is exactly what juniors need to build. Typing speed matters much less than it did.</p><p>Here is how I would train it.</p><figure><img alt="Hand written list titled Train juniors for judgement, not typing, with judgement highlighted. Five numbered practices. Explain every line: if the junior cannot explain a line, it does not merge. Read more than you write: juniors review senior pull requests too, with questions. Debug before you ask: reproduce it, write a guess, then use AI to test the guess. Write the test first. Pair every week: thirty minutes with a senior on a real problem." src="https://cdn-images-1.medium.com/max/1024/1*Eojo3GqmxQGOEGC--iiMiQ.jpeg" /></figure><ol><li><strong>Explain every line before it merges.</strong> In each pull request, the junior writes a short explanation of how the change works and why it is written that way. If they cannot explain a line, it does not merge, whoever or whatever wrote it.</li><li><strong>Read more than you write.</strong> Juniors review senior pull requests, not only the other way round. Reading good code with questions is one of the fastest ways to learn.</li><li><strong>Debug before you ask.</strong> When something breaks, the junior first reproduces the problem and writes down a guess about the cause. Then they can use AI to test the guess. The habit of forming a hypothesis is what makes a strong debugger.</li><li><strong>Write the test first.</strong> If the junior writes the test that proves the feature works, they have to understand the feature. AI can help write the code after that.</li><li><strong>Pair with a senior every week.</strong> Thirty minutes of working together on a real problem teaches things no document can.</li></ol><h3>Lina’s first six months</h3><p>Lina joined an invented product team as a junior developer. In her first month, she was impressively fast. With an AI assistant, she closed small tickets in hours that would have taken a junior days a few years ago.</p><p>Then one of her changes broke date handling for users in another time zone. The code looked clean and the tests passed, because the tests only ran in one time zone. In the review afterwards, her senior asked her to explain the date logic line by line. She could not. The AI had written it, and it had looked right.</p><p>Her team did not take the tools away. They changed the rules. Lina explained every change in her pull requests, wrote the tests before asking for code, and reviewed one senior pull request each day.</p><p>Her speed dropped for about a month. By month six, she was the person on the team who most often found time zone and edge case bugs in other people’s changes, including changes written mostly by AI. That is the kind of engineer who becomes a senior.</p><h3>If you are a junior reading this</h3><p>You are entering the industry at a strange and good moment. You have tools that earlier juniors could only dream of. The risk is that they let you produce work you do not understand.</p><p>So protect your own learning. Use AI to explain, not only to produce. Read code every day. Form your own guess before you ask for an answer. And never merge something you could not explain to a colleague. The engineers who will be most valuable in five years are not the ones who generated the most code. They are the ones who can tell when the code is wrong.</p><h3>If you are a leader reading this</h3><p>Keep a junior hiring line, even if it is smaller. Budget senior time for training, and count it as real work, not as a distraction from “real work”. Measure juniors by what they learn and by the quality of their judgement, not by how many tickets they close.</p><p>The AI tools will keep getting better at writing code. That makes good judgement more valuable, not less. Someone has to build it, and the only place it is built is in people who start as juniors.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a70e9af5efb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You Merge It, You Own It: Rules for Engineers and Teams That Work With Coding Agents]]></title>
            <link>https://mohammad-omar.medium.com/you-merge-it-you-own-it-rules-for-engineers-and-teams-that-work-with-coding-agents-2e9362efbc17?source=rss-d0d212a40df5------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e9362efbc17</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[engineering-management]]></category>
            <dc:creator><![CDATA[Mohammad Omar]]></dc:creator>
            <pubDate>Tue, 03 Nov 2026 12:46:02 GMT</pubDate>
            <atom:updated>2026-11-03T12:46:02.125Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Hand drawn sketch on off white dot grid paper. Text: Engineers and coding agents. The agent typed it. You own it, in marker on a yellow highlight. Rules for teams that work with agents. On the right, four boxes marked agent have arrows into one box marked review and tests, and only then an arrow down to a line of commits marked main. A stick figure beside the gate has the red note you merge." src="https://cdn-images-1.medium.com/max/1024/1*Tva2QY443qXzimkXnfVz5A.jpeg" /></figure><p>A year ago, most engineers used AI to complete a line or explain an error. Today many engineers give a coding agent a task, go to a meeting, and come back to a finished pull request.</p><p>That changes the engineer’s job. Less of it is typing. More of it is directing: deciding what should be built, describing it precisely, checking that what came back is right, and taking responsibility for it.</p><p>I think most of the confusion about AI in software teams comes from treating this as a tooling question. It is a leadership question. Who owns the code? What is good work now? Where should the team be careful, and where should it move fast? Here are the four rules I believe in.</p><h3>Rule 1: You merge it, you own it</h3><p>It does not matter who typed the code: you, a colleague, or an agent. The engineer who merges it owns it.</p><p>That means the person who merges must be able to explain it, must be ready to debug it at two in the morning, and must answer for it in an incident review. “The agent wrote that part” is never an acceptable sentence in a post-incident meeting, in the same way that “I copied it from a forum” never was.</p><p>This rule sounds strict. In practice, it is freeing. It removes a whole category of arguments about AI-written code. The question is never “was this written by AI?” The question is always “does the person who merged this understand it and stand behind it?”</p><h3>Rule 2: The spec is the real work</h3><p>When an engineer directs an agent, the quality of the result depends mostly on the quality of the instruction. A vague request gets plausible code that solves a slightly different problem.</p><p>So the rare skill is not prompting tricks. It is the old, unglamorous skill of writing a clear spec, plus a test that proves the result. A good task description for an agent answers the same questions a good description for a new colleague would:</p><ul><li><strong>The goal.</strong> What should be true when this is done, in one or two sentences.</li><li><strong>The constraints.</strong> Which files, services, or patterns to use, and which to leave alone.</li><li><strong>The non-goals.</strong> What the agent must not change, even if it seems helpful.</li><li><strong>The proof.</strong> The test, or the exact check, that shows the work is correct.</li></ul><p>Engineers who write this well get excellent results from agents. Engineers who do not, get a lot of code that needs to be explained, corrected, and often thrown away. In my view, the best investment a team can make right now is teaching people to write specs and acceptance tests, not teaching them more tools.</p><h3>Rule 3: Review is the bottleneck now</h3><p>Here is the change most teams do not plan for. Agents produce code much faster than people can review it.</p><p>Before agents, writing was the slow part and review was a small step at the end. Now the writing can take minutes, and the queue of pull requests grows faster than the team can read them. If you do nothing, one of two bad things happens. Either reviews become rubber stamps, and quality drops quietly. Or reviews become a long queue, and the speed you gained from agents disappears while work waits.</p><figure><img alt="Five hand drawn boxes titled Where the time goes now. Spec: goal, constraints, non goals and the proof, written by you. Agent writes: minutes. Tests run: tests, type checks and linters review first, automatic. Human review, highlighted: a person checks design and intent, and a red circle marks the queue, hours to days. Merge: you own it. Plan for step 4: small pull requests, tests first, review time on the calendar, a reviewed spec." src="https://cdn-images-1.medium.com/max/1024/1*03FnPKxFLc2BMiK2JjqNSQ.jpeg" /></figure><p>Teams can plan for this:</p><ul><li><strong>Keep pull requests small.</strong> Ask agents for small, focused changes. A 2,000-line pull request will not be reviewed properly, by anyone.</li><li><strong>Make tests the first reviewer.</strong> If automated tests, type checks, and linters run before a human looks, the human can focus on design and intent.</li><li><strong>Put review time on the calendar.</strong> Review is now a main part of the job, not something people do between “real” tasks.</li><li><strong>Review the spec, not only the code.</strong> Five minutes agreeing the spec before the agent starts can save an hour of review afterwards.</li></ul><h3>Rule 4: Gates by risk</h3><p>Not all code deserves the same level of control. A team that treats every change like a payment system will be slow. A team that treats payment code like an internal script will eventually have a very bad day.</p><p>So set the gates by risk. Let agents work freely where mistakes are cheap and easy to reverse. Put strict human gates where mistakes are expensive, hard to reverse, or affect money, security, or people’s data.</p><figure><img alt="Hand drawn table, Gates by risk. Low, one red mark: docs, tests and internal tools, cheap to reverse; automated checks and one reviewer. Medium, two marks: product features users see; a written spec, a test and one reviewer, and a written reason above 400 lines. High, three marks and highlighted: money, security, personal data and database migrations; a spec written by a human, two reviewers, no automatic merge. A red note says these are example tiers." src="https://cdn-images-1.medium.com/max/1024/1*_dCI6hcYFjNVdKQoixywFg.jpeg" /></figure><p>The exact tiers will differ by team. The important thing is that they are written down and agreed in advance, so nobody has to argue about them during a busy week. Any engineer should be able to look at a change and know which gate it goes through.</p><h3>What changes for the team</h3><p>When a whole team works with agents, a few more things change.</p><p><strong>What you measure.</strong> Lines of code and number of pull requests were weak measures before. With agents, they are meaningless. Measure what the business feels: how long a change takes to reach users, how often changes cause failures, and how quickly the team recovers. These are the DORA measures many teams already know, and they stay honest when the volume of code explodes.</p><p><strong>What you share.</strong> Good specs, good task templates, and good tests become team assets, like a shared library. When one engineer writes a spec template that works well for database migrations, the whole team should be able to use it.</p><p><strong>What you talk about.</strong> Retrospectives should include the agents’ work. Where did agents save time? Where did they create rework? Which kinds of tasks should stay human for now?</p><p><strong>What you do not do.</strong> Do not turn agent usage into a target. A team told to “use more AI” will produce more AI code, which is not the same as better software.</p><h3>Tidewater’s first quarter with agents</h3><p>Tidewater is an invented team of eight engineers. When they started using coding agents seriously, the number of pull requests per week went from about 40 to about 95. That looked like success.</p><p>But the average time a pull request waited for review went from four hours to almost a day. Two incidents in the same month came from changes that had been approved quickly in a long queue. In both cases, the engineer who merged could not fully explain the change.</p><p>The team made four decisions. Whoever merges owns it, without exceptions. Every agent task starts with a short written spec and a test. Pull requests above 400 changed lines need a written reason. And changes in three areas (payments, authentication, and personal data) need a human-written spec and two reviewers, with no automatic merge.</p><p>The number of pull requests per week dropped to about 70. Review waiting time returned to a few hours. Over the next two months, the team shipped more features than before, with fewer incidents. They did less, more carefully, and finished more.</p><h3>The short version</h3><ul><li>You merge it, you own it. Who typed it does not matter.</li><li>The spec and the test are the real work. Teach people to write them.</li><li>Agents make review the bottleneck. Plan for it, or quality or speed will suffer.</li><li>Set gates by risk: freedom where mistakes are cheap, strict control on money, security, and data.</li></ul><p>Coding agents are a real change in how software is made. But the core of engineering leadership has not changed at all: be clear about what you want, be honest about what you shipped, and make sure someone owns every result.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e9362efbc17" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gemini API or Vertex AI? Where a Beginner Should Start in 2026]]></title>
            <link>https://mohammad-omar.medium.com/gemini-api-or-vertex-ai-where-a-beginner-should-start-in-2026-a00afa34d524?source=rss-d0d212a40df5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a00afa34d524</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Mohammad Omar]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 21:44:43 GMT</pubDate>
            <atom:updated>2026-11-02T21:44:43.242Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Every price, limit, and product name below was checked on Google’s own pages on 30 October 2026 and is linked to its source. Google renames and reprices its AI products often, so check again before you build on any of it.</em></p><figure><img alt="Cover illustration. On a dark blue background, a small heading reads: Gemini API or Vertex AI? Large text below it reads: Two doors. Same models. On the right, four coloured dots labelled the same models connect to two doors. The left door, Gemini API through AI Studio, is open and lit, and a figure marked you walks toward it. The right door, Vertex AI, now Agent Platform, is closed with a lock. Small text reads: Where a beginner should start in 2026." src="https://cdn-images-1.medium.com/max/1024/1*fUhIBRGzlvWUj7OVyI4t2A.png" /></figure><p><em>Cedar Notes, the student team in this post, is invented. The products, prices, and code are real.</em></p><p>Maya and Karim are two computer science students who want to build Cedar Notes, a study helper that turns lecture notes into practice questions. They have a weekend, two laptops, and no budget. They know they want to use Gemini.</p><p>Within ten minutes of searching, they are confused.</p><p>One search sends them to Google AI Studio and a page called the Gemini API. Another sends them to Google Cloud, where an older tutorial talks about Vertex AI. When they click through, the Vertex AI page now carries a different name: Gemini Enterprise Agent Platform. One page wants an API key. The other wants a billing account, a project, and something called a service account.</p><p>If you are where Maya and Karim are, this post is for you. The short version: there are two doors to the same models, and as a beginner you should almost certainly walk through the first one.</p><h3>Two doors, one set of models</h3><p>Google offers Gemini through two products.</p><p>The first is the <strong>Gemini Developer API</strong>, which you reach through <a href="https://aistudio.google.com/">Google AI Studio</a>. You sign in with a Google account, create an API key, and start calling the model. It is built for individual developers, students, and small teams.</p><p>The second is what used to be called <strong>Vertex AI</strong>. Google’s billing documentation now lists it as <a href="https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps">“Gemini Enterprise Agent Platform (formerly Vertex AI)”</a>, and most of the documentation calls it Agent Platform for short. It lives inside Google Cloud and is built for companies that need enterprise controls: who can call the model, from which network, in which region, under which contract.</p><figure><img alt="Diagram: two doors to the same Gemini models. Door one, the Gemini Developer API through Google AI Studio, is for students and small teams: a Google account, an API key, and a free tier whose content is used to improve Google products. Door two, Agent Platform (formerly Vertex AI) inside Google Cloud, adds IAM roles, service accounts, regions, own billing and provisioned throughput. Same on both: the models, the google-genai library, and pay per token." src="https://cdn-images-1.medium.com/max/1024/1*iHaRGJKEuaW4Z_rx72Io2g.png" /></figure><p>Three things are the same on both sides, and knowing this removes most of the confusion:</p><ul><li><strong>The models.</strong> Gemini 4 Argon, Gemini 3.8 Flash, and the rest of the family are available through both.</li><li><strong>The code.</strong> Google’s current Python library, google-genai, talks to both. Moving from one to the other is a change to how you create the client, not a rewrite.</li><li><strong>The way you pay.</strong> Both charge per token, which is roughly per word fragment the model reads or writes.</li></ul><p>What changes is the setup, the controls, and who the product is designed for.</p><p>Google’s own <a href="https://ai.google.dev/gemini-api/docs/migrate-to-cloud">migration guide</a> says most developers should use the Gemini Developer API “unless there is a need for specific enterprise controls.” For a student project, there is no such need yet. Start with the first door.</p><h3>Door one: Google AI Studio and the Gemini API</h3><p>Using AI Studio itself costs nothing. Google’s <a href="https://ai.google.dev/gemini-api/docs/pricing">pricing page</a> says AI Studio usage is free of charge in all available regions. You can type prompts, upload files, compare models, and see exactly what the model returns before you write any code.</p><p>When you are ready to code, you create an API key in AI Studio. Two facts about that key matter more than they first seem:</p><ol><li><strong>Every key belongs to a Google Cloud project</strong>, even if you never opened the Cloud console yourself. Rate limits are applied to the project, not to the individual key, so creating more keys in the same project does not give you more requests.</li><li><strong>The key is a password.</strong> Anyone who has it can spend your quota and, once billing is on, your money. Never paste it into code you push to GitHub.</li></ol><h4>The free tier, and its one big condition</h4><p>New accounts start on the free tier. It is generous enough to build and test a real project, and it includes Gemini 3.8 Flash, which Google calls its most intelligent Flash model.</p><p>The condition is in the pricing table. On the free tier, the content you send is “used to improve our products.” On the paid tier, it is not.</p><p>For Maya and Karim, testing with their own lecture notes, that is fine. It stops being fine the day a real user uploads their own notes, or a university asks where student data goes. That is the moment to turn on billing, even if the bill will be tiny. It is a privacy decision, not a money decision.</p><h4>Your first call</h4><p>Here is the whole thing in Python. First, install the library and put your key in an environment variable so it never appears in your code:</p><pre>pip install google-genai<br>export GEMINI_API_KEY=&quot;paste-your-key-here&quot;</pre><p>Then:</p><pre>from google import genai<br><br>client = genai.Client()  # reads GEMINI_API_KEY from the environment<br><br>response = client.models.generate_content(<br>    model=&quot;gemini-3.8-flash&quot;,<br>    contents=&quot;Write three practice questions about photosynthesis for a first-year biology student.&quot;,<br>)<br>print(response.text)</pre><p>That is it. No billing account, no service account, no cloud console.</p><p>One warning about tutorials. Older guides use a different package called google-generativeai. The current library, documented on <a href="https://googleapis.github.io/python-genai/">Google&#39;s SDK page</a>, is google-genai, imported as from google import genai. If a tutorial imports something else, it is out of date.</p><h3>Which model should a beginner use?</h3><p>Gemini comes in sizes. Bigger models reason better and cost more. Smaller models are faster and much cheaper. For learning, prototypes, and most student projects, the middle of the range is the right place to start.</p><figure><img alt="Chart: three Gemini models, in US dollars per million tokens, checked 30 October 2026. Gemini 3.5 Flash-Lite, the cheapest: $0.30 input, $2.50 output, for simple high-volume jobs. Gemini 3.8 Flash, marked start here: $0.75 input, $3.75 output, also on the free tier, rising to $1.50 and $7.50 from 1 January 2027. Gemini 4 Argon, the flagship: $2 input, $10 output, not on the free tier, rising to $4 and $20 from 1 December 2026." src="https://cdn-images-1.medium.com/max/1024/1*nokeav6IPdS30ZLe04Sm6Q.png" /></figure><p>Here are the three you are most likely to choose between, with prices per million tokens from the <a href="https://ai.google.dev/gemini-api/docs/pricing">Gemini API pricing page</a>:</p><ul><li><strong>Gemini 3.5 Flash-Lite</strong>: 0.30 dollars input and 2.50 dollars output. The cheapest option for simple, high-volume jobs like sorting or short summaries.</li><li><strong>Gemini 3.8 Flash</strong>: 0.75 dollars input and 3.75 dollars output, on the free tier as well. This is the right default for a beginner.</li><li><strong>Gemini 4 Argon</strong>: Google’s flagship. 2 dollars input and 10 dollars output, and it is not on the free tier.</li></ul><p>Two dates are worth knowing. Google’s pricing page shows Gemini 4 Argon rising to 4 dollars input and 20 dollars output from 1 December 2026, and Gemini 3.8 Flash rising to 1.50 and 7.50 dollars from 1 January 2027. If you build a budget today, build it on the later prices.</p><p>Two more beginner traps:</p><ul><li><strong>Thinking counts.</strong> Newer models think before they answer, and Google bills those thinking tokens as output. A short answer can still use many output tokens.</li><li><strong>Pin the model name.</strong> Google’s examples sometimes use a moving alias. In anything you ship, write the exact name, such as gemini-3.8-flash, so a model update does not change your app&#39;s behaviour without warning.</li></ul><h3>Door two: when to move to Agent Platform</h3><p>Cedar Notes works. A professor tries it and likes it. Then the university’s IT office sends a list of questions. Where is the data processed? Who on your team can call the model? Can the service run under the university’s own cloud account, with its own access rules?</p><p>These are the questions Agent Platform exists to answer.</p><figure><img alt="Diagram: when to open the second door. The signal: someone asks where data is processed, who can call the model, or whether it can run under their own cloud account. What you get: IAM roles, service accounts, a choice of regions, own billing, and provisioned throughput. The setup: a Google Cloud project with billing, the Agent Platform API enabled, a gcloud sign-in, and enterprise=True in the client." src="https://cdn-images-1.medium.com/max/1024/1*abvfF9OL_b9vkqk2TPfFAg.png" /></figure><p>Agent Platform adds what an organisation expects from a cloud provider: Identity and Access Management (IAM) roles for who may call the model, service accounts instead of shared keys, a choice of regions, billing on the organisation’s own account, and enterprise options like provisioned throughput, where you reserve capacity for a fixed term.</p><p>The setup is longer than an API key. In outline:</p><ol><li>Create or choose a Google Cloud project and link a billing account.</li><li>Enable the Agent Platform API in that project.</li><li>On your own machine, sign in with gcloud auth application-default login. In production, your code runs as a service account and never sees a key at all.</li></ol><p>The code change is small. The same library supports both doors:</p><pre>from google import genai<br><br>client = genai.Client(<br>    enterprise=True,<br>    project=&quot;cedar-notes-prod&quot;,<br>    location=&quot;global&quot;,<br>)</pre><p>Every generate_content call after that line is the same as before.</p><p>If you are new to Google Cloud, Google’s <a href="https://docs.cloud.google.com/free/docs/free-cloud-features">free program</a> gives new customers 300 dollars of credit to use over 90 days. That is plenty to learn Agent Platform on.</p><h3>Five mistakes I see beginners make</h3><p><strong>1. Committing the API key.</strong> It happens to everyone once. Keep keys in environment variables or a secret manager, add your .env file to .gitignore, and if a key ever reaches GitHub, delete it in AI Studio immediately and create a new one.</p><p><strong>2. Sending private data on the free tier.</strong> The free tier is for your own test data. Once real people use your app, move to the paid tier.</p><p><strong>3. Starting with the biggest model.</strong> Gemini 4 Argon is impressive and not on the free tier. Start with 3.8 Flash. Move up only when you can show a task where Flash fails.</p><p><strong>4. Turning on billing without a ceiling.</strong> Google Cloud now offers <a href="https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps">spend cap budgets</a>, and the Gemini API is one of the services they cover. A spend cap pauses new usage of that service in that project when the month’s estimated cost passes your limit. Set one the day you enable billing. A normal budget only sends emails. A spend cap actually stops the spending.</p><p><strong>5. Thinking the two doors are two different products.</strong> They are two ways into the same models. Learn on the first door. You will not have to throw that knowledge away when you need the second.</p><h3>What Maya and Karim did</h3><p>They built the first version of Cedar Notes in a weekend on the free tier, with 3.8 Flash and an API key in an environment variable. When the first real users arrived, they turned on billing, set a spend cap of 20 dollars a month, and kept the same code.</p><p>When the university asked its questions, they created a project under the university’s cloud account, enabled the Agent Platform API, and changed one block of code. Everything else stayed the same.</p><p>That is the path I recommend to anyone starting today. Begin where the friction is lowest. Move when a real requirement tells you to, not before.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a00afa34d524" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why You Should Go to DevFest, Even If You Think It Is Not for You]]></title>
            <link>https://mohammad-omar.medium.com/why-you-should-go-to-devfest-even-if-you-think-it-is-not-for-you-3f5ae8dc167e?source=rss-d0d212a40df5------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f5ae8dc167e</guid>
            <category><![CDATA[google-developer-group]]></category>
            <category><![CDATA[devfest]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[careers]]></category>
            <dc:creator><![CDATA[Mohammad Omar]]></dc:creator>
            <pubDate>Sat, 31 Oct 2026 18:41:09 GMT</pubDate>
            <atom:updated>2026-10-31T19:01:21.302Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Cover illustration. On a dark blue background, a small heading reads: Why you should go to DevFest. Large text below it reads: It is not the brand. It is the room. Beside it, rows of simple figures sit like an audience. A few figures are blue, red, yellow, and green, and thin lines connect them. One figure in the front row is marked you, and a yellow arc joins it to the person next to it. Small text reads: One Saturday. Years of people you know." src="https://cdn-images-1.medium.com/max/1024/1*lWwYQ2bXlKutmiSmMSxv2g.png" /></figure><p><em>The event facts below come from the official DevFest and Google Developer Groups pages, checked on 30 October 2026, and are linked to their source. Everything else is my opinion, as a developer in the local community.</em></p><p>Every year I hear the same three sentences from developers who skip DevFest.</p><p>“I am not senior enough.”</p><p>“It is just a Google marketing day.”</p><p>“I will not know anyone there.”</p><p>I understand all three; I have said versions of them myself about other events. I also think all three are wrong, and the cost of believing them is higher than it looks. You do not lose one Saturday. You lose the slow, compounding effect of knowing the people who build software in your own city.</p><p>This post is my case for going. It is written mostly for developers and students in the north of Lebanon, but almost all of it applies wherever you live, because the thing that makes DevFest worth your day is not the brand. It is the room.</p><h3>What DevFest actually is</h3><p>Google describes DevFest as <a href="https://developers.google.com/community/devfest">“the world’s largest community-driven tech conference”</a>. The word that matters in that sentence is community. Each DevFest is independently organized by a local Google Developer Group, usually shortened to GDG. The name is global. The speakers, the topics, the venue, and the tone are chosen by local people.</p><p>The 2026 season runs from 1 October to 31 December 2026. The DevFest site lists events in more than 115 countries and more than 500 cities, and its <a href="https://developers.google.com/community/devfest">FAQ</a> notes that most DevFest events ask you to RSVP before you come.</p><p>In the north of Lebanon, the local group is <a href="https://gdg.community.dev/gdg-north-lebanon/">GDG North Lebanon</a>. Its page shows 1,347 members as I write this. This year’s event, <a href="https://gdg.community.dev/events/details/google-gdg-north-lebanon-presents-devfest-2026-innovation-in-action/">DevFest 2026: Innovation in Action</a>, took place on Saturday 17 October 2026 at Beirut Arab University in Tripoli, with free registration. The event page described “hands-on workshops and engaging talks from local tech leaders,” and it said in plain words that the day was for experienced developers and beginners. The year before, <a href="https://gdg.community.dev/events/details/google-gdg-north-lebanon-presents-devfest-tripoli-2025-1/">DevFest Tripoli 2025</a> ran on 20 December 2025 at the BAU campus on the Mina seaside road, as a full day of talks, workshops, panels, and challenges.</p><p>So if you were not in the room on 17 October, this post is for you. The season is not over, and there is always next year.</p><h3>Why the local part matters most</h3><p>You can watch almost any conference talk in the world from your bed. Many big events put their sessions online. If DevFest were only a set of talks, staying home would be a reasonable choice.</p><p>What you cannot download is the people who live forty minutes from you and solve the same problems you do.</p><p>Many developers here work remotely for companies far away. Our colleagues are faces on video calls in other time zones. Our local network is often a handful of university friends and whoever we sat next to in our first job. That network is small, and it stays small unless something makes it bigger.</p><p>A local conference is one of the few places where it grows quickly. In one day you can meet the person who runs the only mobile team in the city, the student who built the tool you have been looking for, and the founder who is hiring next month. None of them would ever appear in your feed.</p><p>The second thing a local event gives you is proof of what is possible here. When a speaker from your own city shows a product they shipped under the same constraints you work under, it changes what you think you can build. A talk from a famous engineer at a famous company is inspiring. A talk from someone who studied at your university is actionable.</p><h3>Five reasons to go, even if you are a beginner</h3><h4>1. You leave with something that runs</h4><p>Talks are the visible part of a DevFest, but workshops are where you learn the most per hour. You sit with a laptop, follow along, get stuck, ask the person next to you, and leave with code that works on your own machine. That is very different from watching a video and thinking you understood it.</p><p>If the agenda has a workshop on something you have never touched, pick that one. A room full of people who also do not know it yet is the easiest place in the world to be a beginner.</p><h4>2. You find out what people near you actually build</h4><p>Online tech news is shaped by a few very large companies. Local talks are shaped by local problems: payments that do not work the way the tutorials assume, Arabic and English in the same interface, slow connections, small teams doing everything. You will hear solutions you will not find in any global blog, because nobody outside the region has the problem.</p><h4>3. Jobs move through hallways</h4><p>Very few local roles are filled from a cold application alone. People hire people they have met, or people that someone they trust has met. A ten-minute conversation over coffee about a project you are proud of is worth more than a perfect CV in an inbox with three hundred others.</p><p>You do not need to network in the uncomfortable sense of the word. You need to talk to a few people about what you build, and remember their names.</p><h4>4. Beginners are expected, not tolerated</h4><p>The 2026 event page said directly that the day was for beginners as well as experienced developers. That is not a polite phrase. Community events depend on new people. Today’s first-time attendee is next year’s volunteer and the speaker the year after. Organizers know this, which is why so many sessions start from zero.</p><p>If you are a student, this is the cheapest way to see what working developers care about before you are one.</p><h4>5. It is the door to the rest of the year</h4><p>DevFest is the biggest event of the year for most groups, but it is not the only one. GDG North Lebanon’s page also lists smaller events, such as an online community check-in in August 2026. Once you have met people at DevFest, those smaller meetups stop feeling like a room full of strangers. That is where the real learning happens, month after month.</p><h3>The excuses, answered</h3><figure><img alt="Table of five common reasons people skip DevFest, each paired with what is actually true: beginners are expected, a local group runs it, you meet people by talking to one person, you cannot download the people, and it costs one Saturday." src="https://cdn-images-1.medium.com/max/1024/1*X6Go4o0YcdxV9L0KLsuv9Q.png" /></figure><p>I put the most common reasons for staying home next to what I think is actually true. If one of these is yours, read the right-hand column twice.</p><p>The one I hear most is “I am not good enough yet.” I understand it, and it has the logic backwards. You do not go to a community event because you are good. You go because it is one of the fastest ways to become good. Nobody there will ask for your title at the door.</p><p>The second most common is that it is a marketing event. Google’s name is on it, and you will see Google products in some talks. But the day is organized by a local group, and the most useful sessions are often the ones about what local developers built, whatever stack they used.</p><h3>The community loop</h3><p>Communities do not grow because of one big event. They grow because a small number of people take one small step each year.</p><figure><img alt="Five steps of the community loop: attend, talk to one person, join the local group, share one thing, and help run it. A dashed line returns to the start, because next year someone new attends because of you." src="https://cdn-images-1.medium.com/max/1024/1*mPv6eD3Gkg7B3nnhdYFKlw.png" /></figure><p>Look at the first step. You do not need to do anything except attend. Nobody expects you to speak, volunteer, or even ask a question at your first DevFest. Sit in the room and listen.</p><p>The second step is where most of the value is: talk to one person. Ask a speaker one question after their talk. Ask the person next to you what they are building. That single conversation is the difference between attending an event and joining a community.</p><p>The later steps come naturally. People who go to meetups start to share things: a lightning talk, a blog post, a demo of something they broke and then fixed. People who share things are asked to help. And the people who help are the reason the event exists next year.</p><p>Every organizer I have met started at step one.</p><h3>How to get the most out of one day</h3><p>A conference day goes fast. Here is a simple plan that works even if you are shy.</p><figure><img alt="A three-part plan for DevFest day. Before: RSVP, pick two sessions, prepare your laptop. During: sit next to someone new, join a lunch table, ask one question, write down three names. After: message those people, follow the group page, write one short post." src="https://cdn-images-1.medium.com/max/1024/1*n1GCCQzgDMflJKZTicdyrg.png" /></figure><p><strong>Before the day.</strong> RSVP, because most DevFests need it. Read the agenda and choose two sessions you must not miss. If there is a workshop, charge your laptop and install whatever the organizers ask for in advance. Workshops lose the first twenty minutes to installs when people skip this.</p><p><strong>During the day.</strong> Sit next to someone you do not know. At lunch, join a table, not your phone. Ask one speaker one question. Write down the names of three people you talked to and what they work on, because you will not remember them by evening.</p><p><strong>After the day.</strong> Within a week, send each of those three people a short message. Follow the group’s page so you hear about the next meetup. And if you learned one thing worth sharing, write a short post about it. A short post about one thing you learned is the cheapest form of step four.</p><h3>A room that is safe for everyone</h3><p>Community events only work if everyone feels welcome. GDG events follow <a href="https://gdg.community.dev/participation-terms/">participation terms</a> that ask everyone to keep a friendly, safe, supportive, and harassment-free environment. If you have stayed away from tech events because of how people were treated at one in the past, know that these terms exist and that organizers are expected to act on them.</p><p>This matters for students, for women in tech, and for anyone who is the only person like them in their class or team. A good community room is one where you are not the exception.</p><h3>If you missed it this year</h3><p>The 2026 DevFest season runs until 31 December 2026, so there is still time. The <a href="https://developers.google.com/community/devfest">DevFest site</a> lists events around the world, and other groups in the region may hold theirs later in the season.</p><p>More important, join the <a href="https://gdg.community.dev/gdg-north-lebanon/">GDG North Lebanon</a> group page. It is free, and it means you will hear about the next event instead of finding out about it from photos afterwards. Then come to the smaller events during the year. By the time the next DevFest comes around, you will already know people in the room.</p><h3>One last thing</h3><p>The best reason to go is not in any of the sections above. It is the person who will come next year because you told them it was worth it.</p><p>That is how a local scene grows. One person attends, talks to someone, comes back, brings a friend. A few years later, there is a community where there used to be a few scattered developers working alone.</p><p>Be the person who started that for someone. It costs you one Saturday.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f5ae8dc167e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build and Run an AI Agent on Google Cloud: From Laptop to Production]]></title>
            <link>https://mohammad-omar.medium.com/build-and-run-an-ai-agent-on-google-cloud-from-laptop-to-production-dcdc8de274ad?source=rss-d0d212a40df5------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcdc8de274ad</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[gemini]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Mohammad Omar]]></dc:creator>
            <pubDate>Sat, 31 Oct 2026 18:32:44 GMT</pubDate>
            <atom:updated>2026-10-31T18:32:44.075Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Every command, price, and product name below was checked on Google’s documentation on 30 October 2026 and is linked to its source. Google renamed much of its AI platform this year, so expect old tutorials to use different names.</em></p><p><em>Northdock, the freight company in this post, is invented. The tools, commands, and prices are real.</em></p><p>Northdock’s support team answers the same question about four hundred times a day: where is my shipment? The answer is always in the same internal system. A person looks it up, copies two fields, and writes a polite sentence.</p><p>That is a good first agent. The task is narrow, the data comes from one system the company controls, and a wrong answer is easy to detect. This post follows Northdock’s agent from an empty folder to a deployed service, and points out where agent projects usually stall.</p><p>Most agent demos work on a laptop in an afternoon. Most of them never reach production. The gap is not the model. It is everything around it: where conversations are stored, which identity the agent runs as, how you see what it did, and how much each conversation costs.</p><h3>The pieces, with their 2026 names</h3><p>If you last looked at Google’s agent tools a year ago, several names have changed. The Vertex AI platform is now <a href="https://docs.cloud.google.com/gemini-enterprise-agent-platform">Gemini Enterprise Agent Platform</a>, Agent Platform for short. Here is what each piece does.</p><figure><img alt="Diagram titled Google’s agent stack in 2026, in three layers. Build: Agent Development Kit (ADK), open source, for Python, TypeScript, Go, Java, and Kotlin, with Gemini as the default. Run: Agent Runtime, managed on Agent Platform with sessions, Memory Bank, scaling, and observability, which the CLI still calls agent_engine; or Cloud Run, the agent as an ordinary container. Connect: MCP links an agent to tools, and A2A links agents to other agents." src="https://cdn-images-1.medium.com/max/1024/1*NDOVBsHMfZEFiyM-CWHusA.png" /></figure><ul><li><strong>Agent Development Kit (ADK).</strong> Google’s open-source framework for writing agents. The <a href="https://adk.dev/">ADK site</a> offers it for Python, TypeScript, Go, Java, and Kotlin, and it is model-agnostic: the docs say ADK “can work with almost any generative AI model.” Gemini is the default, not a requirement.</li><li><strong>Agent Runtime.</strong> The managed service on Agent Platform that hosts your agent. It handles scaling, conversation sessions, long-term memory through a feature called Memory Bank, and built-in observability. Older docs and the ADK command line still call it Agent Engine.</li><li><strong>Cloud Run.</strong> Google’s general-purpose container service. If you want full control, an ADK agent deploys there as an ordinary container.</li><li><strong>MCP and A2A.</strong> Two open protocols. The Model Context Protocol (MCP) connects an agent to tools. Agent2Agent (A2A) connects agents to other agents. Google <a href="https://a2a-protocol.org/latest/">donated A2A to the Linux Foundation</a>, and ADK supports both.</li></ul><h3>Step 1: Write the agent</h3><p>Install ADK in a virtual environment and let it create the project skeleton:</p><pre>python3 -m venv .venv<br>source .venv/bin/activate<br>pip install google-adk<br>adk create shipment_agent</pre><p>This creates a folder with agent.py, an .env file for credentials, and an __init__.py. Here is Northdock&#39;s agent, adapted from the <a href="https://adk.dev/get-started/python/">ADK Python quickstart</a>:</p><pre>from google.adk.agents.llm_agent import Agent<br> <br># Stand-in for Northdock&#39;s internal tracking API.<br>SHIPMENTS = {<br>    &quot;ND-10442&quot;: {&quot;state&quot;: &quot;in transit&quot;, &quot;location&quot;: &quot;Port of Beirut&quot;, &quot;eta&quot;: &quot;2026-11-04&quot;},<br>}<br> <br> <br>def get_shipment_status(tracking_id: str) -&gt; dict:<br>    &quot;&quot;&quot;Returns the current state, location, and estimated arrival of a shipment.<br> <br>    Args:<br>        tracking_id: A Northdock tracking number, for example ND-10442.<br>    &quot;&quot;&quot;<br>    shipment = SHIPMENTS.get(tracking_id.strip().upper())<br>    if shipment is None:<br>        return {&quot;status&quot;: &quot;error&quot;, &quot;message&quot;: f&quot;No shipment found for {tracking_id}.&quot;}<br>    return {&quot;status&quot;: &quot;success&quot;, &quot;tracking_id&quot;: tracking_id, **shipment}<br> <br> <br>root_agent = Agent(<br>    model=&quot;gemini-3.8-flash&quot;,<br>    name=&quot;shipment_agent&quot;,<br>    description=&quot;Answers customer questions about Northdock shipments.&quot;,<br>    instruction=(<br>        &quot;You help Northdock customers track shipments. &quot;<br>        &quot;Call get_shipment_status before you answer any question about a shipment. &quot;<br>        &quot;If the tool returns an error, ask the customer to check the tracking number. &quot;<br>        &quot;Never guess a date or a location.&quot;<br>    ),<br>    tools=[get_shipment_status],<br>)</pre><p>Three details in this small file do most of the work.</p><p><strong>The docstring is the tool’s interface.</strong> ADK passes the function name, its type hints, and its docstring to the model. That text is how the model decides when to call the tool and what to pass. A vague docstring produces vague tool calls.</p><p><strong>Errors are data, not exceptions.</strong> The tool returns a structured error instead of raising one. The model can read &quot;status&quot;: &quot;error&quot; and ask the customer to check the number. An unhandled exception just ends the turn.</p><p><strong>The tool is narrow.</strong> It looks up one shipment by one ID. It does not run arbitrary queries against the tracking database. Every tool you give an agent is a permission. Give it the smallest one that does the job.</p><h3>Step 2: Run it locally</h3><p>Put an API key from Google AI Studio in shipment_agent/.env as GOOGLE_API_KEY, then talk to the agent in the terminal:</p><pre>adk run shipment_agent</pre><p>Or start the browser interface from the parent folder:</p><pre>adk web --port 8000</pre><p>The web interface shows every model call and tool call, which makes it the fastest way to see why the agent did something strange. The <a href="https://adk.dev/get-started/python/">ADK docs</a> are clear that ADK Web is for development and debugging only, not production.</p><p>Before you deploy, write down ten real questions from the support inbox, including rude ones, vague ones, and ones with wrong tracking numbers. Run them all. ADK also ships an evaluation command, <a href="https://adk.dev/evaluate/">adk eval</a>, that runs a saved set of test conversations from the command line. Turn your ten questions into that file, and run it again every time you change the instruction.</p><h3>Step 3: Choose where it runs</h3><p>ADK gives you two main deployment targets on Google Cloud. The choice comes down to how much of the surrounding plumbing you want to own.</p><figure><img alt="Comparison titled Where should the agent run? Left, Agent Runtime, the managed path: adk deploy agent_engine, managed sessions, Memory Bank across sessions, billed at $0.085 per vCPU-hour and $0.009 per GiB-hour with idle time not billed. Right, Cloud Run, the do-it-yourself path: adk deploy cloud_run, sessions in memory by default and lost on restart unless — session_service_uri and — artifact_service_uri point to a persistent store." src="https://cdn-images-1.medium.com/max/1024/1*ZGG1hiYyGJP7Ia0MxSAR8g.png" /></figure><h4>Option A: Agent Runtime</h4><p>This is the managed path. One command packages and deploys the agent, as shown in the <a href="https://adk.dev/deploy/agent-runtime/deploy/">ADK deployment guide</a>:</p><pre>adk deploy agent_engine \<br>  --project=northdock-prod \<br>  --region=us-central1 \<br>  --display_name=&quot;Shipment Agent&quot; \<br>  shipment_agent</pre><p>Note the naming mismatch. The documentation says Agent Runtime, but the command is still agent_engine. Both refer to the same service.</p><p>What you get: managed sessions, so a conversation survives between turns without you running a database; Memory Bank, which stores and retrieves information across sessions; scaling; and built-in observability.</p><p>What it costs: Agent Runtime is billed on the compute and memory your agent uses. The <a href="https://cloud.google.com/products/gemini-enterprise-agent-platform/pricing">Agent Platform pricing page</a> lists 0.085 dollars per vCPU-hour and 0.009 dollars per GiB-hour, rounded to the second. One line on that page matters a lot for chat agents: “idle time spent waiting for the next prompt between turns is not billed.” A customer who takes two minutes to reply costs you nothing in runtime while they type.</p><h4>Option B: Cloud Run</h4><p>This is the do-it-yourself path, from the <a href="https://adk.dev/deploy/">ADK deployment docs</a>:</p><pre>adk deploy cloud_run \<br>  --project=northdock-prod \<br>  --region=us-central1 \<br>  --service_name=shipment-agent \<br>  shipment_agent</pre><p>Cloud Run is a good choice if your company already runs services there, or if the agent is one part of a larger application.</p><p>There is one trap. The ADK docs warn that if you do not set --session_service_uri and --artifact_service_uri, the container falls back to in-memory sessions, and those are lost whenever an instance restarts. Cloud Run starts and stops instances all the time. In production, point those flags at a persistent store, or your agent will forget conversations at random.</p><h3>Step 4: Watch it</h3><p>An agent that you cannot inspect is an agent you cannot fix. When something goes wrong, you need to see the full chain: the user message, each model call, each tool call with its arguments and result, and the final answer.</p><p>ADK emits OpenTelemetry traces. The <a href="https://adk.dev/deploy/agent-runtime/deploy/">ADK deployment guide</a> shows an --otel_to_cloud flag on the deploy command that sends them to Cloud Trace. Turn it on from the first deployment, not after the first incident.</p><p>Then watch three numbers each week:</p><ul><li><strong>Tool calls per conversation.</strong> If this climbs, the agent is looping or retrying. That costs money and usually means a tool returns something the model does not understand.</li><li><strong>Conversations that end in a hand-off to a human.</strong> This is your real quality metric.</li><li><strong>Tokens per conversation.</strong> This is your real cost metric.</li></ul><p>For safety policies, the ADK <a href="https://adk.dev/safety/">safety guide</a> recommends plugins for policies that apply across agents, and ships one that checks prompts and responses with Google’s Model Armor service. If Northdock later adds a second agent, the same plugin covers both.</p><h3>Step 5: Know what it costs</h3><p>Here is a rough monthly estimate for Northdock. The assumptions are mine; the prices are Google’s.</p><ul><li>20,000 conversations a month.</li><li>Four model calls per conversation: two customer turns, each with a tool call and an answer.</li><li>2,500 input tokens per call (instruction, tool description, conversation so far) and 250 output tokens, including the model’s thinking.</li><li>Each conversation keeps 1 vCPU and 2 GiB busy for about 15 seconds of active work.</li></ul><figure><img alt="Bar chart titled The runtime is a rounding error. The model is the bill. Estimated monthly cost for 20,000 conversations: Agent Runtime compute $9; Gemini 3.8 Flash today $225; 3.8 Flash from 1 January 2027 $450; Gemini 4 Argon at the 1 December 2026 price about $1,200. Assumes four model calls per conversation, each with 2,500 input and 250 output tokens." src="https://cdn-images-1.medium.com/max/1024/1*6VAP0h5I-g38kWyRBznzzQ.png" /></figure><p><strong>Model cost.</strong> That is 200 million input tokens and 20 million output tokens a month. On Gemini 3.8 Flash at 0.75 and 3.75 dollars per million, according to the <a href="https://cloud.google.com/vertex-ai/generative-ai/pricing">Agent Platform pricing page</a>, that is 150 plus 75, or <strong>225 dollars a month</strong>. From 1 January 2027 the same page lists Flash at 1.50 and 7.50 dollars, so the same traffic costs <strong>450 dollars</strong>.</p><p><strong>Runtime cost.</strong> 15 seconds at 1 vCPU and 2 GiB is about 0.00043 dollars per conversation, or about <strong>9 dollars a month</strong>.</p><p>The runtime is a rounding error. The loop is the bill. Every extra model call per conversation adds about a quarter to the model cost, and every extra thousand tokens of instruction is paid on every single call.</p><p>If the same agent ran on Gemini 4 Argon at its December price of 4 and 20 dollars per million, the model cost would be about <strong>1,200 dollars a month</strong>. Start on Flash. Move up only for a task where you can show Flash failing.</p><h3>What I would tell Northdock’s team</h3><p>Build the narrowest agent that removes real work. Give it one tool, then two. Write the test conversations before the second tool, not after.</p><p>Deploy to Agent Runtime unless you have a clear reason to own sessions and memory yourself. Turn on tracing on day one. Watch tool calls per conversation more closely than any other number.</p><p>And put a <a href="https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps">spend cap</a> on the project. Agent Platform is one of the services Google lets you cap, which pauses new usage when the monthly estimate passes your limit. An agent that gets stuck in a loop at 3 a.m. should hit a ceiling, not your credit card.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcdc8de274ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Which LLM Observability Tool Should You Buy? It Comes Down to One Question]]></title>
            <link>https://mohammad-omar.medium.com/which-llm-observability-tool-should-you-buy-it-comes-down-to-one-question-6cc39cd841b9?source=rss-d0d212a40df5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6cc39cd841b9</guid>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[grafana]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Mohammad Omar]]></dc:creator>
            <pubDate>Sat, 19 Sep 2026 14:13:30 GMT</pubDate>
            <atom:updated>2026-09-19T14:13:30.981Z</atom:updated>
            <content:encoded><![CDATA[<p><em>All prices and limits below were checked on 9 September 2026 and are linked to their source. Vendors move fast, so confirm before you sign anything.</em></p><p>Every comparison of LLM observability tools I have read makes the same mistake. It lines up eight products against twenty feature checkboxes, marks most of them green, and leaves you exactly where you started.</p><p>The feature lists are not the problem. Almost all of these tools trace a request, count tokens, store the prompt, and draw a latency chart. The differences that matter are not in the table. They are in what the tool assumes you are trying to do.</p><p>So here is the question that actually decides it.</p><p><strong>Is AI a feature inside your system, or is AI your product?</strong></p><p>Answer honestly and the field collapses from eight options to about two.</p><h3>Why that question does so much work</h3><p>These tools are built for two different jobs, and the jobs belong to different people.</p><p>The first job is operating a service. Something is slow, something is throwing errors, the bill went up, a dependency is rate limiting you. The person doing this work is on call. They care about correlating the model call with the database query, the queue depth, and the deploy that happened forty minutes ago. Their instinct, correctly, is that an LLM call is just another dependency with unusually bad latency characteristics.</p><p>The second job is improving model behavior. A prompt changed and something got worse. You want to see the exact input and output side by side, group similar failures, build a dataset out of the bad ones, run an eval, and compare version A against version B. The person doing this work may not be an engineer at all. They live in a trace viewer and a diff, not in a dashboard.</p><p>Tools built for the first job treat traces as debugging exhaust. Tools built for the second treat traces as the primary artifact. Both can technically do the other job. Neither is pleasant at it.</p><p>Almost every regretted purchase in this space comes from buying for one job and then discovering your real need was the other.</p><h3>The four that matter</h3><h3>Grafana</h3><p>Grafana is the general observability answer: Prometheus for metrics, Loki for logs, Tempo for traces, and Grafana on top. The self-hosted stack is free and open source. Grafana Cloud has a free tier that is unusually generous by the standards of this market, currently 10,000 active metric series, 50 GB of logs, 50 GB of traces, 14 day retention, and 3 active users. Paid plans start at a 19 dollar per month platform fee plus usage, with metrics at 6.50 dollars per 1,000 series (<a href="https://grafana.com/pricing/">grafana.com/pricing</a>).</p><p>For AI specifically, Grafana Cloud ships an OpenLIT based integration that is OpenTelemetry native, covering GenAI request monitoring, cost and token tracking, agent invocations, vector database operations, MCP servers, and GPU utilization, plus a set of evaluation signals like hallucination and toxicity detection (<a href="https://grafana.com/docs/grafana-cloud/monitor-applications/ai-observability/">Grafana Cloud AI observability docs</a>).</p><p>What Grafana is unbeatable at: putting the model call on the same screen as everything else. If your AI feature calls a database, a queue, three internal services, and a payment provider, Grafana is the only tool on this list that can show you the whole request. It is also the only one you probably already run.</p><p>What it is bad at: the second job. Grafana has no real concept of a prompt version, a dataset, or an experiment. Diffing two prompts is not a thing. If your workflow is “change the prompt, run 200 examples, compare scores”, you will be building that yourself, and you should not.</p><h3>Langfuse</h3><p>Langfuse is the strongest all-round pick for teams whose product is the model. It is open source, and you can self-host the whole thing for free with Docker Compose or Kubernetes. The cloud version starts at a free Hobby tier with 50,000 units per month, 30 days of data access, and 2 users. Core is 29 dollars per month for 100,000 units and 90 days of access, Pro is 199 dollars per month with three years of data access, and Enterprise is 2,499 dollars per month. Some things are deliberately kept out of the free tiers, including retention management, compliance reports, audit logs, and SCIM (<a href="https://langfuse.com/pricing">langfuse.com/pricing</a>).</p><p>What it is good at: everything in job two, without a vendor holding your data hostage. Traces, prompt management, evals, datasets, and a UI that non-engineers can actually use.</p><p>The self-host story is the real argument. If your prompts and completions contain customer data, being able to run the whole platform inside your own network changes the conversation with your security team from a negotiation into a non-issue.</p><h3>LangSmith</h3><p>LangSmith is LangChain’s platform, and it is very good if you are already living inside LangChain. Developer is free with up to 5,000 base traces per month and a single seat. Plus is 39 dollars per seat per month with 10,000 base traces. Base traces are kept for 14 days; extended retention runs to 400 days at extra cost. Self-hosted and hybrid deployment exist only on Enterprise, at custom pricing (<a href="https://www.langchain.com/pricing-langsmith">langchain.com/pricing-langsmith</a>).</p><p>Two things to weigh. The per-seat price is fine for an engineering team and gets uncomfortable if you want product managers, support leads, and a domain expert looking at traces, which is exactly the workflow these tools are supposed to enable. And self-hosting sits behind an Enterprise conversation, which is a meaningful difference from Langfuse if data residency is on your list.</p><p>One thing in LangSmith’s favour that the pricing page does not tell you: it accepts generic OpenTelemetry ingest at an OTLP endpoint, with regional variants, and it maps the GenAI, OpenInference and TraceLoop conventions onto its own model (<a href="https://docs.langchain.com/langsmith/trace-with-opentelemetry">LangSmith OpenTelemetry docs</a>). So picking LangSmith does not tie your instrumentation to LangChain. That matters more than it sounds like it does.</p><h3>Arize Phoenix</h3><p>Phoenix is Arize’s self-hostable platform, built on OpenTelemetry and the OpenInference instrumentation project, and it runs anywhere from a laptop to Kubernetes. Arize AX is the managed commercial product with the same instrumentation, so moving between them is not a rewrite (<a href="https://github.com/Arize-ai/phoenix">github.com/Arize-ai/phoenix</a>).</p><p>One detail worth knowing before you tell your legal team it is open source: Phoenix is under the Elastic License 2.0. The source is public and you can run it, but ELv2 is not an OSI approved open source licence, and it restricts offering the product as a managed service to third parties. For most teams this changes nothing. If you are building a platform you resell, read it first.</p><p>Phoenix is strongest on evaluation. If your bottleneck is measuring quality rather than watching production, it deserves a serious look.</p><p>There are other credible options, including Helicone, Braintrust, Weights and Biases Weave, and Datadog’s LLM observability. I have left them out rather than quote numbers I have not verified, but the framework below applies to them unchanged: work out which of the two jobs you are buying for, then judge them on that.</p><figure><img alt="Comparison table of Grafana, Langfuse, LangSmith and Arize Phoenix, covering whether each can be self-hosted, its entry price, what it is built for, and what to watch out for. Figures checked 9 September 2026." src="https://cdn-images-1.medium.com/max/1024/1*BY0Az5C3nJTijFfcsZdQWg.png" /></figure><h3>Picking, by scenario</h3><p><strong>Your AI feature is one part of a larger product, and you already run Prometheus and Grafana.</strong> Use Grafana. Do not add a second on-call surface for one feature. Add token, cost, refusal and tool-call metrics to the dashboards you already have, and revisit only when a specific eval need shows up.</p><p><strong>Your product is the model, and you iterate on prompts weekly.</strong> Use Langfuse, self-hosted if your prompts touch customer data. It is the best combination of capability, price, and exit options on this list.</p><p><strong>You are deep in LangChain and your team is small and technical.</strong> Use LangSmith. The integration is genuinely tighter, the free tier will carry a solo developer a long way, and Plus is cheap for a small engineering team. Watch the per-seat cost as soon as non-engineers want access.</p><p><strong>Your hard problem is measuring quality, not keeping the service up.</strong> Use Phoenix, with the licence read and understood.</p><p><strong>You need one screen for a regulator, a CFO, and an on-call engineer.</strong> Grafana, with the business outcome metrics pushed into Prometheus alongside everything else. No dedicated LLM tool will show you infrastructure health next to model quality, and that combined view is what saves you during an incident.</p><figure><img alt="A decision diagram. One question, is AI a feature or the product, splits into two branches. The feature branch points to Grafana. The product branch points to Langfuse self-hosted, LangSmith, or Phoenix depending on the constraint." src="https://cdn-images-1.medium.com/max/1024/1*NsaRkOGgY00VW4xFQe-vYg.png" /></figure><h3>The answer most guides will not give you</h3><p>You do not have to pick one, and you should not architect as though you do.</p><p>Instrument with OpenTelemetry, not with a vendor SDK. Every serious tool here speaks it. The GenAI semantic conventions now live in their own OpenTelemetry repository and are still moving, so pin your versions and expect churn, but the direction is settled and vendors are following it.</p><p>Once your instrumentation is vendor neutral, you can send the same telemetry to two places: metrics and traces into Grafana for the operations job, traces into Langfuse or Phoenix for the evaluation job. That sounds like double the cost and it usually is not, because the two consume very different volumes. Grafana wants cheap high volume metrics. The eval tool wants a sampled slice of full traces with content attached. Send it 5 percent of traffic and you have covered the second job for a fraction of the price.</p><p>More importantly, it makes the decision reversible. The expensive part of observability was never the licence. It was the six months of instrumentation you have to redo when you switch.</p><h3>Three things not to do</h3><p>Do not buy an eval platform to replace your monitoring. It will not alert you when the vector database falls over, and you will find out from a customer.</p><p>Do not try to run prompt experiments and dataset evals in Grafana. You will build a worse version of a product that costs 29 dollars a month, and you will maintain it forever.</p><p>Do not let per-seat pricing decide who is allowed to look at a trace. The whole point of these tools is that the person who understands the domain can see what the model actually said. If your licence makes that expensive, you bought the wrong licence.</p><h3>The short version</h3><p>Ask whether AI is a feature or the product. If it is a feature, you probably already own the right tool. If it is the product, buy something built for prompts and evals, prefer the one you can self-host, and instrument with OpenTelemetry so that this decision stays cheap to change.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6cc39cd841b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>