CSML is Open-Source! Give us a ⭐️on Github!

Do You Speak
🤖 Chatbot?

CSML is a very simple yet turing-complete programming language. With its engine, it forms an entire conversational framework.
Let's discover what this all means!

start:
  say "Hello Stranger! 👋"
  say Image("https://media4.giphy.com/media/dzaUX7CAG0Ihi/giphy.gif")
  say Typing(1500)

  say Question(
    "Do you want to learn more about CSML?",
    buttons=[Button("Let's go 🤗") as go]
  )
  hold

  say Typing(1500)
  say "You can visit CSML Playground to try it out!"
  say Url(
    "https://play.csml.dev",
    text="👉 CSML Playground"
  )

  say Typing(1000)
  say "Enjoy ❤️"
  goto end

Concise and Readable Code

CSML's simple, expressive, descriptive syntax makes your code especially easy to write, read and maintain

Context and Memory Management

Maintaining conversation state is entirely built into the CSML Engine, without any additional boiler-plate

Chatbots as Text

Call us crazy, but we prefer writing clean code over fancy drag&drop graphical interfaces

Expressive Syntax

The best way to describe CSML's syntax is that it is expressive. It mimicks how a human would describe the conversation, to make it a natural experience to develop even the richest, most complex chatbots.

With its straightforward and readable style, CSML chatbots are easy to create as well as maintain over time.

// This is 100% valid CSML!
start:
  say "Hi there 👋!"
  remember answer = 42

  say Typing(1500)
  say Question(
    "What is the answer to life, the universe, and everything?",
    buttons=[Button("I don't know")],
  )
  hold

  if (event.match(answer)) {
    say Video("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
  }
  else {
    say "Nope, it's {{answer}}"
  }

Memory And Context Management

CSML handles memory and context so you don't have to: it remembers what a user said last, maintains the conversation state, and lets you update the memory on the fly, entirely automatically, no questions asked.

This way, you have full developer-level control over the conversation flow, with none of the complexity and overhead of having to handle state management yourself.

start:
  // create a temporary variable
  do randomUsers = HTTP("https://randomuser.me/api/").send()
  // remember long-term memories
  remember myUser = randomUsers.results[0]
  // flush the temporary cache
  goto update

update:
  // create new properties in an existing variable
  do myUser.score = 0
  // update existing properties, even nested!
  do myUser.name.first = "Jane"
  // use the variable
  say "Hello, {{myUser.name.first}} {{myUser.name.last}}"

Powerful Yet Extensible

CSML is full of exciting features: rich components (i.e for displaying images, videos and calendars), automatic casting of user inputs as strings or numbers, mathematical and cryptographic utilities, etc.

You are also free to extend its capabilities by adding your own custom CSML functions or even calling your own APIs and services with the built-in HTTP client!

fn fibonacci(n):
  if (n < 2) return 1
  return fibonacci(n - 1) + fibonacci(n - 2)

start:
  say Image("https://placekitten.com/900/600")
  debug { "a": "deeply", "nested": ["variable", 123] }

  // declare and use your own CSML functions
  say "Fib(4) = {{fibonacci(4) + 42}}"

  // cryptographic helpers
  say Base64("I love pistaccio ice cream")
  say Crypto("Hello World 😆").create_hash("sha256").digest("hex")

  // call your own APIs
  do HTTP("https://httpbin.org/post").post({"answer": 42}).send()

Read the docs

CSML has an extensive documentation. You should check it out!

Try CSML Open-Source

The CSML Engine is written in Rust, an extremely fast and secure low-level programming language with a very low footprint.

Compatible with most operating systems and several databases, CSML is the perfect conversational engine for highly scalable cloud-based, or more modest and even embarked chatbots.

Try CSML Online

You can try CSML quickly by visiting CSML Playground, an online environment where you can quickly write, test and share CSML code without any installation.

If you would like to go further with CSML online, try CSML Studio, a full-featured chatbot platform that lets you build, deploy and scale CSML chatbots easily.

Join the Community
on Slack Slack

Come and learn all about CSML with other chatbot enthusiasts on the CSML Community Slack! 🤗