Examples / Getting Started

Getting Started

Welcome to Tactus! This chapter introduces the fundamental concepts of the Tactus programming language through simple, self-contained examples.

Examples in This Chapter

Hello World

Has SpecsRequires API Keys

A minimal Tactus program demonstrating the core workflow without the formal `Procedure` structure. This example shows how to: - Define an agent with a provider and model - Write simple Tactus code that just returns an agent call - Include an embedded BDD specification with Gherkin syntax - Use fuzzy matching to validate agent responses flexibly

View example →

Simple Logic

Has Specs

A pure logic example that demonstrates Tactus procedures without using any AI agents. This example shows: - How to define procedures with input and output schemas using field definitions - State management with the `state` primitive - Multiple BDD specifications testing different aspects of the procedure - Basic Lua control flow (loops, conditionals)

View example →

Parameters

Has Specs

Demonstrates how to work with procedure parameters (inputs) and use them throughout your workflow. This example shows: - Defining input schemas with descriptions and default values - Accessing input parameters within the procedure function - Using parameters in loops and logic - Logging with the Log utility - State management with `State.increment()` - Returning structured output that references input parameters

View example →

Simple Agent

Has SpecsRequires API Keys

A complete agent interaction demonstrating real LLM workflows with tool calling. This example shows: - Defining an agent with a system prompt and initial message - Tool integration using the built-in `done` tool - Multi-turn agent loops with a maximum turn limit - Checking if a tool was called using `done.called()` - Extracting tool call arguments and using them in outputs - Pattern matching in specifications to validate varied agent responses

View example →

Hello World With Validation

Has SpecsRequires API Keys

The hello-world example revisited with the formal `Procedure` structure and input/output validation. This example shows: - Defining input schema with required and optional fields - Setting default values for optional parameters - Defining output schema with field descriptions - Type validation for inputs and outputs - Using input parameters within the procedure function - Returning structured output that matches the schema - Testing with multiple scenarios including default values

View example →

Want to contribute?

The examples repository is open source. Add your own examples or improve existing ones.

Part of the Anthus Platform
Tactus icon

Tactus

Tactus is a programming language and runtime for durable AI agent procedures with checkpointing, sandboxing, and built-in human-in-the-loop controls.

PART OF

The Anthus Platform

Solve complex business problems with AI and ML using a proven, reusable technology stack. These interoperable building blocks give our solutions a stronger operational foundation: durable procedures, MLOps control loops, workload orchestration, knowledge systems, observability, and programmable media workflows.

Plexus

MLOps platform for agent evaluation and iteration.

Tactus

Durable runtime for agent procedures.

Korporus

Agent operating system and federated shell.

Biblicus

Corpus analysis for extraction and retrieval.

Babulus

Marketing automation built around VideoML.

Kanbus

Durable multi-agent task management.

Caducus

Monitoring, alerts, and operator support.

Free and open-source softwareDesigned cybernetically by Ryan Porter
Contact us

How can we help?

GitHub

Browse the code.

LinkedIn

Company updates.

Discord

Join the chat.