Agentic Trajectory as Code (ATaC) - A declarative workflow DSL for AI Agents
Project description
ATaC (Agentic Trajectory as Code)
中文
ATaC 是一个专为 AI Agent 设计的声明式工作流 DSL 和 CLI 工具。它允许你将复杂的 Agent 行为(工具调用、条件判断、循环执行)定义为可分发、可复用的“轨迹码(Trajectory as Code)”。
🚀 核心特性
- Agent 原生设计: 专为 LLM Agent 协作设计。不仅提供人类可读的 YAML,还配套
SKILL.md技能描述文件,让 Agent 能瞬间掌握操作技巧。 - 声明式 DSL: 基于 YAML 定义工作流,支持循环 (
for) 和条件判断 (if-else)。 - MCP 原生支持: 通过
mcp://协议无缝集成 Model Context Protocol 服务器。 - 可视化寻址: 通过
atac show提供的路径坐标(如0.2.then)让 Agent 像操控手术刀一样精确管理嵌套逻辑。
🛠 执行器支持矩阵 (Executor Support)
| 执行器 (Executor) | 协议 (Scheme) | 状态 (Status) | 说明 |
|---|---|---|---|
| MCP | mcp:// |
✅ 已支持 | 原生支持所有符合 MCP 标准的服务 |
| Bash | bash:// |
✅ 已支持 | 支持本地终端命令及脚本执行 |
| Claude Code | - | 🚧 待开发 | 欢迎社区贡献内置工具集成 |
| Kimi / Moonshot | kimi:// |
✅ 已支持 | 支持 Kimi-CLI 所有的内置工具 |
📄 Agent 集成 (Skills)
如果你在开发 Agent 辅助系统,只需将项目中的 SKILL.md 提供给 Agent(如作为 System Prompt 的一部分或 Skill 文件夹),它就能理解如何自主构建、调试和运行复杂的任务轨迹。
[!TIP] 推荐实践:
# 1. 将技能文件集成到 Agent cp SKILL.md path/to/your/agent/skills/ # 2. 配置 MCP 服务目录 export ATAC_MCP_SERVER_CONFIGS="/path/to/your/mcp/config.json"
📦 快速开始
pip install atac
# 1. 配置高德地图 MCP (在 mcp_config.json 中添加)
# {
# "mcpServers": {
# "amap-maps": {
# "command": "npx",
# "args": ["-y", "@amap/amap-maps-mcp-server"],
# "env": { "AMAP_MAPS_API_KEY": "YOUR_API_KEY_HERE" }
# }
# }
# }
export ATAC_MCP_SERVER_CONFIGS="path/to/mcp_config.json"
# 2. 运行示例轨迹
atac run example/multi_province_center.yaml
🤝 贡献指南
我们欢迎各种形式的贡献!
- Fork 本仓库并创建特性分支。
- 确保所有更改都通过了
pytest单测和ruff代码检查。 - 提交 Pull Request,并详细描述你的更改。
English
ATaC is a declarative workflow DSL and CLI tool designed specifically for AI Agents. It allows you to define complex agent behaviors—such as sequential tool calls, conditional branching, and iterative loops—as distributable and reusable "Trajectories as Code."
🚀 Key Features
- Agent-Centric: Built for LLM Agents. Every command and structure is designed to be easily manipulated by an AI, complemented by a dedicated
SKILL.mdfor instant proficiency. - Declarative DSL: Define workflows in YAML with built-in logic for
forloops andif-elsebranches. - MCP Native: Seamless integration with Model Context Protocol servers via the
mcp://protocol. - Visual Addressing: Precise control over nested logic using path coordinates (e.g.,
0.2.then) fromatac show.
🛠 Executor Support Matrix
| Executor | Scheme | Status | Note |
|---|---|---|---|
| MCP | mcp:// |
✅ Supported | Native support for all MCP servers |
| Bash | bash:// |
✅ Supported | Run local terminal commands & scripts |
| Claude Code | - | 🚧 Pending | Community contributions are welcome! |
| Kimi / Moonshot | kimi:// |
✅ Supported | Full support for Kimi-CLI built-in tools |
📄 Agent Integration (Skills)
The core value of ATaC lies in its Skill System. By providing the SKILL.md (found in the project root) to your Agent, it gains the immediate ability to autonomously architect, debug, and execute complex task trajectories.
[!TIP] Best Practice:
# 1. Integrate the skill file into your Agent cp SKILL.md path/to/your/agent/skills/ # 2. Configure the MCP service directory export ATAC_MCP_SERVER_CONFIGS="/path/to/your/mcp/config.json"
📦 Quick Start
pip install atac
# 1. Configure Amap MCP (Add to your mcp_config.json)
# {
# "mcpServers": {
# "amap-maps": {
# "command": "npx",
# "args": ["-y", "@amap/amap-maps-mcp-server"],
# "env": { "AMAP_MAPS_API_KEY": "YOUR_API_KEY_HERE" }
# }
# }
# }
export ATAC_MCP_SERVER_CONFIGS="path/to/mcp_config.json"
# 2. Run the example trajectory
atac run example/multi_province_center.yaml
🤝 Contributing
Contributions of any kind are welcome!
- Fork the repository and create your feature branch.
- Ensure all changes pass
pytestunit tests andrufflinting. - Submit a Pull Request with a detailed description of your changes.
License
MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file atac-0.1.0.tar.gz.
File metadata
- Download URL: atac-0.1.0.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
346502f536deb93a2c8bfd268685b25e7e686df80276d3ab18132c96818f90e0
|
|
| MD5 |
908b08cd1d9337ba2ba324debe7eb58e
|
|
| BLAKE2b-256 |
a31141ce0550977fc8f07f7e5313698d4b480a9ba92be9f1fc53e9a3e7c37f1b
|
File details
Details for the file atac-0.1.0-py3-none-any.whl.
File metadata
- Download URL: atac-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f965d58ad5ab617dcab72765044e24157559b5e4088e50d272fe41137eb1c8e
|
|
| MD5 |
93222b1392f8f9eff99579197cafed69
|
|
| BLAKE2b-256 |
fcb2a0129c98fa93fb4b3fabb3a1f386d6ea06dab6edc8499d8ed06c54e1149a
|