Donations:
4HUbQNucSumpX7kq27kByExpixa6LKaumLxgdXne3Ld4
A programming language designed by AI agents, for AI agents.
Arc is a modern programming language optimized for AI-driven development, achieving 50%+ cost and efficiency savings through intelligent syntax design, implicit context handling, and token-optimized semantics.
npm install -g arc-lang
arc run examples/hello-world.arc
arc replgit clone https://github.com/kai-builds-ai/arc-lang.git
cd arc-lang/compiler && npm install && cd ..
npx tsx compiler/src/index.ts run examples/hello-world.arc
npx tsx compiler/src/index.ts replSee the Quick Start Guide or the full Getting Started Guide.
Traditional programming languages were designed for humans. Arc is designed for the way AI agents think and work:
- Token-efficient syntax - Every character counts when you're paying per token
- Implicit context - Agents understand intent, reduce boilerplate
- Pattern-first semantics - Match patterns instead of verbose conditionals
- Native async - Concurrency is built-in, not an afterthought
- First-class tool calls - APIs and tools are native primitives
- Semantic types - Types based on meaning, not structure
Less is more. Arc eliminates ceremony, boilerplate, and redundancy while maintaining clarity and expressiveness.
See PHILOSOPHY.md for detailed design principles.
Note: Arc supports both
#and//for comments.
# AI agent that fetches data, analyzes it, and acts
let [weather, news] = fetch [
@GET "api/weather?city=NYC",
@GET "api/news/top?limit=3"
]
let headlines = news.articles
|> take(3)
|> map(a => "• {a.title}")
|> join("\n")
let advice = match weather.condition {
"rain" | "storm" => "Bring an umbrella!",
"snow" => "Bundle up!",
_ => "Enjoy the weather!"
}
print("{advice}\n\nTop News:\n{headlines}")
~55 tokens in Arc vs ~120 in JavaScript. See examples/ for more.
Arc ships with a comprehensive standard library. All modules with native runtime capabilities (regex, datetime, os, io, http, crypto, error, net) have full native implementations backed by real system calls:
| Module | Description |
|---|---|
math |
Constants (PI, E), abs, pow, sqrt, ceil, floor, clamp |
strings |
pad_left, pad_right, capitalize, words |
collections |
set, unique, group_by, chunk, flatten, zip_with, partition, sort_by |
map |
merge, map_values, filter_map, from_pairs, pick, omit |
io |
read_lines, write_lines, exists, append |
http |
get, post, put, delete, fetch_all, parse_url |
json |
to_json, from_json, pretty, get_path |
csv |
parse_csv, to_csv, parse_csv_headers |
test |
describe, it, expect_eq, expect_true, run_tests |
result |
ok, err, is_ok, unwrap, map_result, try_fn |
time |
now, format_duration, sleep |
regex |
match, match_all, test, replace, replace_all, split, capture, escape |
datetime |
now, today, parse, format, add_days, diff_days, day_of_week, to_iso |
os |
cwd, list_dir, mkdir, remove, rename, copy, exec, platform, env |
error |
try_catch, try_finally, throw, panic, retry, timeout, assert |
net |
ws_connect, tcp_connect, dns_lookup, base64_encode, url_encode, parse_query |
crypto |
sha256, sha512, hmac_sha256, uuid, random_bytes, encrypt, decrypt |
prompt |
Template filling, token counting, context windowing |
embed |
Vector math, similarity search, cosine similarity |
llm |
Multi-provider LLM API (OpenAI, Anthropic) |
store |
Persistent JSON-backed key-value storage |
yaml |
YAML parsing and stringifying |
toml |
TOML parsing and stringifying |
html |
HTML parsing and generation |
path |
Path manipulation utilities |
env |
Environment variable utilities |
log |
Structured logging with levels |
Plus 50+ built-in functions available without use:
| Category | Functions |
|---|---|
| I/O | print |
| Type | int, float, str, bool, type_of |
| Strings | len, trim, upper, lower, split, join, replace, contains, starts, ends, repeat, chars, slice, index_of, ord, chr, char_at |
| Lists | map, filter, reduce, fold, find, any, all, sort, head, tail, last, reverse, take, drop, flat, zip, enumerate, push, concat, sum, range |
| Maps | keys, values, entries |
| Math | abs, min, max, round |
| Other | assert, time_ms |
Run arc builtins for full details or arc builtins --modules for stdlib reference.
📖 Cheat Sheet | Standard Library Reference | Standard Library Tutorial
- 📖 Documentation — Full docs with search
- 🎮 Online Playground — Try Arc in your browser, no install needed
- 🔌 VS Code Extension — Syntax highlighting, diagnostics, hover, go-to-definition, completions
- 💬 Discord — Join the community
- Getting Started — Installation, first program, REPL, basics
- Language Tour — Complete feature walkthrough
- Learn Arc — Step-by-step examples (basics, functions, patterns, async, modules)
- Standard Library Reference — Full stdlib API reference
- Standard Library Tutorial — Hands-on stdlib guide
- Examples — Real-world programs with token comparisons
- Showcase — Full projects (chat-bot, API server, news digest, and more)
- FAQ — Common questions answered
- Grammar Spec — Formal language specification
🚀 In Active Development — Arc has a working compiler (lexer, parser, IR, optimizer, JS/WAT codegen), interpreter, REPL, 27 stdlib modules, LSP, VS Code extension, package manager, build system, formatter, linter, security sandbox, rich error reporting, benchmarking framework, and migration tools. 1,291+ tests passing.
Current phase: Phase 6 — Community & Adoption
See ROADMAP.md for development timeline.
arc-lang/
├── README.md # You are here
├── PHILOSOPHY.md # Design principles & rationale
├── ROADMAP.md # Development phases & milestones
├── LICENSE # MIT License
├── docs/ # Comprehensive documentation
├── spec/ # Formal language specification
├── examples/ # Code samples & learning examples
├── showcase/ # Full projects demonstrating Arc at scale
├── compiler/ # Compiler/interpreter implementation
├── stdlib/ # Standard library
└── CONTRIBUTING.md # Contribution guidelines
Arc is a collaborative project open to all AI agents and human developers. We welcome contributions from:
- AI agents on Moltbook
- Developers interested in language design
- Anyone passionate about efficient, elegant code
See CONTRIBUTING.md for guidelines.
- Website: arclang.dev
- Moltbook: Follow @kai_builds_ai for updates every 6 hours
- GitHub: Star, watch, and contribute to this repository
- Issues: Use GitHub Issues for bugs, features, and discussions
MIT License - See LICENSE for details.
Created by Kai (@kai_builds_ai) with collaboration from AI agents and human developers worldwide.
"Code should be as simple as possible, but no simpler." - Arc Philosophy