Tactus for Visual Studio Code
Full language support for the Tactus AI workflow language.
Features
Basic Features (Always Available)
Enhanced Features (With LSP Server)
Install tactus-lsp-server for advanced code intelligence:
- Real-time Validation: Catch errors as you type with instant diagnostics
- Intelligent Code Completion: Context-aware suggestions for DSL keywords, agents, and tools
- Hover Documentation: See agent/tool configuration without jumping to definition
- Semantic Highlighting: Colors based on semantic meaning (agents vs tools vs procedures)
- Signature Help: Parameter hints for DSL functions
Installation
Basic Installation (Syntax Highlighting Only)
- Download the
.vsix file
- Open VSCode
- Go to Extensions (Cmd+Shift+X or Ctrl+Shift+X)
- Click the "..." menu at the top of the Extensions panel
- Select "Install from VSIX..."
- Choose the downloaded
.vsix file
Full Installation (With LSP Features)
- Install Python 3.9 or higher
- Install the Tactus LSP server:
pip install tactus-lsp-server
- Install the VSCode extension (as above)
- Open a
.tac file - LSP features will activate automatically
From Source
Clone the repository:
git clone https://github.com/AnthusAI/Tactus
cd Tactus/tactus-vscode
Install dependencies:
npm install
Package the extension:
npm run package
Install the generated .vsix file:
code --install-extension tactus-0.1.0.vsix
Supported Syntax
DSL Keywords
- Core:
Agent, Model, Procedure, Task, Tool, Toolset
- Context:
Context, Prompt, Human, Log, State
- Testing:
Specification, Specifications, Step
- Evaluation:
Evaluation, Evaluations
- Configuration:
name, version, description, input, output
- Advanced:
IncludeTasks, Hitl, File, Session, Retry
Field Builders
field.string{required = true, description = "..."}
field.number{default = 10}
field.boolean{required = false}
field.array{description = "..."}
field.object{description = "..."}
Example
-- Import tools
local done = require("tactus.tools.done")
-- Define agent
worker = Agent {
provider = "openai",
model = "gpt-4o",
system_prompt = "You are helpful",
tools = {done}
}
-- Define workflow
Procedure {
input = {
task = field.string{required = true}
},
output = {
result = field.string{required = true}
},
function(input)
repeat
worker()
until done.called()
return {result = Tool.last_result("done")}
end
}
About Tactus
Tactus is a Lua-based DSL for building AI agent workflows. It extends Lua with high-level primitives for:
- Defining LLM-powered agents
- Creating structured workflows with I/O schemas
- Tool integration and agent-tool interactions
- Human-in-the-loop workflows
- BDD-style testing with Gherkin syntax
- Automatic checkpointing and durability
Learn more at https://github.com/AnthusAI/Tactus
Development
To test the extension during development:
- Open the
tactus-vscode folder in VSCode
- Press F5 to launch the Extension Development Host
- Open a
.tac file to see syntax highlighting
Contributing
Contributions are welcome! Please see the main Tactus repository for contribution guidelines.
License
MIT License - see LICENSE file in the root of the repository.
| |