Skip to main content
Version: PromptQL

Basics of Business Logic

Introduction

PromptQL can enable your application to act on a user's behalf by using custom business logic as a data source. This logic can be tailored to each user's context — making decisions, aggregating data, or performing side effects — just like a human assistant would.

With a lambda connector, you can write this logic in your language of choice (TypeScript, Python, or Go) and make it available directly to PromptQL. That means PromptQL isn't limited to querying data — it can trigger logic, run workflows, or transform inputs into actions, all within a secure and consistent API environment.

By treating logic like a first-class data source, PromptQL ensures your application has a unified surface for interacting with databases, services, and whatever actions you want your application to be able to take. You define how the system should respond to user queries, apply business rules, or even call third-party APIs.

Custom logic functions can work independently or extend your models, adding intelligence or automation wherever it's needed.

This approach simplifies your architecture and unlocks a powerful new interaction model: applications that respond, reason, and act...not just fetch data.

What languages are supported?

You can write PromptQL-powered logic in TypeScript, Python, or Go. These functions can be hosted by Hasura or deployed on your own infrastructure using our lambda connectors.

Learn more

What about custom native operations?

If you're curious about native queries and mutations, check out the connector-specific reference docs for generating queries and mutations using the native capabilities of your data source.