From APIs to DSLs: How AI Is Reshaping the Way We Build Software
For decades, programming has been shaped by a simple assumption:
Humans write code, and computers execute it.
That assumption is breaking.
With the rise of AI coding systems like ChatGPT, GitHub Copilot, and frameworks like LangChain, we are entering a new paradigm:
Humans describe intent. AI writes and operates the system.
This shift does not just change who writes code. It changes what code is.
The Evolution of Interfaces: CLI -> API -> AI
Software interfaces have evolved in layers:
- CLI (Command Line Interface)
Humans typed commands designed for human memory and usage. - API (Application Programming Interface)
Structured endpoints designed for machines to call. - AI interfaces (emerging)
Systems where humans express intent, and AI translates it into actions.
We are now moving toward what can be called:
Intent-driven interfaces
APIs Became the Foundation
In the API era, systems exposed capabilities like this:
1
GET /users?age=18
APIs are powerful because they are:
- Structured
- Composable
- Machine-friendly
But they still require step-by-step orchestration.
Enter DSLs: Languages for Intent
A DSL (Domain-Specific Language) is a language designed for a specific problem.
Examples include:
- SQL for querying data
- Configuration files such as YAML and JSON for defining systems
Instead of writing procedural code, DSLs let you declare intent:
1
2
3
4
checkout:
payment: stripe
currency: EUR
retry: true
The Key Shift: From Execution to Description
| Old model | New model |
|---|---|
| Code = instructions | Code = intent |
| Human writes logic | AI generates logic |
| APIs are used directly | DSLs describe what APIs should do |
Why AI Prefers DSLs
DSLs are:
- Constrained
- Predictable
- Structured
This makes them ideal for AI systems that map intent to implementation.
DSL + API: Not Competing, But Layered
1
2
3
4
5
6
7
8
9
Human / AI
↓
DSL (intent)
↓
AI / Interpreter
↓
API calls
↓
System execution
What This Means for Builders
- APIs are your foundation.
- DSLs are your interface.
- Systems should be designed for AI operability.
Final Thought
The most important language is not the one humans write, but the one AI understands best.
TL;DR
The future of software is not about writing better code.
It is about designing better ways to describe what should exist.