Short introduction to

Coding Agents

Andre Weiner, Institute of Fluid Mechanics

Overview

Coding agents

01

coding harnesses, model deployment options

Recent LLM developments

foundational models, reasoning, agents

02

03

Example use cases

Codex and OpenCode

Recent LLM developments

06/2017

"Attention is all you need"

11/2022

ChatGPT public research preview

2022

reasoning improvements

chain-of-thought, self-consistency, Reasoning and Acting (ReAct)

scalable LLM training

instruction-tuned, chat-like LLM interface

11/2024

OpenAI o1reasoning model

reasoning as learning objective

2025

Rollout of Codex, Claude Code, Copilot, etc.

access to local tools and files

The agent loop:

user promt

reason

call tool

observe

reason/answer

User: calculate 17 x 23 + 5

Agent:

This task requires exact arithmetic. I should use a calculator.

Tool call:

calculate("17 * 23 + 5")

Tool result:

396

Agent: The result is 396.

Coding Agents

Reasoning model

Agent harness

Proprietary

  • Codex (OpenAI)
  • Claude Code (Antropic)
  • GitHub Copilot (Microsoft)

Open Source

  • OpenCode
  • Cline
  • ...

Proprietary

  • GPT 5.6 Sol (OpenAI)
  • Claude Opus 4.8 (Antropic)

Open Weight

  • GLM 4.7
  • Qwen3 Coder Next
  • Devstral 2 123B
  • ...

Reading suggestion: Components of a Coding Agent

LLM setup options

  • commercial models; don't use with proprietary data or code
  • SCADS.AI service (TUD), ZIH infrastructure
  • GWDG service (SAIA); secured infrastructure within Germany
  • locally hosted models (Ollama); most secure; restricted model size

Suggested reading: Using local Coding Agents

Agent harness setup

  • command line or code editor plugin (VSCode, Curser, ...)
  • recommendation: harness and LLM by the same provider
  • remote setup via VSCode

Steps to set up OpenCode and SCADS.AI:

  1. go to selfservice.tu-dresden.de/services/scads-llm-api/api-access/
  2. generate an API key
  3. install OpenCode 
  4. make key available: export SCADSAI_API_KEY="your-api-key"
  5. configure OpenCode

 

curl -sS https://llm.scads.ai/v1/models \
  -H "Authorization: Bearer ${SCADSAI_API_KEY}" |
  jq -r '.data[].id'

Test SCADS.AI API: query available models

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "scads": {
      "name": "ScaDS.AI",
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "https://llm.scads.ai/v1",
        "apiKey": "{env:SCADSAI_API_KEY}",
        "timeout": 600000
      },
      "models": {
        "alias-code": {
          "name": "ScaDS Code",
          "limit": {
            "context": 131072,
            "output": 32768
          }
        },
        "Qwen/Qwen3-Coder-30B-A3B-Instruct": {
          "name": "Qwen3 Coder 30B",
          "limit": {
            "context": 131072,
            "output": 32768
          }
        },
        "zai-org/GLM-5.2-FP8": {
          "name": "GLM 5.2",
          "limit": {
            "context": 524288,
            "output": 32768
          }
        },
        "google/gemma-4-31B-it": {
          "name": "Gemma 4 31B",
          "limit": {
            "context": 262144,
            "output": 32768
          }
        }
      }
    }
  },
  "model": "scads/alias-code",
  "small_model": "gwdg-saia/qwen3-coder-next"
}

SCADS.AI: minimal ~/.config/opencode/opencode.json
 

Steps to set up OpenCode and Academic Cloud (GWDG):

  1. create account at https://academiccloud.de (Shibboleth)
  2. request SAIA API key via KISSKI (takes a few days)
  3. install OpenCode 
  4. make key available: export SAIA_API_KEY="your-api-key"
  5. configure OpenCode

 

curl -s https://chat-ai.academiccloud.de/v1/models \
  -H "Authorization: Bearer ${SAIA_API_KEY}" |
  jq -r '.data[].id'

Test SAIA API: query available models

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "gwdg-saia": {
      "name": "GWDG SAIA",
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "https://chat-ai.academiccloud.de/v1",
        "apiKey": "{env:SAIA_API_KEY}"
      },
      "models": {
        "glm-4.7": {
          "name": "GLM 4.7"
        },
        "qwen3-coder-next": {
          "name": "Qwen3 Coder Next"
        },
        "devstral-2-123b-instruct-2512": {
          "name": "Devstral 2 123B"
        }
      }
    }
  }
}

SAIAA: minimal ~/.config/opencode/opencode.json
 

Example use cases

I have force coefficient data coming from the turbulent flow past a cylinder.
The data is located at /home/andre/datasets/cylinder3D/forces/coefficients.pt
Create a Python script that does the following:
- load the coefficient data
- plot cx and cy over dimensionless time in two subplots arranged vertically
- normalize time using convective time units
- the diameter is 0.1m and the inflow velocity is 39m/s
Format the plot as follows:
- dark stylesheet
- transparent background for the canvas
- latex rendering
- 16:9 figure aspect ratio
- 320 dpi resolution
- use bbox_inches="tight" when saving as png
- set the x-limit to the data limit
- use dashed gridlines with 50% opacity
- enlarge the fontsize by 50%
- share the x-axis
- use mathematical symbols for the axis labels

Example 1: plotting force coefficients from a file

I have local installation of OpenFOAM-v2606.
- extract code-consistent equations for the GEKO turbulence model
- distinguish between compressible and incompressible RAS models
- write the equations in a file GEKO_equations.md
- use Latex formatting

Example 2: extracting equations from source code

I want to add an RSM turbulence model to my local OpenFOAM-v2606 installation.
- the model equations are available at https://tmbwg.github.io/turbmodels/rsm-ssglrr.html
- write the extracted equations to a Markdown file RSM_equations.md; use Latex formatting
- implement the variant SSGLRR-RSM-w2019
- implement both compressible and incompressible variants
- document any necessary OpenFOAM-specific modifications of the model implementation
- document steps to compile and use the model in README.md

Example 3: implementing a turbulence model

Introduction to Agentic Coding

By Andre Weiner

Introduction to Agentic Coding

  • 41