Saturday, October 31, 2026

What is LookML

 LookML (Looker Modeling Language) is Looker's data modeling language used to define dimensions, aggregates, calculations, and table relationships in a SQL database. [1]

It acts as a semantic layer between your raw database (such as BigQuery, Snowflake, or Redshift) and business users. When a user builds a query in Looker, LookML translates those interactions into optimized SQL queries automatically. [2, 3]

Core Concepts and Components

  • DRY Style (Don't Repeat Yourself): You write complex SQL logic and business rules once in LookML, and Looker reuses the code across multiple reports to prevent duplication and calculation errors.
  • Projects: A collection of LookML files version-controlled together via a Git repository.
  • Models (.model.lkml): Files that define which database tables are used and how they join together.
  • Explores: User-friendly analysis playgrounds built from pre-joined tables where business users can explore data without writing code.
  • Views (.view.lkml): Files that map to database tables and define the structure.
  • Dimensions: Raw data fields or attributes (e.g., customer name, product ID, date).
  • Measures: Calculated or aggregated values based on dimensions (e.g., total sales, average order value, count). [1, 2, 3, 4, 5]

Why LookML is Used

  • Single Source of Truth: Establishes consistent definitions for metrics (like "active user" or "revenue") so all teams pull the same numbers. [6]
  • Version Control: Integrates with Git so changes can be tracked, reviewed, tested, and rolled back safely. [3, 5]
  • Empowers Business Users: Allows non-technical users to query data via simple point-and-click interfaces while abstracting complex SQL scaffolding. [1, 3]
Learn more about building and structuring models in the official Google Cloud Looker Documentation. [1]
Would you like to see a basic code example of a LookML view file and model file, or do you want to learn how Git version control works inside Looker?

Friday, October 30, 2026

LiteLLM Gateway – Custom LLM Integration with JWT Authentication

 1. Objective

Configure a LiteLLM Gateway to access a custom corporate LLM that requires two sequential operations:

  1. Authentication: Call an authentication endpoint using credentials to retrieve a JWT access token.

  2. Inference: Use the retrieved token as a Bearer token when calling an OpenAI-compatible LLM endpoint.

The solution should support token caching, automatic refresh, concurrent requests, error handling and multiple models.

The calling application should continue using the standard LangChain ChatOpenAI class without implementing the JWT authentication logic.

2. Target architecture

Recommended implementation: Deploy a lightweight JWT-aware adapter behind LiteLLM. LiteLLM handles public model aliases and routing; the adapter handles corporate authentication and forwards OpenAI-compatible requests.

This avoids modifying LiteLLM internals and allows the adapter to be tested independently.

3. Project structure

Use the following files:

corporate-llm-gateway/
├── docker-compose.yml
├── .env
├── litellm/
│   └── config.yaml
└── adapter/
    ├── Dockerfile
    ├── requirements.txt
    └── app.py

4. Implement the JWT-aware adapter

The adapter exposes an OpenAI-compatible /v1/chat/completions endpoint. It authenticates with the corporate identity service, caches the access token and forwards inference requests.

This example assumes OAuth 2.0 Client Credentials and a corporate API that already accepts OpenAI-compatible request and response bodies.

adapter/requirements.txt

fastapi
uvicorn[standard]
httpx

adapter/app.py

import asyncio        return token@app.get("/healthz")async def healthz():    return {"status": "ok"}@app.post("/v1/chat/completions")async def chat_completions(request: Request):    if request.headers.get("authorization") != f"Bearer {ADAPTER_KEY}":        raise HTTPException(status_code=401, detail="Unauthorized")    payload = await request.body()    client = request.app.state.http    try:        access_token = await get_token(client)        headers = {            "Authorization": f"Bearer {access_token}",            "Content-Type": "application/json",        }        # A streaming HTTP request also works for normal JSON responses.        upstream_request = client.build_request(            "POST",            CORPORATE_LLM_URL,            content=payload,            headers=headers,        )        upstream = await client.send(            upstream_request,            stream=True,        )        if upstream.status_code == 401:            await upstream.aclose()            access_token = await get_token(                client, force_refresh=True            )            headers["Authorization"] = f"Bearer {access_token}"            upstream_request = client.build_request(                "POST",                CORPORATE_LLM_URL,                content=payload,                headers=headers,            )            upstream = await client.send(                upstream_request,                stream=True,            )        if upstream.status_code >= 400:            status = upstream.status_code            await upstream.aclose()            # Avoid exposing corporate error bodies containing            # sensitive information.            return Response(                content='{"error":"Upstream LLM request failed"}',                status_code=status,                media_type="application/json",            )        content_type = upstream.headers.get(            "content-type", "application/json"        )

This is a functional reference implementation for local integration testing, not a fully hardened production adapter.

It supports normal chat responses and streaming response bodies. It also refreshes the token before expiry and retries once when the upstream rejects an expired token.

For production, add per-request correlation IDs, safe structured logging, metrics, controlled retry policies and explicit cancellation handling. If the authentication endpoint returns a JWT without expires_in, adapt expiry handling to the identity provider's documented contract rather than assuming the default lifetime.

5. Configure LiteLLM

LiteLLM can route a model to an OpenAI-compatible endpoint using the openai/ provider prefix and api_base.

liteLLM
+1

litellm/config.yaml

model_list:
  - model_name: corporate-llm
    litellm_params:
      model: openai/corporate-model
      api_base: http://jwt-adapter:8000/v1
      api_key: os.environ/ADAPTER_KEY

general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY

There are two distinct credentials:

  • LITELLM_MASTER_KEY: Used by your LangChain application to authenticate with LiteLLM.

  • ADAPTER_KEY: Used by LiteLLM to authenticate with the internal adapter.

The adapter obtains the corporate JWT using CLIENT_ID and CLIENT_SECRET. Neither the JWT nor the corporate credentials need to be exposed to your LangChain application.

6. Docker Compose deployment

adapter/Dockerfile

FROM python:3.12-slim

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY app.py .

CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]

docker-compose.yml

services:
  jwt-adapter:
    build: ./adapter
    environment:
      TOKEN_URL: ${TOKEN_URL}
      CLIENT_ID: ${CLIENT_ID}
      CLIENT_SECRET: ${CLIENT_SECRET}
      OAUTH_SCOPE: ${OAUTH_SCOPE:-}
      CORPORATE_LLM_URL: ${CORPORATE_LLM_URL}
      ADAPTER_KEY: ${ADAPTER_KEY}
    expose:
      - "8000"
    restart: unless-stopped

  litellm:
    image: docker.litellm.ai/berriai/litellm:latest
    ports:
      - "127.0.0.1:4000:4000"
    volumes:
      - ./litellm/config.yaml:/app/config.yaml:ro
    environment:
      LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY}
      ADAPTER_KEY: ${ADAPTER_KEY}
    command:
      - "--config"
      - "/app/config.yaml"
      - "--port"
      - "4000"
    depends_on:
      - jwt-adapter
    restart: unless-stopped

.env

TOKEN_URL=https://auth.company.com/oauth2/token
CLIENT_ID=your-client-id
CLIENT_SECRET=your-client-secret
OAUTH_SCOPE=llm.invoke

CORPORATE_LLM_URL=https://llm.company.com/v1/chat/completions

ADAPTER_KEY=replace-with-generated-internal-secret
LITELLM_MASTER_KEY=sk-replace-with-generated-gateway-key

Use independently generated high-entropy secrets for both keys. Keep .env out of version control and restrict its file permissions. In production, pin dependency versions and the LiteLLM container image.

Start the services:

docker compose up -d --build

The gateway is bound to VM loopback for local testing. If the application runs on another VM, expose LiteLLM through a secured HTTPS reverse proxy rather than publishing port 4000 openly.

7. Test using LangChain ChatOpenAI

Your application does not need to know about the JWT authentication process.

import osfrom langchain_openai import ChatOpenAIllm = ChatOpenAI(    model="corporate-llm",    base_url="http://localhost:4000/v1",    api_key=os.environ["LITELLM_MASTER_KEY"],    temperature=0.2,    timeout=120,)response = llm.invoke(    "Explain why a BGP session can remain in Idle state.")print(response.content)

For streaming:

for chunk in llm.stream(    "Explain Kubernetes pod networking."):    print(chunk.content, end="", flush=True)

Request processing sequence

  1. LangChain sends a request to LiteLLM using its gateway key.

  2. LiteLLM resolves the corporate-llm model alias and forwards the request to the JWT adapter.

  3. The adapter checks its token cache. If necessary, it calls the corporate authentication endpoint.

  4. The adapter sends the OpenAI-compatible request with Authorization: Bearer <JWT>.

  5. The corporate LLM returns its response through the adapter and LiteLLM to LangChain.

Subsequent requests reuse the cached token until refresh is required.

8. Production considerations

Area

Recommended implementation

Token management

Cache and refresh before expiry

Concurrent requests

Prevent simultaneous refreshes

Authentication failures

Refresh once on upstream HTTP 401

Credentials

Kubernetes Secrets or external secret manager

Network security

HTTPS, internal-only adapter access

High availability

Token cache per replica or shared token manager

Streaming

Preserve SSE chunks and cancellation

Observability

Log latency, errors and token refresh events without exposing credentials

Model support

Verify tool calling, structured output and streaming

Model routing

Stable LiteLLM aliases mapped to corporate model IDs

Implementation detail: The example forwards the JSON request unchanged. Therefore, the corporate API must accept the model ID corporate-model and the standard OpenAI chat-completion payload. If the corporate API uses a different model ID or expects additional headers, implement that translation in the adapter.

Also, the example covers chat completions only. Embeddings, the Responses API and other endpoints require separate adapter routes.

9. Instructions for your coding agent

Task: Implement JWT-authenticated Corporate LLM Integration with LiteLLM

Implement a reusable integration that enables LiteLLM Gateway to route inference requests to a corporate OpenAI-compatible LLM endpoint requiring JWT authentication.

Architecture

LangChain / LangGraph → LiteLLM Proxy → JWT Authentication Adapter → Corporate LLM API.

Functional requirements

  1. Configure LiteLLM with a custom model alias and OpenAI-compatible upstream endpoint.

  2. Implement a Python FastAPI adapter that obtains JWT access tokens from a configurable authentication endpoint.

  3. Support OAuth 2.0 Client Credentials authentication, with configurable token URL, credentials and scope.

  4. Cache access tokens and refresh them before expiry.

  5. Prevent duplicate token refresh requests under concurrent workloads.

  6. Inject the access token into upstream requests using the Bearer authorization header.

  7. Support standard OpenAI chat-completion requests, including streaming.

  8. Retry authentication once when an upstream request receives HTTP 401.

  9. Propagate appropriate HTTP errors without exposing credentials or sensitive upstream responses.

  10. Support multiple model aliases and configurable upstream model mappings.

  11. Keep all URLs, model IDs, credentials and timeouts environment-driven.

  12. Provide Docker Compose deployment for local development and Helm/Kubernetes deployment for production.

  13. Add health checks, structured logging, timeout controls and metrics.

  14. Implement automated tests covering token caching, expiry, refresh, concurrent requests, upstream errors, normal inference and SSE streaming.

  15. Document the integration using LangChain ChatOpenAI, including synchronous and asynchronous calls.

Security requirements

  • Never expose JWTs, client secrets or gateway credentials in application logs.

  • Use TLS verification for corporate authentication and inference endpoints.

  • Restrict direct access to the internal adapter.

  • Store credentials using Kubernetes Secrets or a dedicated secrets manager.

  • Avoid forwarding incoming gateway authorization headers to the corporate endpoint.

Acceptance criteria

The existing LangChain/LangGraph application must be able to invoke the corporate LLM using only model, base_url and api_key, without requiring any application-level JWT handling.

Use version-pinned dependencies and provide an executable local integration test with mocked authentication and LLM endpoints.

Recommendation: For your architecture, this adapter-based approach provides a clean separation between model routing and corporate authentication. It also allows the same LiteLLM instance to serve Ollama, standard cloud models and JWT-protected corporate models.

Reference: LiteLLM official documentation.

LiteLLM accessing thorugh OpenAI langchain class

 

Accessing LiteLLM Gateway using LangChain ChatOpenAI

LiteLLM Gateway provides an OpenAI-compatible API, allowing applications to access different LLM providers through a single gateway endpoint.

If your Python application already uses langchain-openai, you can directly use the ChatOpenAI class to connect to LiteLLM without installing additional LiteLLM libraries.

1. Required configuration

Your customer typically provides:

Parameter

Description

Usage

Gateway URL

LiteLLM API endpoint

base_url

API Key (sk-...)

Authentication token

api_key

Model ID

Model configured in LiteLLM

model

Key Alias

Administrative name for the key

Not required

Key Hash

Hashed key identifier

Not required

Environment

DEV / TEST / PROD

Configuration selection

2. Install dependencies

pip install langchain-openai

Configure environment variables:

export LITELLM_BASE_URL="https://gateway.customer.com/v1"
export LITELLM_API_KEY="sk-your-api-key"
export LITELLM_MODEL="customer-model-id"

The URL must be the customer's OpenAI-compatible API base URL. Do not append /v1 if it is already included.

3. Basic LLM invocation

import osfrom langchain_openai import ChatOpenAIllm = ChatOpenAI(    model=os.environ["LITELLM_MODEL"],    base_url=os.environ["LITELLM_BASE_URL"],    api_key=os.environ["LITELLM_API_KEY"],    temperature=0.2,    timeout=60,    max_retries=2,)response = llm.invoke(    "Explain the difference between BGP and OSPF.")print(response.content)

The request is sent to the LiteLLM Gateway, which routes it to the configured underlying LLM.

4. Additional examples

Example A: System and user messages

from langchain_core.messages import SystemMessage, HumanMessageresponse = llm.invoke([    SystemMessage(        content="You are an expert network troubleshooting assistant."    ),    HumanMessage(        content="Why is my BGP neighbor stuck in Idle state?"    ),])print(response.content)

Example B: Streaming responses

for chunk in llm.stream(    "Explain Kubernetes networking."):    print(chunk.content, end="", flush=True)

This works when streaming is supported by the selected model and gateway.

Example C: Async invocation

import asyncioasync def main():    response = await llm.ainvoke(        "Explain how gRPC load balancing works."    )    print(response.content)asyncio.run(main())

Example D: Tool calling

from langchain_core.tools import tool@tooldef get_device_status(device_id: str) -> str:    """Retrieve the current status of a network device."""    return f"Device {device_id} is reachable"llm_with_tools = llm.bind_tools([get_device_status])response = llm_with_tools.invoke(    "Check the status of router R1.")print(response.tool_calls)

This example demonstrates how the model generates tool calls. The application or agent must execute the requested tools. The gateway and selected model must support tool calling.

5. Using multiple models through the same gateway

You can create different ChatOpenAI instances pointing to the same LiteLLM Gateway.

def get_llm(model_name: str):    return ChatOpenAI(        model=model_name,        base_url=os.environ["LITELLM_BASE_URL"],        api_key=os.environ["LITELLM_API_KEY"],    )planner_llm = get_llm("planner-model-id")supervisor_llm = get_llm("supervisor-model-id")summarizer_llm = get_llm("summarizer-model-id")

These IDs must correspond to models exposed by the customer's gateway and authorized for your API key.

6. Architecture

7. Important considerations

  • Model discovery: Use the OpenAI SDK's client.models.list() or the gateway's /models endpoint to identify permitted model IDs, if enabled.

  • Authentication: Use the actual sk-... API key, not the key alias or hash.

  • Compatibility: Validate tool calling, streaming, structured outputs and model-specific parameters.

  • Security: Store credentials in environment variables, secret managers or Kubernetes Secrets. Never hardcode them.

  • Production: Configure timeouts, retries, TLS verification and appropriate error handling.

Summary

Requirement

Recommendation

Python library

langchain-openai

LangChain class

ChatOpenAI

Gateway configuration

base_url

Authentication

api_key

Model selection

model

LangGraph compatibility

Yes, subject to model capabilities

Additional LiteLLM SDK

Not required

Existing AzureChatOpenAI

Replace with ChatOpenAI for LiteLLM connections

Final recommendation: For your existing LangChain/LangGraph application, introduce LiteLLM as a configurable provider using ChatOpenAI. This allows you to reuse the same agent orchestration, prompts, tools and streaming interfaces while routing inference requests through the customer's centralized LLM Gateway.

Wednesday, October 28, 2026

Differences between Helm and Kubernetes Yaml files

 Both approaches ultimately create the same Kubernetes resources (Deployments, Services, PVCs, ConfigMaps, etc.). The main difference is how those resources are configured, deployed, upgraded, and managed.

1. Helm vs traditional Kubernetes YAML

Feature

Traditional YAML (kubectl)

Helm Charts

Configuration

Hardcoded in YAML files

Parameterized using values.yaml

Deployment

kubectl apply -f

helm install / helm upgrade

Environment support

Separate YAMLs or Kustomize overlays

Separate values files

Reusability

Manual duplication

Templates and reusable charts

Versioning

Git-based

Git + Helm release revisions

Rollback

Manual or workload-specific

helm rollback

Dependencies

Managed separately

Helm chart dependencies

Complexity

Simple

Requires learning templating

Best suited for

Small, static deployments

Multi-environment applications

2. Example: Deployment using both approaches

Traditional Deployment YAML


apiVersion: apps/v1
kind: Deployment
metadata:
  name: ai-core
spec:
  replicas: 2
  template:
    spec:
      containers:
        - name: ai-core
          image: myapp/ai-core:1.0.0
Illustrative snippet; a complete Deployment also requires selectors and Pod labels.

Helm Deployment template


apiVersion: apps/v1
kind: Deployment
metadata:
  name: ai-core
spec:
  replicas: {{ .Values.aiCore.replicas }}
  template:
    spec:
      containers:
        - name: ai-core
          image: "{{ .Values.aiCore.image }}"

Helm values.yaml


aiCore:
  replicas: 2
  image: myapp/ai-core:1.0.0

Helm substitutes the values into the template and generates ordinary Kubernetes YAML, which Kubernetes then processes.

3. How deployment commands differ

Traditional Kubernetes

kubectl apply -f kubernetes/

Helm — Minikube

helm upgrade --install myapp ./helm/myapp \
  -f ./helm/myapp/values-minikube.yaml

Helm — Production

helm upgrade --install myapp ./helm/myapp \
  -f ./helm/myapp/values-production.yaml

The same Helm templates can be used in both environments, with different image tags, storage settings, resource limits, and network configurations.

4. Important: Helm doesn't replace Kubernetes YAML

Your Helm chart still contains Deployment, Service, StatefulSet, PVC, and other Kubernetes YAML definitions.

The structure typically looks like:

helm/myapp/
├── Chart.yaml
├── values.yaml
├── values-minikube.yaml
├── values-production.yaml
└── templates/
    ├── deployment.yaml
    ├── service.yaml
    ├── statefulset.yaml
    ├── pvc.yaml
    └── httproute.yaml

You can inspect the exact YAML Helm will generate:

helm template myapp ./helm/myapp \
  -f ./helm/myapp/values-production.yaml

This is particularly useful for debugging Helm charts.

5. Which should you use?

For your application, Helm is the better choice because you have Docker Compose for development, Minikube for testing, and a self-managed production Kubernetes cluster.

Helm also helps with your offline release bundles, upgrades, and rollback procedures.

One limitation: helm rollback restores Kubernetes resource configuration, but does not automatically roll back PostgreSQL schema changes or persistent data.

A useful way to think about it:

Traditional YAML = Define Kubernetes resources.

Helm = Package, configure, deploy, and manage those Kubernetes resources across environments.

Tuesday, October 27, 2026

What is Daytona and E2B Sandboxes?

 Both Daytona and E2B are cloud-based sandbox providers designed to let AI coding agents, large language models (LLMs), and developers safely execute code, run tools, and spin up isolated computer environments. [1, 2, 3, 4]


Core Differences

FeatureDaytonaE2B
Isolation TechnologyDocker containers by default (with Kata/Sysbox opt-in)Firecracker microVMs with dedicated kernels and hardware-level isolation
Cold Start Speed~742ms (create) / ~1254ms (resume)~717ms (create) / ~662ms (resume)
GPU SupportYesNo
Persistence / StatesFork, pause/resume, snapshot, and persistent workspacesMemory-preserving pause/resume and snapshots
Open Source StatusMoved core development to a private codebase (closed-source production)Open-source runtime (Apache-2.0) with managed cloud and self-host options
Primary FocusPersistent developer workspaces, multi-file environments, and GPU-backed AI executionEphemeral, stateless or memory-preserved microVMs for untrusted AI-generated code

What is Daytona?

Daytona is a sandbox and workspace platform built for fast, reproducible development environments and AI agent execution. [2, 5]
  • Under the Hood: Uses Docker containers by default for fast creation times, alongside options for heavier microVM or Kata isolation. [1, 6, 7]
  • Key Strengths: It supports GPUs, Windows and macOS/Linux environments, Git integration, and persistent workspaces that can be paused, snapshotted, or archived. [6, 8, 9, 10]
  • Best Used For: AI agents or workflows that require GPU acceleration, custom desktop/GUI environments, or stateful, long-running project codebases. [7, 9, 11]

What is E2B?

E2B (Engine to Build) is an open-source cloud infrastructure platform built specifically for safe AI agent code execution. [2, 12]
  • Under the Hood: Uses Firecracker microVMs to give every single sandbox its own isolated kernel and hardware-level security.
  • Key Strengths: Ultra-fast ephemeral sandbox creation, memory-preserving pause-and-resume states, and strict network/secret controls.
  • Best Used For: Running untrusted AI-generated code, code interpreters, and multi-step agentic workflows where strict security and isolation from the host system are top priorities. [1, 2, 5, 11, 13]

If you are deciding between the two, tell me:
  • Are you running GPU-heavy workloads or standard CPU code?
  • Do you need ephemeral (disposable) execution or persistent project workspaces?

What is Google Jules Coding Agent?

 Google Jules is an autonomous, asynchronous AI coding agent developed by Google Labs and powered by Gemini models (such as Gemini 2.5 Pro and Gemini 3 Pro). [1, 2, 3]

Unlike real-time AI coding assistants like GitHub Copilot or ChatGPT (which suggest code while you type or chat), Jules acts as an independent background teammate. [4, 5]

Core Functions & Workflow

  • Task Delegation: You assign high-level or scoped tasks (such as fixing bugs, writing tests, bumping dependencies, or building new features) via GitHub, the web app, the command-line interface (Jules Tools), or the Jules API. [2, 6, 7, 8]
  • Cloud Sandboxing: Jules clones your repository into a secure Google Cloud virtual machine (VM), analyzes project context, executes a plan, runs tests, and works independently in the background. [1, 2]
  • Pull Requests: Once finished, it presents its reasoning, plan, and a code diff for your approval before generating a standard GitHub pull request. [2, 9]
  • Privacy: It operates privately by default and does not train on your private code. [2]

How to Access It

You can try or manage tasks through the official Google Jules website, via GitHub integration, or by installing the CLI tool via npm (npm install -g @google/jules). [1, 2, 6]
Would you like to know more about Jules' pricing tiers, how to set it up with a GitHub repository, or how it compares to tools like Google Antigravity?

What is Open SWE?

 Open SWE is an open-source, asynchronous cloud coding agent and framework built by LangChain using LangGraph and Deep Agents. [1, 2, 3]

What It Does

  • Autonomous Engineering: Investigate codebases, plan changes, write code, run tests, and open or update pull requests automatically from GitHub issues, Slack, Linear, or custom dashboards. [1, 2, 4]
  • Multi-Agent Architecture: Uses specialized agents including a Manager (router/state initialization), a Planner (codebase research and execution plans), and a Programmer paired with a built-in Reviewer subagent. [3, 5]
  • Isolated Cloud Sandboxes: Executes code, installs dependencies, and runs shell commands safely inside isolated container environments (such as Daytona or E2B) away from your local machine. [4, 6, 7]
  • Human-in-the-Loop Controls: Supports plan reviews, interactive feedback ("double texting" during tasks), and read-only PR chats. [3, 5]
  • Maintenance & Review: Can run automatic PR reviews, learn repository-specific preferences, monitor CI workflows, and diagnose flaky tests. [2]

Key Framework Components

  • Agent Harness: Composed on Deep Agents for built-in planning, file-based context, and subagent spawning.
  • Durable Execution: Powered by LangGraph Platform for stateful workflows and observability via LangSmith.
  • Customizability: MIT-licensed source code allowing teams to fork, configure custom prompts, swap sandbox providers, and wire in proprietary tools. [1, 2, 3, 5]
If you'd like, I can share:
  • How to install or self-host Open SWE
  • How it compares to commercial coding agents like Claude Code or Google Jules
  • How to connect it with GitHub and Linear

Claude Managed Dynamic Agent workflows

 Claude Managed Agents dynamic workflows is a feature in Anthropic's Claude Managed Agents (released in public beta on October 9, 2026) that allows a lead AI agent to write and execute a program to orchestrate multiple subagents in phases. [1, 2, 3]

Instead of an orchestrator making turn-by-turn decisions and stuffing every intermediate result into a single conversation context window, the lead agent generates a structured script (such as JavaScript) that handles loops, branching, and parallel execution in the background. [4, 5]

Key Characteristics & Mechanics

  • Programmatic Orchestration: A lead agent writes an automated execution plan that launches, coordinates, and combines outputs from numerous agents without direct human or manual script-writing. [2, 3]
  • Scale & Limits: Each workflow run can support up to 1,000 agents over its lifetime, with up to 64 concurrent working threads at a time. [3]
  • Background Execution: The server runs the workflow program asynchronously in the background while your main session thread stays free. Progress and events stream back via an event stream (workflow_run.events). [1, 3, 4]
  • Adversarial & Multi-Phase Loops: Workflows can implement multi-step quality controls, such as having separate agents independently implement a task, run adversarial verification, and use an independent fixer agent to reconcile errors. [4, 6]
  • Common Use Cases: Ideal for massive, complex workloads that exceed a single conversation's capacity, such as codebase-wide bug sweeps, large-scale migrations (e.g., 500+ files), and cross-checked multi-source research. [4]

Pricing & Setup

  • Cost Structure: There is no separate flat fee to start a workflow run; the underlying tokens are billed at standard model rates, plus a Managed Agents session runtime fee of $0.08 per session-hour. Budgets and limits can be set to cap total spend. [1, 3]
  • How to Enable: You can activate multiagent handling in your agent configuration (multiagent: multiagent_20261001) or toggle dynamic workflows via /config or /effort settings in Claude Code. [2, 4]
Would you like to know how to configure a dynamic workflow script or see an example of setting up multiagent orchestration for a specific project?

Monday, October 26, 2026

What is Project Glasswing?

 Project Glasswing is an industry-wide initiative launched by Anthropic in April 2026 to use advanced artificial intelligence for defensive cybersecurity and pre-release software hardening. [1, 2]

Key Aspects of Project Glasswing

  • Core Purpose: The project finds, patches, and defends against high-severity software vulnerabilities and zero-day exploits before malicious actors can discover them. [1, 3]
  • Powered by Claude Mythos: The initiative centers around Claude Mythos Preview (and subsequent updates), an unreleased frontier AI model designed for contextual reasoning and autonomous security research. The model can trace complex code paths, chain multiple low-severity flaws into attack paths, and generate proofs-of-concept. [1, 4, 5]
  • Industry Coalition & Partners: Anthropic formed the coalition alongside major tech and infrastructure providers, including AWS, Google, Microsoft, Apple, Broadcom, Cisco, CrowdStrike, JPMorgan Chase, NVIDIA, Palo Alto Networks, and the Linux Foundation. It later expanded to over 40 critical infrastructure, utility, healthcare, and telecommunications organizations. [1, 5, 6, 7]
  • Funding and Support: Anthropic committed up to $100 million in API/model usage credits for participants and millions in direct donations to open-source security organizations (such as the Linux Foundation's OpenSSF and the Apache Software Foundation) to help maintainers patch newly uncovered legacy bugs. [1, 8]
  • Access Control: Because the underlying Claude Mythos model possesses powerful offensive capabilities, it is not released to the general public; access is strictly restricted to vetted partners and defensive operators. [7, 9]
Would you like to know more about the technical capabilities of Claude Mythos or how open-source maintainers are handling the vulnerabilities discovered by the project?

What is Evilginx

 Evilginx is an open-source adversary-in-the-middle (AiTM) reverse-proxy phishing framework used primarily by penetration testers and red teams to simulate advanced phishing attacks. Its defining capability is its power to bypass multi-factor authentication (MFA) by stealing session cookies rather than just static passwords. [1, 2, 3]

Written entirely in Go, modern versions operate as standalone applications equipped with their own built-in HTTP and DNS servers. [4]

How Evilginx Works

Unlike traditional phishing kits that use static, cloned HTML copies of a login page, Evilginx acts as a live proxy. [5, 6]
[ Victim ] <---> [ Evilginx Proxy (Attacker Domain) ] <---> [ Legitimate Service (e.g., Microsoft) ]
  1. The Relay: When a victim navigates to an Evilginx phishing link (the "lure"), the framework acts as a middleman. It dynamically requests the actual, legitimate login page from the target service (like Microsoft 365, Okta, or Google) and forwards it to the victim. [2, 6]
  2. Real-time Interaction: The user interacts with a completely authentic page because the forms, graphics, and text are pulled directly from the real provider in real time. The user enters their username, password, and completes any secondary authentication (such as an SMS OTP or authenticator app prompt). [6, 7, 8]
  3. Token Hijacking: Once authentication is successful, the legitimate service issues a session cookie (or token). Evilginx intercepts and logs this session cookie before passing it back to the victim. [1, 2, 3, 5]
  4. Account Takeover: The attacker can import this stolen session cookie into their own browser. Because the cookie proves the MFA handshake already happened, the attacker bypasses the MFA wall entirely and gains full access to the account. [1, 3, 9]

Key Terminology & Concepts

  • Phishlets: Configuration files (written in YAML) that instruct Evilginx how to proxy specific websites. They contain the specific domain tracking rules, text replacement rules, and definitions for which exact cookies must be stolen to hijack a session. [10]
  • Lures: The specific URLs generated by Evilginx to send to targets. They pair a chosen domain with a specific phishlet to redirect a victim to the appropriate proxied page. [6, 11]
  • Evilginx Pro: A commercial, strictly vetted enterprise tier developed by the framework's creator (Kuba Gretzky). It features stealth optimizations like client-server architecture, behavior-based bot blocking ("Botguard"), automated JavaScript obfuscation, and evasions for Google Safe Browsing. [1, 12, 13, 14]

Why Standard MFA Fails (and What Stops It)

Evilginx bypasses "traditional" multi-factor authentication—such as SMS codes, email verification, and standard authenticator app push notifications—because it relies on the user actively supplying the code to the proxy. [7, 8]
To completely neutralize an Evilginx attack, organizations must deploy phishing-resistant MFA: [7]
  • FIDO2 / Passkeys: WebAuthn standards and passkeys use strict domain binding. During authentication, the browser cryptographically verifies the actual domain name in the address bar. If a user is on an Evilginx proxy domain (://micros0ft.com) instead of the real domain (://microsoft.com), the security key/passkey refuses to sign the challenge, rendering the attack useless. [7, 8]

How does a Policy Governance layer look like in AI application?

 For your Python-based AI Network Troubleshooting Platform, I recommend implementing Data Governance as a centralized governance and policy enforcement layer that controls how data is collected, accessed, stored, processed, shared with AI agents, and retained.

Your application is more complex than a traditional chatbot because it combines network device access, LLM reasoning, MCP servers, external tools, user management, and custom agents. Data governance therefore needs to cover both traditional application data and agentic AI execution.

The key architectural principle should be:

Every user, agent, MCP server, and tool must operate within explicitly defined data access permissions, with auditable enforcement at every trust boundary.

1. Proposed data governance architecture

Logical architecture. Governance is a cross-cutting control plane; enforcement also occurs inside the API, AI core, tool gateway, database, and device connectors.

You do not necessarily need another container for every governance capability. Start with a reusable Python governance package shared by the API and AI core, then introduce a dedicated policy service when independent deployment or scaling becomes necessary.

2. Ten governance capabilities to implement

Capability

Purpose

Recommended implementation

1. Data classification

Identify sensitivity of device data, prompts, credentials, logs

Classification labels and metadata

2. Identity management

Authenticate users and service identities

OIDC/JWT, service identities

3. Authorization

Control which data and actions are accessible

RBAC + ABAC

4. Data isolation

Prevent cross-user, tenant, or project access

PostgreSQL RLS and tenant scoping

5. AI governance

Control what agents and LLMs can access

Agent policy enforcement

6. MCP governance

Restrict tool discovery, invocation, and outputs

MCP tool gateway

7. Data protection

Protect sensitive information

Encryption, masking, secret management

8. Data lineage

Track data from source to answer

Trace IDs and provenance records

9. Audit and monitoring

Record sensitive actions and policy decisions

Append-only audit events and alerts

10. Lifecycle management

Govern retention, deletion, and archival

Retention policies and cleanup jobs

3. Data classification for network troubleshooting

Your application should classify network information before storing it or passing it to agents.

Classification

Example

Default handling

Public

Product documentation, generic troubleshooting guides

Accessible to authorized application users

Internal

Device inventory, interface status, topology

Organization-scoped access

Confidential

Configuration files, internal IP addresses, routing details

Restricted roles, selective masking

Restricted

Passwords, SNMP community strings, private keys, TACACS secrets

Never expose to LLM context; secure secret storage

Classification should attach to individual data objects, not just database tables.

For example:

{
  "resource_type": "device_configuration",
  "device_id": "router-101",
  "tenant_id": "tenant-A",
  "classification": "confidential",
  "owner": "network-operations",
  "allowed_purposes": ["troubleshooting"],
  "retention_days": 30
}

The 30-day value is illustrative; production retention should be based on your organization's policy.

4. Authorization: RBAC combined with ABAC

For your application, Admin and User roles alone will not be sufficient.

I suggest starting with these roles:

Role

Permissions

Platform Admin

Manage platform configuration and governance

Organization Admin

Manage users, devices, and policies within an organization

Network Operator

Troubleshoot assigned devices and run approved commands

AI Agent Developer

Create and configure custom agents

Standard User

Run permitted troubleshooting conversations

Auditor

Read governance logs and policy evidence

RBAC determines broad permissions, while ABAC evaluates additional attributes such as device ownership, environment, classification, and action risk.

Example:

A Network Operator asks an agent to execute show running-config on a production router.

The policy engine evaluates:

{
  "subject": {
    "role": "network_operator",
    "tenant_id": "tenant-A"
  },
  "resource": {
    "type": "network_device",
    "device_id": "router-101",
    "tenant_id": "tenant-A",
    "environment": "production"
  },
  "action": "read_configuration",
  "context": {
    "purpose": "troubleshooting",
    "approval": false
  }
}

The decision might be allow_with_redaction if the operator has configuration-read permission. Sensitive credentials are removed before the result enters the LLM context.

A configuration-changing command should require a separate permission and potentially human approval.

Important: User authorization must also constrain agents. An agent should never acquire greater access merely because its MCP server or device connector uses a privileged service account.

5. MCP server and custom agent governance

This is one of the most important areas in your architecture.

User Request

AI Agent

Policy Check

Network Device

MCP Tool

Allowed Action

Every MCP invocation is authorized before execution; tool results are classified and filtered again before reaching the model.

For custom agents, introduce an Agent Registry with versioned definitions and approval states.

Each agent should declare its allowed tools, permitted data classifications, resource scope, execution limits, and whether it can perform write operations.

Example:

agent:
  name: network-diagnostics
  version: "1.0"
  owner: network-operations
  status: approved

  permissions:
    allowed_tools:
      - get_interface_status
      - get_device_logs
      - get_routing_table
    denied_tools:
      - reload_device
      - change_configuration

  data_access:
    maximum_classification: confidential
    tenant_scope: current_user

  execution:
    max_tool_calls: 10
    require_approval_for_writes: true

These definitions must be enforced server-side, not merely inserted into an agent's system prompt.

For MCP specifically, enforce tool allowlists, trusted server registration, input validation, output sanitization, tool-call limits, and explicit approval for high-risk operations. Treat MCP responses as untrusted data because malicious or compromised device output could contain prompt-injection instructions.

6. PostgreSQL data governance model

You can extend your existing PostgreSQL database rather than introducing a separate governance database initially.

I recommend these logical table groups:

Group

Suggested tables

Identity

users, roles, permissions, user_roles

Organizations

tenants, teams, memberships

Network inventory

devices, device_groups, device_access

Agent registry

agents, agent_versions, agent_permissions

MCP registry

mcp_servers, mcp_tools, tool_permissions

Data governance

data_assets, classifications, retention_policies

Policies

policies, policy_versions, policy_decisions

Audit

audit_events, tool_executions, data_access_events

AI lineage

conversation_traces, agent_runs, data_lineage

Use PostgreSQL Row-Level Security to enforce tenant boundaries, with carefully configured application roles that cannot bypass RLS.

For sensitive operational records, consider separating application transaction data from immutable or tamper-evident audit storage.

7. Data lineage and AI observability

A traditional audit log recording only username and timestamp is insufficient for an agentic troubleshooting application.

For each troubleshooting request, you should be able to reconstruct:

Example execution trace

  1. User: Network Operator submits a BGP troubleshooting question.

  2. Agent: Routing Diagnostics Agent v1.2 is selected.

  3. Policy: User and agent are authorized for router-101.

  4. Tool: MCP invokes get_bgp_neighbors.

  5. Data: Device response is classified and sanitized.

  6. LLM: Model generates a diagnosis using approved context.

  7. Audit: Trace, policy decisions, tool calls, and source references are recorded.

Capture correlation IDs across NGINX, API, AI core, and MCP tools. Record model and prompt versions, tool versions, device identifiers, policy decisions, latency, and outcome status.

Avoid indiscriminately logging raw prompts or full device outputs because those may contain credentials or sensitive infrastructure information.

8. Recommended Python technology stack

Requirement

Technology

API enforcement

FastAPI dependencies and middleware

Policy engine

Open Policy Agent (OPA) or Casbin

Identity

OIDC provider, JWT validation, TACACS+ integration where appropriate

Database isolation

PostgreSQL RLS

Secret management

HashiCorp Vault or cloud secret manager

AI observability

OpenTelemetry and Langfuse

Metrics

Prometheus and Grafana

Structured logging

Python structlog

Data validation

Pydantic

Encryption

TLS and encrypted database/storage volumes

For your current containerized architecture, Casbin may be simpler for initial embedded authorization, while OPA becomes attractive when you need consistent policy decisions across independent containers and MCP services.

Neither tool alone supplies classification, retention, audit, or lineage. Those must be designed separately.

9. Suggested implementation sequence

Implementation checklist

0 / 18 completed

Phase 1 — Foundation

Phase 2 — Agent and MCP controls

Phase 3 — Protection and lineage

Phase 4 — Enterprise governance

10. My recommendation for your first version

I would prioritize five mandatory controls before expanding the platform:

  1. Central authorization: RBAC + ABAC for users, agents, devices, and MCP tools.

  2. Tenant isolation: PostgreSQL RLS and tenant-aware access checks at every boundary.

  3. MCP and agent guardrails: Strict tool allowlists, approval for writes, and execution limits.

  4. Data protection: Classification, credential redaction, encryption, and secrets management.

  5. End-to-end auditability: Correlate user requests, agent reasoning steps, tool executions, policy decisions, and network data sources.

This provides a practical governance foundation aligned with concepts from NIST AI RMF, NIST SP 800-53, and ISO/IEC 42001, although implementing these controls alone does not establish compliance.

The next architectural decision is whether you want data governance embedded within the existing four containers or a separate centralized Governance Service with its own APIs and policy engine.

For your platform, I would lean toward a hybrid: centralized policy definitions and decisions, but distributed enforcement within FastAPI, the AI core, and the MCP gateway. This avoids governance becoming a single bypassable checkpoint while preserving a consistent policy model.

I can next detail the production-ready database schema, Python package structure, FastAPI middleware, authorization policies, MCP governance gateway, and Docker Compose changes for this architecture.