Skip to content

reusee/tai

Repository files navigation

TAI - AI-Driven Development & Automation Suite

TAI is an integrated suite of tools designed for AI-driven software development, autonomous automation, and programmable intelligence. It treats software development as a process of Theory Building, providing the infrastructure to bridge high-level intent with concrete execution.

At its core, TAI combines advanced AI model orchestration with specialized virtual machines and autonomous agents to create a highly capable development environment.

1. Core Components

1.1 Virtual Machines

TAI includes two specialized execution environments that allow AI models to run code safely and deterministically:

  • Taipy: A Pythonic scripting language (Starlark-based syntax) compiled to custom bytecode.
  • Taigo: A lightweight Go interpreter that supports a significant subset of Go syntax for dynamic logic execution.

1.2 Taido (Autonomous Agent)

taido is a minimalist autonomous execution engine. It implements a ReAct (Thought-Action-Observation) loop that allows an AI agent to:

  1. Reason about a goal.
  2. Act using tools (Shell, EvalTaigo, Sub-agents).
  3. Observe outputs and adjust its strategy. It is designed for "set and forget" tasks like iterative optimization, data processing, or environment setup.

1.3 Generators

A unified interface for multiple AI providers, including:

  • Google Gemini (Native support for thinking/reasoning models).
  • OpenAI & Compatible Providers (Deepseek, OpenRouter, Baidu, Tencent, Aliyun, etc.).
  • Support for structured output, tool calling, and token counting across different architectures.

2. CLI Tools

TAI provides several commands for different workflows:

  • tai chat: An interactive AI assistant with a persistent memory system (User Profile) and tool-calling capabilities.
  • tai do: Triggers taido for autonomous task execution. Example: tai do goal="Refactor the storage layer to use PostgreSQL".
  • tai go: AI-powered Go code analysis and transformation tool.
  • tai any: General-purpose AI coding assistant for any language.
  • taipatch: Applies code hunks (in TAI's custom format) generated by the AI to the local filesystem safely.

3. Configuration System

TAI uses a hierarchical, dual-layered configuration system:

  1. Data Configuration (tai.cue): Uses CUE for type-safe, schema-validated settings (API keys, model preferences, file filters).
  2. Logic Configuration (tai.go): Uses Taigo to allow programmable configuration. You can define variables and logic in Go that are accessible to the AI during its reasoning process.

Configuration is loaded in order: /etc/tai.go -> ~/.config/tai.go -> ./tai.go.

4. Security

TAI prioritizes safety when giving AI models access to your system:

  • Sandboxing: On Linux, taido supports an opt-in filesystem sandbox using Landlock. When enabled (via -safe), the agent is restricted to write access only within the current working directory while maintaining read access for context.
  • Containerization: gotai can automatically re-execute itself within a restricted namespace/container to provide further isolation.

5. Getting Started

Installation

go install github.com/reusee/tai/cmd/tai@latest

Basic Usage

Start a chat with memory enabled:

tai chat "How does the project's VM handle closures?"

Execute an autonomous task:

tai do goal="Find all TODOs in the codebase and summarize them in TODO.md"

6. Architecture & Philosophy

The project follows the philosophy of Conceptual Integrity. Instead of relying on complex, opaque frameworks, TAI provides lean abstractions that maintain a clear "Theory of the System."

  • Software Development as Theory Building: TAI is built to help users and AI build a shared mental model of the code.
  • Strategic Subtraction: We prefer minimal, composable tools over monolithic features.
  • Interface First: Clear semantics for tool usage and model interaction.

7. Project Structure

Directory Description
cmd/ CLI tool implementations (tai, taigo, taipy, etc.)
taivm/ The core stack-based Virtual Machine
taipy/ Pythonic compiler and language bindings
taigo/ Go interpreter and compiler
taido/ Autonomous execution logic
generators/ AI model provider implementations
anytexts/ Context providers for various file types
gocodes/ Specialized Go source analysis and simplification

About

AI toolbox

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors