Skip to main content

An Agent Trajectory Recording and Replay tool. Provides a standardized declarative Trajectory DSL alongside atac cli, atac mcp, and atac skills. Currently supports MCP, Bash, and some Agent built-in tools, recording dynamic Agent tool call trajectories into reusable static ATaC resources.

Project description

ATaC (Agentic Trajectory as Code)

English | 中文


中文

ATaC (Agentic Trajectory as Code) 是一个专为 AI Agent 设计的轨迹录制与回放工具。它提供了一套标准化的声明式智能体轨迹 DSL,并提供了 atac cliatac mcpatac skills。目前的轨迹 DSL 已经支持了 MCP、Bash 和部分 Agent 的内置工具,将动态的 Agent 工具调用轨迹录制为可复用的 ATaC 静态资源。

🛠 核心能力

  • 声明式控制流: 在 YAML 中实现循环 (for) 和条件 (if-else) 逻辑。
  • 多协议支持: 统一驱动 mcp:// (Model Context Protocol), bash:// (Shell) 及 kimi:// (Kimi 内置工具)。
  • Agent 编程接口: 提供 CLI 指令,使 LLM 能够通过命令行自主构建、修改和执行复杂工作流。
  • 可视化调试图谱: 内置 Web UI (atac ui) 提供工作流运行时的可视化追踪调试功能。

ATaC Web UI

📋 执行器兼容性

执行器 协议 状态 说明
MCP mcp:// ✅ 已支持 原生支持所有标准 MCP 服务
Bash bash:// ✅ 已支持 支持本地终端命令及脚本执行
Kimi / Moonshot kimi:// ✅ 已支持 支持 Kimi-CLI 内置工具(需加锁 [kimi] 安装)
Claude Code claude:// 🚧 规划中 待集成内置工具集

🤖 自主构建与流转示例

1. 自动化构建 (CLI)

Agent 可以通过以下指令序列自主生成 lookup.yaml 轨迹文件:

# 1. 初始化并定义输入变量
atac init lookup.yaml --name "GeoSearch"
atac add-input lookup.yaml --name provinces --type list

# 2. 注入逻辑结构 (For 循环)
atac add-for lookup.yaml --in '${inputs.provinces}' --item province

# 3. 在指定位置插入动作 (支持路径寻址)
atac add-action lookup.yaml --at 0 --id geo --action "mcp://amap/maps_geo" --args '{"address": "${variables.province}"}'

# 4. 预览生成的结构
atac show lookup.yaml

2. 嵌套轨迹调用 (Sub-Workflows)

ATaC 原生支持通过 bash://run 调用其它 ATaC 文件,从而实现模块化与依赖复用:

# 在 parent.yaml 中
steps:
  - id: call_sub
    type: action
    action: bash://run
    args:
      command: atac run child.yaml --input city="Beijing"

🚀 快速开始

  1. 安装
uv tool install atac  # 极简模式(无内置工具包,启动最快)

# 如果需要使用 Kimi 等平台特供执行器的工具,可以额外引入对应扩展包:
uv tool install "atac[kimi]"
  1. 配置 MCP 环境
export ATAC_MCP_SERVER_CONFIGS="path/to/mcp_config.json"
  1. 执行轨迹
atac run example/multi_province_center.yaml
  1. 作为 MCP Server 启动 任何支持 MCP 的客户端 (如 Claude Desktop 或 Cursor) 均可将 ATaC 作为工具集连接:
{
  "mcpServers": {
    "atac": {
      "command": "atac",
      "args": ["mcp"],
      "env": {
        "ATAC_MCP_SERVER_CONFIGS": "path/to/mcp_config.json"
      }
    }
  }
}

如果尚未在全局安装,也可以使用 uvx 直接运行(推荐):

{
  "mcpServers": {
    "atac": {
      "command": "uvx",
      "args": ["atac", "mcp"],
      "env": {
        "ATAC_MCP_SERVER_CONFIGS": "path/to/mcp_config.json"
      }
    }
  }
}

English

ATaC (Agentic Trajectory as Code) is an Agent Trajectory Recording and Replay tool. It provides a standardized declarative Trajectory DSL alongside atac cli, atac mcp, and atac skills. The trajectory DSL currently supports MCP, Bash, and some Agent built-in tools, recording dynamic Agent tool call trajectories into reusable static ATaC resources.

🛠 Key Features

  • Declarative Control Flow: Native for and if-else support within YAML.
  • Multi-protocol Support: Unified execution for mcp://, bash://, and kimi://.
  • Agentic Authoring: CLI-first design allowing LLMs to programmatically build, refine, and execute their own workflows.
  • Visual Graph Debugging: Built-in Web UI (atac ui) for runtime workflow visualization and minimal-design editing.

ATaC Web UI

📋 Executor Support

Executor Scheme Status Note
MCP mcp:// ✅ Supported Native support for all MCP servers
Bash bash:// ✅ Supported Local shell commands and scripts
Kimi / Moonshot kimi:// ✅ Supported Full Kimi-CLI toolset support (requires [kimi] extra)
Claude Code claude:// 🚧 Roadmap Built-in tool integration pending

🤖 Authoring & Workflow Examples

1. Authoring Flow (CLI)

Agents can generate a lookup.yaml trajectory via direct CLI commands:

atac init lookup.yaml --name "GeoSearch"
atac add-input lookup.yaml --name provinces --type list
atac add-for lookup.yaml --in '${inputs.provinces}' --item province
atac add-action lookup.yaml --at 0 --id geo --action "mcp://amap/maps_geo" --args '{"address": "${variables.province}"}'

2. Nested Trajectories (Sub-Workflows)

ATaC supports executing other ATaC files natively via the bash://run executor, allowing you to build modular, reusable sub-workflows:

# Inside parent.yaml
steps:
  - id: call_sub
    type: action
    action: bash://run
    args:
      command: atac run child.yaml --input city="Beijing"

🚀 Quick Start

  1. Installation
uv tool install atac

# To enable platform-specific built-in tools like Kimi, install with extras:
uv tool install "atac[kimi]"
  1. MCP Configuration
export ATAC_MCP_SERVER_CONFIGS="path/to/mcp_config.json"
  1. Run
atac run example/multi_province_center.yaml
  1. Run as MCP Server Any MCP-compatible client (like Claude Desktop or Cursor) can connect to ATaC to author and run trajectories:
{
  "mcpServers": {
    "atac": {
      "command": "atac",
      "args": ["mcp"],
      "env": {
        "ATAC_MCP_SERVER_CONFIGS": "path/to/mcp_config.json"
      }
    }
  }
}

If not installed globally, you can also use uvx directly (Recommended):

{
  "mcpServers": {
    "atac": {
      "command": "uvx",
      "args": ["atac", "mcp"],
      "env": {
        "ATAC_MCP_SERVER_CONFIGS": "path/to/mcp_config.json"
      }
    }
  }
}

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

atac-0.1.5.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

atac-0.1.5-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file atac-0.1.5.tar.gz.

File metadata

  • Download URL: atac-0.1.5.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for atac-0.1.5.tar.gz
Algorithm Hash digest
SHA256 d8bb3bb09a2adc26b6883ca2e51b1fb4821284c88748a87035a65808b193a7b9
MD5 ebb83a32f84929ef06cc2d248c6d86aa
BLAKE2b-256 f3ea62a7a53286c0a54329c1fe3ca641cb7e23553b69b9a9f217d5561acd435f

See more details on using hashes here.

Provenance

The following attestation bundles were made for atac-0.1.5.tar.gz:

Publisher: cd.yml on ATaC-team/ATaC

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file atac-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: atac-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for atac-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 45e8984ab881d51f22d39e54cec7e84e2179a5ebab62f571113264cb07fc0637
MD5 42238d488f86e96858b77b7460f43a9c
BLAKE2b-256 9b875938ae85eba0793d82fe118861d4ae19e9d1b90709e8363d9dd0db517bb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for atac-0.1.5-py3-none-any.whl:

Publisher: cd.yml on ATaC-team/ATaC

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page