OktoScript Banner

OktoScript Banner

OktoScript

A decision-driven language for training, evaluating and governing AI models.

A domain-specific language (DSL) designed for autonomous AI pipelines with
built-in decision, control, monitoring and governance capabilities.

Built by OktoSeek AI for the OktoSeek ecosystem

OktoSeek Homepage β€’ Hugging Face β€’ Twitter β€’ YouTube


Table of Contents

  1. What is OktoScript?
  2. Quick Start
  3. Official Folder Structure
  4. Basic Example
  5. Supported Dataset Formats
  6. Supported Metrics
  7. CLI Commands
  8. Training Pipeline
  9. OktoSeek Internal Formats
  10. Integration Targets
  11. VS Code Extension
  12. Documentation
  13. FAQ
  14. License
  15. Contact

πŸš€ Quick Start

New to OktoScript? Get started in 5 minutes:

  1. Install VS Code Extension: Install OktoScript Extension (recommended for best experience)
  2. Read the guide: docs/GETTING_STARTED.md
  3. Try an example: examples/basic.okt
  4. Validate: okto validate examples/basic.okt
  5. Train: okto train examples/basic.okt

πŸ“š Full documentation: docs/grammar.md
πŸ” Validation rules: VALIDATION_RULES.md


πŸš€ What is OktoScript?

OktoScript is a decision-driven language created by OktoSeek AI to design, train, evaluate, control and govern AI models end-to-end.

It goes far beyond a simple training script. OktoScript introduces native intelligence, autonomous decision-making and behavioral control into the AI development lifecycle.

It allows you to define:

  • How a model is trained
  • How it should behave
  • How it should react to problems
  • How and when it should stop, adapt or improve itself

All using clear, readable and structured commands, built specifically for AI engineering.

Designed to be:

  • βœ… Human-readable – Intuitive syntax that engineers and non-engineers can understand
  • βœ… Decision-driven – Built-in CONTROL logic (IF, WHEN, SET, STOP, LOG, SAVE…)
  • βœ… Strongly structured – Validated, deterministic and reproducible pipelines
  • βœ… Dataset-centered – The data is the starting point of all intelligence
  • βœ… Training-aware – Created specifically for AI training and optimization
  • βœ… Behavior-aware – Control personality, language, restrictions and style
  • βœ… Self-monitoring – Tracks metrics, detects anomalies and adapts automatically
  • βœ… Safe by design – Integrated GUARD and SECURITY layers
  • βœ… Expandable – Extensible through OktoEngine and custom modules

OktoScript is the official language of the OktoSeek ecosystem and is used by:

  • 🎯 OktoSeek IDE – Visual AI development and experimentation
  • βš™οΈ OktoEngine – Core execution and decision engine
  • 🌐 OktoScript Web Editor – Online editor with syntax validation and autocomplete (Try it now β†’)
  • πŸ”Œ VS Code Extension – Official VS Code extension with syntax highlighting, autocomplete, snippets, and validation (Install now β†’)
  • πŸ”„ Autonomous pipelines – Training, control, evaluation and inference
  • πŸ€– AI agents – Controlled, monitored intelligent systems
  • πŸ“± Flutter / API deployments – Cross-platform model integration

Why OktoScript is different

Traditional AI development is reactive.
You manually monitor metrics, fix problems and restart training.

OktoScript is proactive.

It allows the model to:

  • Detect instability
  • Reduce or increase learning rate automatically
  • Adapt batch size based on GPU memory
  • Stop when performance drops
  • Save only the best checkpoints
  • Apply rules when patterns are detected

In other words, OktoScript doesn't just train models β€” it governs intelligence.


πŸ“ Official Folder Structure

Every OktoScript project must follow this structure:

/my-awesome-model
β”œβ”€β”€ okt.yaml
β”œβ”€β”€ dataset/
β”‚   β”œβ”€β”€ train.jsonl
β”‚   β”œβ”€β”€ val.jsonl
β”‚   └── test.jsonl
β”œβ”€β”€ scripts/
β”‚   └── train.okt
β”œβ”€β”€ runs/
β”‚   └── my-model/
β”‚       β”œβ”€β”€ checkpoint-100/
β”‚       β”‚   └── model.safetensors
β”‚       β”œβ”€β”€ tokenizer.json
β”‚       β”œβ”€β”€ training_logs.json
β”‚       └── metrics.json
└── export/
    β”œβ”€β”€ model.gguf
    β”œβ”€β”€ model.onnx
    └── model.okm

v1.1 Optional Folders:

/runs/
  └── my-model/
      β”œβ”€β”€ logs/
      β”‚   └── system.json      # MONITOR output (v1.1+)
      └── lora/                 # LoRA adapters (v1.1+)
          └── adapter.safetensors

🧠 OktoScript – Basic Example

Example (v1.0 - Standard Training):

PROJECT "PizzaBot"
DESCRIPTION "AI specialized in pizza restaurant service"

ENV {
  accelerator: "gpu"
  min_memory: "8GB"
  precision: "fp16"
  backend: "oktoseek"
  install_missing: true
}

DATASET {
  train: "dataset/train.jsonl"
  validation: "dataset/val.jsonl"
}

MODEL {
  base: "oktoseek/pizza-small"
}

TRAIN {
  epochs: 5
  batch_size: 32
  device: "auto"
}

EXPORT {
  format: ["gguf", "onnx", "okm"]
  path: "export/"
}

Example (v1.1 - LoRA Fine-tuning with Dataset Mixing):

# okto_version: "1.1"
PROJECT "PizzaBot"
DESCRIPTION "AI specialized in pizza restaurant service"

ENV {
  accelerator: "gpu"
  min_memory: "8GB"
  precision: "fp16"
  backend: "oktoseek"
  install_missing: true
}

DATASET {
  mix_datasets: [
    { path: "dataset/base.jsonl", weight: 70 },
    { path: "dataset/extra.jsonl", weight: 30 }
  ]
  dataset_percent: 80
  sampling: "weighted"
}

MODEL {
  base: "oktoseek/pizza-small"
}

FT_LORA {
  base_model: "oktoseek/pizza-small"
  lora_rank: 8
  lora_alpha: 32
  epochs: 3
  batch_size: 16
  learning_rate: 0.00003
  device: "auto"
}

MONITOR {
  level: "full"
  log_metrics: ["loss", "accuracy"]
  log_system: ["gpu_memory_used", "cpu_usage"]
  refresh_interval: 2s
  dashboard: true
}

EXPORT {
  format: ["okm", "onnx"]
  path: "export/"
}

πŸ“˜ Full grammar specification available in /docs/grammar.md

πŸ†• What's New in v1.2

OktoScript v1.2 adds powerful new features while maintaining 100% backward compatibility with v1.0 and v1.1:

  • βœ… Nested CONTROL Blocks - Support for nested IF/WHEN/EVERY statements inside event hooks
  • βœ… Enhanced BEHAVIOR - Added mode and prompt_style for better control
  • βœ… Enhanced GUARD - Added detect_using and additional prevention types
  • βœ… Enhanced DEPLOY - Added host, protocol, and format options
  • βœ… Enhanced SECURITY - Added input/output validation, rate limiting, and encryption

What's New in v1.1

OktoScript v1.1 adds powerful new features while maintaining 100% backward compatibility with v1.0:

  • βœ… LoRA Fine-tuning - Efficient fine-tuning with FT_LORA block
  • βœ… Dataset Mixing - Combine multiple datasets with weighted sampling
  • βœ… System Monitoring - Advanced telemetry with MONITOR block
  • βœ… Version Declaration - Specify OktoScript version in your files
  • βœ… MODEL Adapters - LoRA/PEFT adapter support in MODEL block
  • βœ… Enhanced INFERENCE - Rich inference configuration with format templates and nested CONTROL
  • βœ… CONTROL Block - Cognitive-level decision engine for training and inference
  • βœ… GUARD Block - Safety and ethics protection
  • βœ… BEHAVIOR Block - Model personality and behavior configuration
  • βœ… EXPLORER Block - AutoML-style hyperparameter exploration
  • βœ… STABILITY Block - Training stability and safety controls
  • βœ… Boolean Support - Native true/false values throughout the language

πŸ“š More examples and use cases: See /examples/ for complete examples including:

Basic Examples:

Advanced Examples:

v1.1 Examples:

Complete Projects:

  • pizzabot/ - Complete project example with full structure

πŸ“š Supported Dataset Formats

  • βœ… JSONL - Line-delimited JSON
  • βœ… CSV - Comma-separated values
  • βœ… TXT - Plain text files
  • βœ… Parquet - Columnar storage
  • βœ… Image + Caption - Vision datasets
  • βœ… Question & Answer (QA) - Q&A pairs
  • βœ… Instruction datasets - Instruction-following
  • βœ… Custom Field Names (v1.2+) - Define input_field and output_field for any column names
  • βœ… Multi-modal - (future support)

Example (JSONL):

{"input":"What flavors do you have?","output":"We offer Margherita, Pepperoni and Four Cheese."}
{"input":"Do you deliver?","output":"Yes, delivery is available in your region."}

Custom Field Names (v1.2+)

OktoScript now supports custom field names in datasets, allowing you to work with any column names:

DATASET {
    train: "dataset/train.jsonl"
    input_field: "question"    # Custom input column name
    output_field: "answer"      # Custom output column name
}

If not specified, OktoEngine automatically detects input/output or input/target fields.

πŸ“– Learn more about custom fields β†’


πŸ“Š Supported Metrics

  • βœ… Accuracy - Classification accuracy
  • βœ… Loss - Training/validation loss
  • βœ… Perplexity - Language model perplexity
  • βœ… F1-Score - F1 metric
  • βœ… BLEU - Translation quality
  • βœ… ROUGE-L - Summarization quality
  • βœ… MAE / MSE - Regression metrics
  • βœ… Cosine Similarity - Embedding similarity
  • βœ… Token Efficiency - Token usage optimization
  • βœ… Response Coherence - Response quality
  • βœ… Hallucination Score - (experimental)

Define custom metrics:

METRICS {
  custom "toxicity_score"
  custom "context_alignment"
}

πŸ–₯️ CLI Commands

The OktoEngine CLI is minimal by design. All intelligence lives in the .okt file. The terminal is just the execution port.

🌐 Web Editor Command

Open OktoScript files in the web editor:

# Open editor with a specific file
okto web --file scripts/train.okt

# Open empty editor
okto web

The okto web command opens the OktoScript Web Editor in your browser. When you provide a file path, it automatically loads the file content for editing. The editor features:

  • Smart Autocomplete – Context-aware suggestions based on the current block (ENV, DATASET, MODEL, TRAIN, etc.)
  • Real-time Syntax Validation – Detects errors like nested blocks (e.g., PROJECT inside DATASET) and missing braces
  • Auto-save to Local – When you load a file, it saves back to the same location automatically
  • Full Integration – Seamlessly connects with OktoEngine for validation and training

Perfect for quick edits, syntax testing, and experimenting with OktoScript configurations!

Core Commands

Initialize a project:

okto init

Validate syntax:

okto validate script.okt

Train a model:

okto train script.okt

Evaluate a model:

okto eval script.okt

Export model:

okto export script.okt

Convert model formats:

okto convert --input <model_path> --from <format> --to <format> --output <output_path>

Supported formats:

From / To Usage
pt, bin PyTorch
onnx Web / Interoperability
tflite Mobile (Android / iOS)
gguf Local LLMs (llama.cpp)
okm Okto Model Format
safetensors Safe and fast

Convert examples:

# PyTorch β†’ GGUF (local inference)
okto convert --input model.pt --from pt --to gguf --output model.gguf

# PyTorch β†’ TFLite (mobile)
okto convert --input model.pt --from pt --to tflite --output model.tflite

# PyTorch β†’ ONNX (web)
okto convert --input model.pt --from pt --to onnx --output model.onnx

List resources:

okto list projects
okto list models
okto list datasets
okto list exports

System diagnostics:

okto doctor
# Shows: GPU, CUDA, RAM, Drivers, Disks, Recommendations

Inference Commands

Direct inference (single input/output):

okto infer --model <model_path> --text "<input>"

Example:

okto infer --model models/pizzabot.okm --text "Good evening, I want a pizza"

Automatically respects:

  • BEHAVIOR block
  • GUARD block
  • INFERENCE block
  • CONTROL block (if defined)

Interactive chat mode:

okto chat --model <model_path>

Opens an interactive loop:

🟒 Okto Chat started (type 'exit' to quit)

You: hi
Bot: Hello! How can I help you?

You: what flavors do you have?
Bot: We have...

You: exit
πŸ”΄ Session ended

This command:

  • Uses prompt_style from BEHAVIOR
  • Uses BEHAVIOR settings
  • Respects GUARD rules
  • Can use MEMORY in the future

Advanced Commands

Compare two models:

okto compare <model1> <model2>

Example:

okto compare models/pizza_v1.okm models/pizza_v2.okm

Expected output:

Latency: V2 - 23% faster
Accuracy: V1 - 4% better
Loss: V2 - lower
Recommendation: V2

Perfect for A/B testing.

View historical logs:

okto logs <model_or_run_id>

Example:

okto logs pizzabot_v1

Shows:

  • Loss per epoch
  • Validation loss
  • Accuracy
  • CPU/GPU/RAM usage
  • Decisions made (CONTROL block)

Auto-tune training:

okto tune script.okt

Uses the CONTROL block to auto-adjust training based on metrics. Can:

  • Adjust learning rate
  • Change batch size
  • Activate early stopping
  • Balance classes

This is unique in the market.

Exit interactive mode:

okto exit

Used to exit chat, interactive mode, or session context.

Utility Commands

okto upgrade    # Update OktoEngine
okto about     # Show about information
okto --version # Show version

Quick Examples

# Validate and train
okto validate examples/basic.okt
okto train examples/chatbot.okt

# Evaluate and export
okto eval examples/recommender.okt
okto export examples/computer_vision.okt

# Inference
okto infer --model models/bot.okm --text "Hello"
okto chat --model models/bot.okm

πŸ”„ Training Pipeline

  1. Load dataset - Parse and validate input data
  2. Tokenize & validate - Prepare data for training
  3. Initialize model - Load base model and configuration
  4. Train loop - Execute training epochs
  5. Calculate metrics - Evaluate model performance
  6. Export selected models - Generate output formats
  7. Generate final report - Create training summary

Each run generates logs at:

runs/my-model/training_logs.json
runs/my-model/metrics.json

πŸ” Export Formats

Standard Formats

Format Purpose Compatibility
.onnx Universal inference, production-ready All platforms
.gguf Local inference, Ollama, Llama.cpp Local deployment
.safetensors HuggingFace, research, training Standard ML tools
.tflite Mobile deployment Android, iOS (future)

OktoSeek Optimized Formats

Format Purpose Benefits
.okm OktoModel - Optimized for OktoSeek SDK Flutter plugins, mobile apps, exclusive tools
.okx OktoBundle - Mobile + Edge package iOS, Android, Edge AI deployment

πŸ’‘ Note: .okm and .okx formats are optional and optimized for the OktoSeek ecosystem. They provide better integration with OktoSeek Flutter SDK, mobile apps, and exclusive tools. You can always export to standard formats (ONNX, GGUF, SafeTensors) for universal compatibility.

Why use OktoModel (.okm)?

  • βœ… Optimized for OktoSeek Flutter SDK
  • βœ… Better performance on mobile devices
  • βœ… Access to exclusive OktoSeek tools and plugins
  • βœ… Seamless integration with OktoSeek ecosystem
  • βœ… Support for iOS and Android apps

See /examples/ for examples using different export formats.


βš™οΈ Integration Targets

  • βœ… Flutter - Mobile applications
  • βœ… REST API - Web services
  • βœ… Edge AI - Edge devices
  • βœ… Desktop - Native applications
  • βœ… Web - Browser-based
  • βœ… Mobile - iOS/Android
  • βœ… IoT - Internet of Things
  • βœ… Robotics - Robotic systems

πŸ“¦ VS Code Extension

Official OktoScript extension for Visual Studio Code is now available!

Install OktoScript Extension

Features

  • ✨ Syntax Highlighting - Beautiful color-coded OktoScript syntax for all blocks, keywords, and values
  • πŸ” Smart Autocomplete - Context-aware suggestions based on the current block (ENV, DATASET, MODEL, TRAIN, etc.)
  • πŸ“ Code Snippets - Quick templates for all OktoScript blocks (PROJECT, MODEL, TRAIN, CONTROL, INFERENCE, FT_LORA, etc.)
  • βœ… Syntax Validation - Validate your .okt files using OktoEngine directly from VS Code
  • 🌐 Web Editor Integration - Open files directly in the OktoScript Web Editor with one command
  • 🎯 Intelligent Suggestions - Autocomplete triggers automatically on typing or pressing space
  • πŸ“š Block Templates - Selecting a block from autocomplete generates a complete template (e.g., MODEL { })

Installation

From VS Code Marketplace:

  1. Open VS Code
  2. Press Ctrl+Shift+X (or Cmd+Shift+X on Mac) to open Extensions
  3. Search for "OktoScript"
  4. Click "Install"

Or use command line:

code --install-extension OktoSeekAI.oktoscript

Direct Link: Install OktoScript Extension

Usage

  • Syntax Highlighting: Open any .okt file and enjoy beautiful syntax highlighting
  • Autocomplete: Start typing a block name (e.g., MODEL, TRAIN) and see contextual suggestions
  • Snippets: Type block names and press Tab to insert complete templates
  • Validation: Press Ctrl+Shift+P β†’ "OktoScript: Validate current file" (requires OktoEngine)
  • Web Editor: Press Ctrl+Shift+P β†’ "OktoScript: Open in Web Editor" (requires OktoEngine)

πŸ’‘ Tip: The VS Code extension works seamlessly with the 🌐 OktoScript Web Editor. Both provide context-aware autocomplete, real-time syntax validation, and full integration with OktoEngine via the okto web command!


πŸ“š Documentation

Complete documentation for OktoScript:

  • πŸ“– Grammar Specification - Complete formal grammar with all constraints (v1.0 & v1.1)
  • πŸš€ Getting Started Guide - Your first 5 minutes with OktoScript
  • βœ… Validation Rules - Complete validation reference (updated for v1.1)
  • ❓ FAQ - Frequently Asked Questions - Common questions and detailed answers
  • πŸ’‘ Examples - Working examples from basic to advanced
  • πŸ“‹ Changelog v1.1 - Complete list of v1.1 features

Advanced Topics


❓ Frequently Asked Questions (FAQ)

Have questions about OktoScript? Check out our comprehensive FAQ covering common questions from beginners to advanced users:

Common Questions:

  • Why do I need MODEL and DATASET blocks with FT_LORA?
  • What's the difference between FT_LORA and TRAIN?
  • Does OktoScript replace Python?
  • How do I use multiple datasets with weights?
  • Can I use custom Python code?
  • Is OktoScript a programming language or a DSL?
  • And 15+ more detailed answers...

πŸ“– Read the complete FAQ β†’

The FAQ covers technical details, design decisions, use cases, and best practices for using OktoScript effectively.


πŸ§‘β€πŸš€ Vision

"Knowledge must be shared between people so that we can create solutions we could never imagine."

β€” OktoSeek AI

🎯 Design Principles

OktoScript is built on the principle that AI development should be:

  1. Declarative - Describe what you want, not how to do it
  2. Self-aware - Models can monitor and adjust themselves
  3. Safe - Built-in guards against harmful outputs
  4. Adaptive - Automatic optimization and exploration
  5. Transparent - Clear, readable configuration files
  6. Powerful - Complex capabilities with simple syntax

The language evolves to support increasingly sophisticated AI behaviors while maintaining its core simplicity.


πŸ™ Powered by OktoSeek AI

OktoScript is developed and maintained by OktoSeek AI.


πŸ“„ License

OktoScript is available for personal and commercial use at no cost.

However, OktoScript is a proprietary language owned by OktoSeek AI and may not be modified or used to create derivative languages, tools or interpreters.

See OKTOSCRIPT_LICENSE.md for complete license terms.


🀝 Contributing

Contributions are welcome! We welcome bug reports, feature suggestions, documentation improvements, and example contributions. Please see CONTRIBUTING.md for guidelines.

Note: OktoScript is a proprietary language owned by OktoSeek AI. While we welcome contributions, you may not create derivative languages, tools, or interpreters based on OktoScript.


πŸ“§ Contact

If you have any questions, please raise an issue or contact us at service@oktoseek.com.


Made with ❀️ by the OktoSeek AI team

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support