Nova
v1.0.0-alpha · By Arunava Chatterjee

Code the Intelligent Future

Nova is a statically-typed, expressive programming language designed by Arunava Chatterjee — built from first principles to be readable by humans and processable by AI. Nova combines the clarity of Python, the safety of Rust, and native AI orchestration primitives.

⚡ AI-Native 🔵 Statically Typed 🔗 Pipeline Operator 🤖 Agent Builtins 📜 Literate Mode ⚙️ Async First
◈ View Examples 📖 Function Reference
Language Design

Why Nova

Nova was designed from first principles to solve a specific problem: building AI systems should be as natural and readable as describing them in plain English.

Human-Readable Syntax

Nova reads like English. Code is written for humans first — compilers second. Every construct is designed to minimize cognitive load.

Strong Static Typing

Catch errors before runtime. Nova's type system is expressive and inferential — you write less, the compiler checks more.

AI Primitive Builtins

Native language support for prompts, AI calls, embeddings, and agent loops — first-class citizens, not bolted-on libraries.

Concurrency by Default

Nova is async-first. Concurrent operations are the default path, making parallel AI workflows feel natural and safe.

Pipeline Operator

Chain transformations elegantly with the |> operator. Data flows forward, readable left to right, just like you think.

Module System

Clean, explicit imports and a package ecosystem designed for reproducibility and dependency clarity.

Pattern Matching

Expressive, exhaustive pattern matching on types, values, and AI response shapes — handling the unexpected, gracefully.

REPL & Live Mode

Nova ships with a first-class REPL and live evaluation mode, ideal for exploration and rapid AI prototyping.

Literate Mode

Mix prose and code in .nova.md files — Nova compiles literate documents, bridging documentation and execution.

Code Examples

Nova in Action

From hello world to autonomous agents — see how Nova makes every construct expressive and readable.

Hello, Nova
The simplest Nova program — variables, types, and output.
nova
1// Hello, Nova — your first program
2 
3let name: String = "World"
4let year: Int = 2025
5 
6print("Hello, {name}! Nova is live in {year}.")
7 
8// → Hello, World! Nova is live in 2025.
Pipeline Operator
Chain transformations left-to-right with the |> operator for maximum readability.
nova
1import { summarize, classify, embed } from "nova/ai"
2 
3let raw_article: String = fs.read("article.txt")
4 
5let result = raw_article
6 |> summarize(mode: .bullet, max_points: 5)
7 |> classify(labels: ["tech", "business", "culture"])
8 |> embed(model: .text_embed_v3)
9 
10print(result.label, result.confidence)
Autonomous Agent
Define a named agent with tool access and a natural language goal — Nova handles the loop.
nova
1import { agent, fetch_tool } from "nova/agents"
2 
3let web_search = fetch_tool("search", handler: |args| {
4 http.get("https://api.search.dev?q={args.query}").json()
5})
6 
7let researcher = agent(
8 name: "ResearchBot",
9 tools: [web_search],
10 goal: "Find the top 5 AI papers published this week."
11)
12 
13let findings = await researcher.run(max_steps: 10)
14print(findings.output)
Pattern Matching on AI Responses
Handle all possible AI response outcomes elegantly with Nova's match expression.
nova
1let response = await prompt(Model.claude_opus, question)
2 
3let result = match response {
4 Ok(r) if r.confidence > 0.9 => r.text,
5 Ok(r) if r.confidence > 0.5 => "Uncertain: {r.text}",
6 Refused(reason) => handle_refusal(reason),
7 Err(e) => log_error(e) and then "[error]",
8 _ => "[unexpected]"
9}
Semantic Search with RAG
Built-in retrieval-augmented generation — index documents and retrieve context with a single call.
nova
1import { VectorStore, recall } from "nova/memory"
2 
3let store = VectorStore.from_files("./docs/")
4await store.index()
5 
6fn rag_query(question: String) -> String {
7 let context = recall(question, store, k: 5)
8 prompt(Model.claude_sonnet,
9 "Context: {context}\n\nQuestion: {question}"
10 ).text
11}
Token Streaming
Stream tokens in real time with Nova's built-in async iterator support.
nova
1import { stream, Model } from "nova/ai"
2 
3async fn live_answer(prompt: String) {
4 let tokens = stream(Model.claude_sonnet, prompt)
5 
6 async for token in tokens {
7 io.write(token.text) // print as it arrives
8 }
9 
10 io.flush()
11}
12 
13await live_answer("Explain quantum computing simply.")
Standard Library

Function Reference

Nova's AI-native standard library provides everything you need for modern intelligent applications — built in, not bolted on.

Function Signature Description Returns
prompt (model: Model, text: String, opts?: PromptOptions) Send a prompt to a language model. Returns a structured Response with .text, .tokens, and .metadata. Response
embed (text: String | List<String>, model?: EmbedModel) Generate vector embeddings for text using the specified embedding model. Tensor
agent (name: String, tools: List<Tool>, goal: String) Construct an autonomous agent with a named identity, tool access, and a natural-language goal. AgentLoop
stream (model: Model, text: String) Stream tokens from a language model in real time. Iterate with async for loops. AsyncIterator<Token>
recall (query: String, store: VectorStore, k?: Int) Retrieve the top-k semantically similar chunks from a vector store for a given query. List<Chunk>
chain (...steps: List<Step>) Compose a sequential chain of AI reasoning steps. Each step receives the previous output as context. ChainResult
classify (text: String, labels: List<String>, model?: Model) Zero-shot classification of text against a list of candidate labels. Classification
summarize (text: String, opts?: SummaryOptions) AI-powered summarization — supports bullet, paragraph, and title modes. String
validate <T>(input: Any, schema: Schema<T>) Validate and parse unstructured AI output against a typed schema. Result<T>
match_response (r: Response, patterns: MatchBlock) Pattern-match on a model response — handle success, refusal, error, and partial output branches. T
fetch_tool (name: String, handler: Fn) Register a callable tool that agents can invoke. Handler receives parsed JSON args. Tool
pipe <A, B>(input: A, ...fns: List<Fn>) Compose a sequence of functions. Equivalent to the |> operator. B
Type System

Built-in Types

Nova's type system is expressive, inferential, and AI-aware. Core types cover primitives, collections, and AI-native shapes.

Primitives
String Int Float Bool Null Any
Collections
List<T> Map<K,V> Set<T> Tuple<A,B> Option<T> Result<T>
AI Types
Model Response Tensor Chunk AgentLoop Classification
IO & Async
AsyncIterator<T> Stream<T> Tool VectorStore Schema<T> ChainResult

Designed by Arunava Chatterjee

Nova is a passion project born from 15+ years of building technology and watching developers wrestle with AI integration. It's designed to make the future of programming feel inevitable — not hard.

✉ Contact Arunava ← Back to Portfolio