graph TD
subgraph Providers["π’ LLM Providers"]
OAI["OpenAI\nGPT-4o / o3"]
ANT["Anthropic\nClaude 3.x"]
GGL["Google\nGemini 2.x"]
MTA["Meta\nLlama 3.x (OSS)"]
MSC["Mistral\nMistral Large"]
end
subgraph LLMs["π§ Large Language Models"]
CORE["Foundation Model\n(Pre-trained weights)"]
FINE["Fine-tuned / RLHF\nAligned Model"]
EMB["Embedding Models"]
CORE --> FINE
CORE --> EMB
end
subgraph Harness["βοΈ LLM Harness / Orchestration"]
PROMPT["Prompt Engineering\n& Templates"]
MEM["Memory &\nContext Management"]
TOOLS["Tool Use /\nFunction Calling"]
RAG["RAG\nRetrieval-Augmented Gen"]
PROMPT --> MEM
MEM --> TOOLS
TOOLS --> RAG
end
subgraph Agents["π€ Agent Layer"]
PLAN["Goal & Task\nPlanning"]
LOOP["Observe β Think\nβ Act Loop"]
MULTI["Multi-Agent\nCoordination"]
PLAN --> LOOP --> MULTI
end
subgraph Apps["π Applications"]
CHAT["Chatbots"]
CODE["Code Assistants"]
ANLY["Data Analysis"]
AUTO["Autonomous\nWorkflow"]
end
Providers -->|"Expose via API"| LLMs
LLMs -->|"Model inference"| Harness
Harness -->|"Enables reasoning &\ntool use"| Agents
Agents -->|"Powers"| Apps
flowchart LR
INPUT["Raw Text\nInput (tokens)"]
subgraph LLM["Large Language Model"]
direction TB
TF["Transformer\nArchitecture"]
ATT["Attention\nMechanism"]
PARAM["Billions of\nParameters"]
TF --> ATT --> PARAM
end
OUTPUT["Generated Text\nOutput (tokens)"]
INPUT --> LLM --> OUTPUT
TRAIN["π Training Data\n(web, books, code)"]
RLHF["π― RLHF / Alignment\n(human feedback)"]
TRAIN -->|pre-training| LLM
RLHF -->|fine-tuning| LLM
quadrantChart
title LLM Providers β Openness vs Capability
x-axis Closed/Proprietary --> Open/OSS
y-axis Lower Capability --> Higher Capability
quadrant-1 High Capability & Open
quadrant-2 High Capability & Closed
quadrant-3 Low Capability & Closed
quadrant-4 Low Capability & Open
OpenAI GPT-4o: [0.1, 0.95]
Anthropic Claude: [0.15, 0.92]
Google Gemini: [0.2, 0.90]
Meta Llama 3: [0.85, 0.80]
Mistral Large: [0.70, 0.72]
Cohere Command: [0.30, 0.60]
Falcon: [0.90, 0.50]
A harness is the orchestration layer that wraps an LLM to make it useful in production.
flowchart TD
USER["π€ User / Application"]
subgraph HARNESS["LLM Harness (e.g. LangChain, LlamaIndex, DSPy)"]
direction TB
subgraph INPUT_LAYER["Input Layer"]
PT["Prompt Template"]
CTX["Context Injection"]
GUARD_IN["Input Guardrails"]
end
subgraph MEMORY_LAYER["Memory Layer"]
STM["Short-Term Memory\n(conversation window)"]
LTM["Long-Term Memory\n(vector DB)"]
end
subgraph TOOL_LAYER["Tool / Action Layer"]
FC["Function Calling"]
WEB["Web Search"]
DB["Database Query"]
CODE_INT["Code Interpreter"]
end
subgraph OUTPUT_LAYER["Output Layer"]
PARSE["Output Parser"]
GUARD_OUT["Output Guardrails"]
FORMAT["Formatter / Renderer"]
end
INPUT_LAYER --> MEMORY_LAYER --> TOOL_LAYER --> OUTPUT_LAYER
end
LLM_API["π§ LLM API\n(Provider)"]
USER -->|request| HARNESS
HARNESS <-->|prompt + response| LLM_API
HARNESS -->|final answer| USER
An agent is an LLM that can autonomously plan, act, observe results, and loop β going beyond a single prompt/response exchange.
flowchart TD
GOAL["π― Goal / Task\ngiven by user"]
subgraph AGENT["π€ Agent Loop"]
direction TB
THINK["Think\n(LLM reasons about next step)"]
ACT["Act\n(invoke tool or sub-agent)"]
OBS["Observe\n(parse tool result)"]
CHECK{"Goal\nreached?"}
THINK --> ACT --> OBS --> CHECK
CHECK -->|No| THINK
end
subgraph TOOLS["Available Tools"]
WEB2["Web Search"]
CODE2["Code Execution"]
DB2["Database / Files"]
API2["External APIs"]
SUBAGENT["Sub-Agents"]
end
DONE["β
Final Answer\ndelivered to user"]
GOAL --> AGENT
ACT <-->|calls & results| TOOLS
CHECK -->|Yes| DONE
graph LR
subgraph Single["Single Agent"]
U1["User"] --> A1["Agent"] --> T1["Tools"]
A1 --> U1
end
subgraph Multi["Multi-Agent System"]
U2["User"] --> ORCH["Orchestrator\nAgent"]
ORCH --> A2["Research\nAgent"]
ORCH --> A3["Coding\nAgent"]
ORCH --> A4["Critic /\nReview Agent"]
A2 & A3 & A4 --> ORCH
ORCH --> U2
end
A coding agent is an agent purpose-built to write, run, test, and iterate on software. It is the most powerful example of agents in practice because code is both the tool and the output.
Unlike a chat assistant that suggests code, a coding agent executes it, reads the result, fixes errors, and loops until the task is done.
flowchart TD
DEV["π€ Developer\ngives a goal"]
subgraph CODING_AGENT["π» Coding Agent"]
direction TB
UNDERSTAND["Understand\nRequirements"]
PLAN_CODE["Plan approach\n& break into tasks"]
WRITE["Write / Edit\nCode"]
RUN["Execute\nCode / Tests"]
READ_OUT["Read output\n& errors"]
FIX{"Tests\npassing?"}
UNDERSTAND --> PLAN_CODE --> WRITE --> RUN --> READ_OUT --> FIX
FIX -->|No β debug & retry| WRITE
end
subgraph DEV_TOOLS["π οΈ Developer Toolchain"]
CLI["CLI\n(run commands)"]
GIT["Git\n(version control)"]
SSH["SSH\n(remote access)"]
FS["File System\n(read/write files)"]
PKG["Package Manager\n(pip, npm, cargo)"]
TEST["Test Runner\n(pytest, jest)"]
end
RESULT["β
Working code\ncommitted & deployed"]
DEV --> CODING_AGENT
WRITE <-->|reads & writes| FS
RUN <-->|executes via| CLI
RUN <-->|installs deps via| PKG
READ_OUT <-->|runs tests via| TEST
FIX -->|Yes β commit| GIT
GIT -->|push / deploy via| SSH
GIT --> RESULT
| Agent | Built by | Key strength |
|---|---|---|
| Claude Code | Anthropic | Deep reasoning, safe edits, large context |
| GitHub Copilot Workspace | GitHub / OpenAI | IDE-native, PR-aware |
| Devin | Cognition AI | Fully autonomous end-to-end dev |
| Opencode | Open source | Git-native, terminal-first |
| Cursor Agent | Cursor | Fast inline iteration in editor |
An LLM can think, but without tools it cannot act in the real world. Git, SSH, and the CLI are the three foundational primitives that give a coding agent the ability to work on real software systems.
Think of the LLM as the brain. Git, SSH, and CLI are the hands, legs, and eyes that let it operate in the real world.
mindmap
root((Coding Agent\nNeeds))
CLI
Run scripts and commands
Execute test suites
Install packages and deps
Read stdout and stderr
Trigger build pipelines
Git
Read codebase history
Understand current branch state
Stage and commit changes safely
Create branches per task
Open and review pull requests
Rollback bad changes
SSH
Connect to remote servers
Deploy to staging and prod
Run commands on cloud infra
Tunnel into private networks
Access containerised environments
flowchart LR
AGENT["π€ Coding Agent"]
subgraph CLI_BOX["β¨οΈ CLI"]
direction TB
C1["Run: python app.py"]
C2["Run: pytest tests/"]
C3["Run: npm run build"]
C4["Read: stdout / stderr"]
C1 --> C2 --> C3 --> C4
end
subgraph GIT_BOX["πΏ Git"]
direction TB
G1["git clone / pull\n(get latest code)"]
G2["git diff / log\n(understand changes)"]
G3["git checkout -b\n(isolate work)"]
G4["git add + commit\n(save progress)"]
G5["git push + PR\n(ship for review)"]
G1 --> G2 --> G3 --> G4 --> G5
end
subgraph SSH_BOX["π SSH"]
direction TB
S1["ssh user@server\n(remote shell)"]
S2["scp / rsync\n(transfer files)"]
S3["ssh-keygen\n(auth without passwords)"]
S4["Port forwarding\n(access private services)"]
S1 --> S2 --> S3 --> S4
end
AGENT -->|"executes commands\nreads output"| CLI_BOX
AGENT -->|"tracks, saves\n& ships code"| GIT_BOX
AGENT -->|"operates on\nremote systems"| SSH_BOX
CLI β the agent's ability to act
The command line is how the agent runs code and sees the result. Without it, the agent can only write code β it cannot verify whether the code works. The feedback loop of write β run β read error β fix is entirely CLI-driven.
Git β the agent's safety net and memory Git gives the agent a structured record of every change. It can branch before experimenting (safe to fail), commit incrementally (checkpoints), and revert if something breaks. Without Git, an agent editing files is one mistake away from unrecoverable damage.
SSH β the agent's reach beyond the local machine Most real software doesn't run on a laptop. SSH lets the agent connect to staging servers, cloud VMs, and containerised environments. Without SSH, the agent is blind to runtime behaviour in production-like conditions.
sequenceDiagram
actor Dev as π€ Developer
participant Agent as π€ Coding Agent
participant CLI as β¨οΈ CLI
participant Git as πΏ Git
participant SSH as π SSH
participant Server as βοΈ Remote Server
Dev->>Agent: "Fix the failing API test and deploy to staging"
Agent->>Git: git pull origin main
Git-->>Agent: latest code
Agent->>Git: git checkout -b fix/api-test
Agent->>CLI: run pytest tests/api_test.py
CLI-->>Agent: AssertionError on line 42
Agent->>Agent: reason about error, edit code
Agent->>CLI: run pytest tests/api_test.py
CLI-->>Agent: β
All tests passed
Agent->>Git: git add + commit "fix: correct API response shape"
Agent->>Git: git push origin fix/api-test
Agent->>SSH: ssh deploy@staging-server
SSH-->>Agent: connected
Agent->>SSH: run deploy script
SSH-->>Server: pull & restart service
Server-->>Agent: β
deployed successfully
Agent->>Dev: "Tests fixed and deployed to staging. PR raised."
C4Context
title AI Application Full Stack
Person(user, "End User", "Interacts via UI")
System_Boundary(app_layer, "Application Layer") {
System(app, "Product / App", "Chat, copilot, autonomous assistant")
}
System_Boundary(agent_layer, "Agent Layer") {
System(agent, "Agent / Multi-Agent", "Plans, loops, delegates to sub-agents")
}
System_Boundary(harness_layer, "Orchestration Layer") {
System(harness, "LLM Harness", "LangChain / LlamaIndex / custom")
System(vector_db, "Vector DB", "Pinecone, Weaviate, pgvector")
System(tools, "External Tools", "APIs, DBs, code exec, web search")
}
System_Boundary(provider_layer, "LLM Provider Layer") {
System(llm, "LLM API", "OpenAI / Anthropic / Google / OSS")
}
Rel(user, app, "Uses")
Rel(app, agent, "Delegates goal")
Rel(agent, harness, "Uses harness for each step")
Rel(agent, agent, "Spawns sub-agents")
Rel(harness, llm, "Sends prompts, receives completions")
Rel(harness, vector_db, "Retrieves context (RAG)")
Rel(harness, tools, "Invokes tools / functions")
flowchart TD
START(["What matters most\nto your use case?"])
START --> COST{Cost-sensitive?}
START --> OPEN{Need open weights?}
START --> SAFE{Safety-critical?}
START --> MULTI{Multimodal?}
COST -->|Yes| CHEAP["Mistral / Llama 3\nvia self-hosting"]
COST -->|No| PERF{Need best\nperformance?}
PERF -->|Yes| TOP["OpenAI o3\nor Claude 3.7"]
PERF -->|No| MID["Claude Haiku\nor GPT-4o mini"]
OPEN -->|Yes| OSS["Meta Llama 3\nMistral / Falcon"]
OPEN -->|No| PROP["OpenAI / Anthropic\n/ Google"]
SAFE -->|Yes| ANT2["Anthropic Claude\n(Constitutional AI)"]
MULTI -->|Yes| GEMINI["Google Gemini\nor GPT-4o"]
| Layer | What it does | Examples |
|---|---|---|
| LLM Provider | Trains & hosts the model, exposes API | OpenAI, Anthropic, Google, Meta |
| LLM | Foundation model that predicts next tokens | GPT-4o, Claude 3.7, Llama 3, Gemini |
| Harness | Orchestrates prompts, memory, tools & RAG | LangChain, LlamaIndex, DSPy, custom |
| Agent | Plans multi-step goals, loops, delegates tasks | AutoGPT, CrewAI, LangGraph, custom |
| Coding Agent | Writes, runs, tests & ships real software | Claude Code, Devin, Aider, Cursor |
| CLI / Git / SSH | Give the agent hands to act on real systems | bash, git, openssh |
| Application | End-user product built on top | Copilots, autonomous assistants, analyzers |
Mental model: The provider gives you the engine. The LLM is the engine. The harness is the gearbox. The agent is the driver. And Git, CLI & SSH are the road, the map, and the ability to reach any destination.