Now in Private Beta

The Agent Programming
Language

Define agents in a declarative language. Compile to TypeScript, Python, or Go. Edit with full LSP support in VSCode, Vim, and Neovim.

terminal
$sagesyn init research-assistant.sag

Created research-assistant.sag

Configured MCP servers

LSP ready - open in your editor

✓ Run: sag compile --target typescript

$

Visual Agent Builder

Design multi-agent workflows visually. Click nodes, switch tabs, and run the simulation.

sagesyn~/projects/research-assistant.sag
ollama:llama3.3v0.1.0
user_input
research_agent
claude-sonnet-4
2.8k tok
web_search
4.2k tok
writer_agent
gpt-4o
3.1k tok
file_output
100%
5 nodes4 mcp serversmain
connectedsaved

Agents as First-Class Citizens

A purpose-built language for defining intelligent agents. Protocol primitives, model abstraction, and workflow constructs built right in.

Declarative Syntax

Define agents in clean, YAML-like syntax. Focus on what your agent does, not the boilerplate. Native constructs for MCP, A2A, and AG-UI protocols.

Multi-Target Compilation

Write once, compile to TypeScript, Python, or Go. Your agent definitions become production-ready code in whatever language your team uses.

LSP-Powered Editing

Full Language Server Protocol support. Autocompletion, hover docs, diagnostics, and refactoring in VSCode, Vim, Neovim, and any LSP-compatible editor.

Write .sag, compile to anything

Define agents in a clean, declarative syntax. Compile to TypeScript, Python, or Go with a single command.

research-assistant.sag
agent: research_assistant
version: 1.0

model:
  provider: anthropic
  name: claude-sonnet-4
  context_window: 128000

protocols:
  mcp:
    servers: [brave_search, filesystem]
  a2a:
    discoverable: true
    capabilities: [research, summarize]
  ag_ui:
    stream_events: true

tools:
  - name: web_search
    mcp_server: brave_search
    description: "Search the web for information"

workflow:
  - perceive: { from: trigger.user_input }
  - reason: { depth: 3, strategy: chain_of_thought }
  - execute: { tools: [web_search] }
  - respond: { format: markdown, stream: true }
Compiles to
import { Agent, MCPServer } from "@sagesyn/runtime-ts";

const braveSearch = new MCPServer("brave_search");
const filesystem = new MCPServer("filesystem");

export const researchAssistant = new Agent({
  name: "research_assistant",
  model: {
    provider: "anthropic",
    name: "claude-sonnet-4",
    contextWindow: 128000,
  },
  protocols: {
    mcp: { servers: [braveSearch, filesystem] },
    a2a: { discoverable: true, capabilities: ["research", "summarize"] },
    agUi: { streamEvents: true },
  },
  tools: [
    { name: "web_search", mcpServer: braveSearch },
  ],
  workflow: [
    { perceive: { from: "trigger.user_input" } },
    { reason: { depth: 3, strategy: "chain_of_thought" } },
    { execute: { tools: ["web_search"] } },
    { respond: { format: "markdown", stream: true } },
  ],
});

Compile, check, run

The sagesyn CLI compiles your .sag files to production code, validates with the LSP, and runs agents directly. Full debugging with source maps.

  • Compile to TypeScript, Python, or Go
  • LSP diagnostics from the command line
  • Run agents locally or in the cloud
  • Debug with source maps back to .sag
sagesyn-cli
$

Start writing .sag today

Define agents in a declarative language. Compile to any target. Get early access to the compiler, LSP, and visual IDE.

Questions? [email protected]