Skip to main content

Based Language Fundamentals

Welcome to the Based Language Fundamentals guide. This reference document provides a comprehensive explanation of Based’s core language constructs, their declaration syntax, arguments, and practical usage examples. Understanding these fundamentals will enable you to build sophisticated conversational agents with precision and confidence. Based is built around a set of specialized constructs designed specifically for conversational AI workflows. These constructs provide a high-level abstraction that makes it easy to build complex interactions without getting lost in implementation details.

Core Constructs

Learn about say, loop, talk, until, and the .ask method

State Management

Understand how to persist data across conversation turns

Advanced Patterns

Multiple until statements, tool schemas, and conditional flow

Platform Functions

Voice-specific functions like transfer and end_call

Utility Functions

HTTP requests, SMS, integrations, and debugging

Full Example

Complete Book Recommendation Agent walkthrough