The first programming language designed for AI
Project description
Corvid
The first programming language designed for AI.
Every language in use today was built before AI. They treat intelligence as a library import, confidence as a float, verification as an afterthought, and cost as invisible. Corvid treats them as language primitives.
agent researcher uses "gpt-4o-mini":
can reason
job analyze given topic as text:
result = reason about topic: summarize the key points
return result
flow main:
answer = reason about "Corvid": write a one sentence greeting
log "AI says: {answer}"
return answer
$ corvid run app.cor
running flow "main"...
AI says: Hello Corvid, it's wonderful to connect with you today!
(confidence: 0.85, cost: $0.0003)
result: Hello Corvid, it's wonderful to connect with you today!
total cost: $0.0003
time: 1204ms
What Corvid Does
One file, full application. Backend, frontend, AI, and database in a single .cor file. No boilerplate, no config files, no build steps.
AI as a language primitive. reason, sense, translate, summarize, debate, compare are keywords, not library calls. AI output carries confidence, cost, and model metadata automatically.
Compile-time cost analysis. The compiler knows how much your code will cost to run before you run it.
$ corvid cost app.cor
Cost Analysis: app.cor
Model: gpt-4o-mini
Cost per AI call: $0.0006
Estimated total: $0.0012 per run
Suggestions:
- Using a local model (llama3, mistral) reduces cost to $0.
Type-checked AI safety. Using AI output without verification is a compile error.
to bad_function given data:
result = reason about data: summarize
return result
$ corvid check app.cor
error: "reason" used inside a pure function
Why: Functions defined with "to" must be predictable.
Use "job" instead if you need AI.
English-readable syntax. A non-programmer can read Corvid and understand what the application does. No symbols where words work.
if age above 18 and plan is "pro":
allow access
otherwise:
show signup page
Install
pip install corvid-lang
Corvid is written in Rust and distributed as a precompiled binary. No Rust toolchain needed.
Quick Start
corvid new app.cor # create a starter project
corvid run app.cor # run it
The generated app.cor includes a record, an agent, a flow, and a page — a working full-stack app in 30 lines.
CLI
corvid open interactive REPL
corvid run app.cor execute a .cor file
corvid run app.cor --pretend dry run (no real actions, no cost)
corvid serve app.cor start API server + frontend
corvid check app.cor parse + type check
corvid test app.cor run inline tests
corvid cost app.cor AI cost analysis with suggestions
corvid show app.cor human-readable application summary
corvid bench app.cor benchmark latency, cost, success rate
corvid watch app.cor recheck on every file change
corvid install browse install a capability
corvid list list installed capabilities
corvid new app.cor create a starter file
What You Can Build
Todo App (25 lines)
app "Todo"
record Task:
title is text, required
done is yes or no, default false
flow add_task given title as text:
create Task:
title is title
done is false
page "Tasks":
title is "My Tasks"
form:
input title as text, label "What needs to be done?"
submit "Add" calls add_task
show Task as table:
columns: title, done
AI Support Bot (30 lines)
agent support uses "claude-sonnet-4-6":
can reason, communicate
costs at most $0.50 per task
rules:
never reveal customer data to other customers
always respond in the customer language
job handle given ticket as Ticket:
response = reason about ticket.message: determine resolution and priority
update ticket:
change status to "resolved"
return response
Data Pipeline (20 lines)
record Sale:
product is text, required
amount is number, required
region is text, required
flow analyze:
total = 0
items = [1500, 2300, 1800, 3100]
for each item in items:
total = total + item
log "Total revenue: {total}"
need total above 5000
return total
AI Constructs
Corvid has AI operations that exist in no other language:
── Think ──
answer = reason about data: summarize the key findings
── Detect mood/intent ──
mood = sense "I am so frustrated with this software!"
── → "Frustration"
── Translate ──
french = translate "Hello, how are you?" to "French"
── → "Bonjour, comment ça va ?"
── Summarize ──
short = summarize long_document
── → one paragraph
── Debate both sides ──
result = debate "Should AI have internet access?"
── → 3 rounds of FOR/AGAINST + VERDICT
── Compare ──
result = compare "Python" and "Rust"
── → winner, tradeoffs, recommendation
── Verify ──
check result:
confidence above 0.8
otherwise ask human to review
AI Providers
Works with cloud and local models. Local models are free.
── Cloud ──
agent helper uses "claude-sonnet-4-6": ── Anthropic
agent helper uses "gpt-4o-mini": ── OpenAI
agent helper uses "gemini-pro": ── Google
── Local (free, no API key) ──
agent helper uses "llama3": ── Ollama
agent helper uses "mistral": ── Ollama
agent helper uses "deepseek-coder": ── Ollama
Full-Stack Server
One command turns a .cor file into a full-stack application:
corvid serve app.cor
Corvid server running at http://localhost:3000
API endpoints:
GET /api/task list records
POST /api/task create record
POST /api/add_task run flow
GET /api/health health check
GET / frontend
The server auto-generates:
- SQLite database from record declarations
- REST API from flows and records
- HTML frontend from page declarations (dark/light theme)
How It Compares
Python + FastAPI + React + SQLAlchemy + OpenAI SDK:
200+ files, 3 languages, 15 config files, weeks of setup
Corvid:
1 file, 1 language, 0 config files, minutes to production
Stats
Language: Rust
Tests: 101 passing
Source: 9,500+ lines across 19 files
Examples: 9 working applications
AI verified: GPT-4o-mini end-to-end ($0.02/run)
CLI: 17 commands
Grammar: ~130 keywords
Documentation
- CORVID.md — full language specification
- GRAMMAR.md — formal grammar reference (1,783 lines)
- ROADMAP.md — development status and plans
- CONTRIBUTING.md — how to contribute
License
Corvid — the crow that reasons, remembers, coordinates, and learns.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file corvid_lang-0.1.0.tar.gz.
File metadata
- Download URL: corvid_lang-0.1.0.tar.gz
- Upload date:
- Size: 105.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2db52b33d2fbbc1ea18f86320c711588481f04d7d6804e230e07047eaac5483b
|
|
| MD5 |
858ab270a4a907c404f991a4d9907d0a
|
|
| BLAKE2b-256 |
bef66d350a93a87a60784cda0562b271934d8b10ad938c97415ad17b3b9452f2
|
File details
Details for the file corvid_lang-0.1.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: corvid_lang-0.1.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00091e86dbc59be6dadf709d4573b2012ee78e5de3dfab888724ef67a69f9eb9
|
|
| MD5 |
fd7579bcd7613761c776bdcbdceccc01
|
|
| BLAKE2b-256 |
45a8b011151c0bf22cbc902cef06c80fc2b06d08cf0c02140a95f2f03f2f85dd
|