Skip to content

Getting Started

Prerequisites

  • Go 1.25+ — The Orca compiler is written in Go.
  • Python 3.11+ — Required to run the generated code.

Installation

Build from source:

bash
git clone https://github.com/ThakeeNathees/orca.git
cd orca/compiler
make build

This produces a binary at compiler/bin/orca. Add it to your PATH or run it directly.

Your first Orca file

Create a file called main.oc:

orca
model gpt4 {
  provider    = "openai"
  model_name  = "gpt-4o"
  temperature = 0.7
}

agent writer {
  model   = gpt4
  persona = "You are a helpful writer."
}

Build

Run the compiler in the same directory:

bash
orca build

This reads all .oc files in the current directory and generates:

build/
├── main.py
└── pyproject.toml

Inspect the output

The generated build/main.py contains fully annotated Python code with source mapping:

python
# Auto-generated by Orca compiler — do not edit.

from langchain_openai import ChatOpenAI

# === models ===

gpt4 = ChatOpenAI(model="gpt-4o", temperature=0.7)  # main.oc:1

The build/pyproject.toml includes the correct dependencies:

toml
[project]
name = "orca-build"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
    "langchain-core",
    "langchain-openai",
]

Run the generated code

bash
cd build
uv sync
uv run main.py

Next steps

Released under the MIT License.