Arc

Why Arc?

🔋

Token Efficient

27–63% fewer tokens than JavaScript. Every token costs money — Arc minimizes the bill.

🤖

Agent-Native

First-class tool calls, built-in LLM integration, prompt templates, embeddings, and persistent storage.

🔗

Pipeline-First

The |> operator eliminates nested function calls. Data flows left to right, naturally.

See the Difference

Arc ~34 tokens
fn fetchUsers() {
  @GET("https://api.example.com/users")
    |> filter(u => u.active)
    |> map(u => u.name)
    |> sort()
}
JavaScript ~68 tokens
async function fetchUsers() {
  const res = await fetch(
    "https://api.example.com/users"
  );
  const data = await res.json();
  return data
    .filter(u => u.active)
    .map(u => u.name)
    .sort();
}

More Arc in Action

Arc — Pattern Matching ~28 tokens
let msg = match response.status {
  200 => "OK",
  404 => "Not found",
  500..599 => "Server error",
  _ => "Unknown: {response.status}"
}
JavaScript ~62 tokens
let msg;
if (response.status === 200) {
  msg = "OK";
} else if (response.status === 404) {
  msg = "Not found";
} else if (response.status >= 500 && response.status < 600) {
  msg = "Server error";
} else {
  msg = `Unknown: ${response.status}`;
}
Arc — Parallel Fetch ~32 tokens
let [weather, news, stocks] = fetch [
  @GET "api/weather?city=NYC",
  @GET "api/news/top?n=5",
  @GET "api/stocks/AAPL"
]

let summary = news.articles
  |> take(3)
  |> map(a => "• {a.title}")
  |> join("\n")
JavaScript ~89 tokens
const [weather, news, stocks] =
  await Promise.all([
    fetch("api/weather?city=NYC")
      .then(r => r.json()),
    fetch("api/news/top?n=5")
      .then(r => r.json()),
    fetch("api/stocks/AAPL")
      .then(r => r.json())
  ]);

const summary = news.articles
  .slice(0, 3)
  .map(a => `• ${a.title}`)
  .join("\n");

What People Build

🤖

Chat Bot Framework

Plugin architecture, middleware chains, session management, 3 API integrations — 285 lines of Arc.

View Code →

Task Scheduler

DAG dependency resolution, cron scheduling, parallel execution, retry with backoff — 66% less code than JS.

View Code →
🧠

Neural Network

Forward/back propagation, matrix ops, activation functions. Trains on XOR. Pure Arc.

View Code →
⛓️

Blockchain

Proof-of-work mining, chain validation, cryptographic hashing. Complete implementation in Arc.

View Code →
🗄️

In-Memory Database

CRUD, WHERE filters, ORDER BY, GROUP BY, JOINs, indexing — a full query engine.

View Code →
🎮

Games

Tic-tac-toe with minimax AI, Snake, roguelike dungeon generator — all in Arc.

View Code →

How Much Could You Save?

Enter your current monthly AI token spend. See what Arc saves you.

$
27%

Conservative: 27% avg · HTTP-heavy: up to 63%

Monthly Savings
$270
Annual Savings
$3,240
New Monthly Cost
$730

At Scale

Solo dev ($500/mo) saves $1,620/yr
Small team ($5K/mo) saves $16,200/yr
Startup ($25K/mo) saves $81,000/yr
Enterprise ($100K/mo) saves $324,000/yr

Features

Implicit Returns

Last expression is the return value. No return keyword needed.

Pattern Matching

Powerful match expressions for clean control flow.

Async / Parallel

Async/await with parallel fetch built in. Concurrent by default.

27 Stdlib Modules

Math, strings, HTTP, JSON, YAML, TOML, HTML, crypto, OS, path, env, logging — plus AI-native modules for prompts, embeddings, LLMs, and persistent storage.

Type Constraints

Lightweight type system with constraints for safety without ceremony.

Module System

Clean imports with pub exports. Encapsulation made simple.

Smart Errors

Rust-style error messages with source snippets, line numbers, and "Did you mean?" suggestions.

Security Sandbox

Run untrusted code safely with resource limits, import control, and command injection protection.

By the Numbers

0
Tests Passing
0
Stdlib Modules
0
Working Examples
0
Fewer Tokens than JS

Getting Started

# Install from npm
npm install -g arc-lang

# Or clone and run
git clone https://github.com/kai-builds-ai/arc-lang
cd arc-lang/compiler && npm install
npx tsx src/index.ts run examples/hello-world.arc

# Start the REPL
npx tsx src/index.ts repl