ATaC (Agentic Trajectory as Code) logo

ATaC (Agentic Trajectory as Code)

Community
ATaC-team

Record and Replay AI Agent Trajectories.

PublisherATaC-team
RepositoryATaC
LanguagePython
Forks
11
Stars
310
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    ATaC (Agentic Trajectory as Code) exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    310 stars and 11 forks from the linked repository.

PyPI version Python versions License: MIT CI Status

English | 中文

中文

ATaC是一个面向 Agent 工作流的工具运行时,帮助 Agent 通过编排图代码复用资产。

它主要提供三类能力:

  • 统一工具注册:把本地 Agent 工具和 MCP 工具纳入同一个运行时
  • Agent 自编排 graph:让 Agent 生成的 graph 代码可以直接复用这些已注册能力
  • 一键运行:加载并执行这些 graph 工作流

把工具注册到 ATaC,让 Agent 用代码把这些工具组织成流程,并逐步沉淀为可复用、可维护的 graph 工作流。

🤖 最小接入示例

1. 注册 Agent 内置工具和 MCP 工具

python
import asyncio
import inspect
import sys
from pathlib import Path

from atac import AtacService
import atac.subprocess as subprocess
from langchain_core.tools import tool
from langchain_mcp_adapters.client import MultiServerMCPClient

service = AtacService()


@tool
def bash(command: str) -> str:
    """在当前运行目录里执行 shell 命令。"""
    completed = subprocess.run(
        command,
        shell=True,
        capture_output=True,
        text=True,
    )
    if completed.returncode != 0:
        raise RuntimeError(completed.stderr.strip() or "bash failed")
    return completed.stdout.rstrip("\n")

service.register_langgraph_tools([bash])

client = MultiServerMCPClient(
    {
        "demo_mcp": {
            "transport": "stdio",
            "command": sys.executable,
            "args": [str(Path("simple_mcp_server.py").resolve())],
        }
    }
)

mcp_tools = client.get_tools()
if inspect.isawaitable(mcp_tools):
    try:
        asyncio.get_running_loop()
    except RuntimeError:
        mcp_tools = asyncio.run(mcp_tools)
    else:
        raise RuntimeError("在异步上下文里请先 await client.get_tools() 再注册")

mcp_tools = list(mcp_tools)
service.register_langgraph_tools(mcp_tools)


def get_service() -> AtacService:
    return service

推荐做法:

  • 本地工具直接使用原生 langchain_core.tools.tool
  • MCP 工具直接使用官方 langchain_mcp_adapters.client.MultiServerMCPClient
  • 统一通过 service.register_langgraph_tools(...) 注册到 AtacService

2. 在 graph 代码里调用 ATaC SDK

python
from langgraph.graph import START, END, StateGraph

from atac import get_service


def run_bash(state: dict) -> dict:
    output = get_service().tool_call("bash", {"command": f"echo {state['who']}"})
    return {"output": output}


def build_graph():
    graph = StateGraph(dict)
    graph.add_node("run_bash", run_bash)
    graph.add_edge(START, "run_bash")
    graph.add_edge("run_bash", END)
    return graph.compile()

🚀 快速开始

1. 安装

bash
uv tool install atac

2. Python SDK

python
from myapp.bootstrap import get_service

service = get_service()
result = service.run_graph("myapp.graphs:build_graph", {"who": "mob"})

3. 示例


English

ATaC is a tool runtime for agent workflows.

It provides three core capabilities:

  • unified tool registration
  • agent-authored graph workflows that reuse registered tools
  • one-command graph execution

Register tools with ATaC, let agents organize them into workflows as code, and gradually turn repeated tasks into reusable, maintainable graph workflows.

🤖 Minimal Integration

1. Register Built-In and MCP Tools

python
import asyncio
import inspect
import sys
from pathlib import Path

from atac import AtacService
import atac.subprocess as subprocess
from langchain_core.tools import tool
from langchain_mcp_adapters.client import MultiServerMCPClient

service = AtacService()


@tool
def bash(command: str) -> str:
    """Run a shell command inside the current runtime workdir."""
    completed = subprocess.run(
        command,
        shell=True,
        capture_output=True,
        text=True,
    )
    if completed.returncode != 0:
        raise RuntimeError(completed.stderr.strip() or "bash failed")
    return completed.stdout.rstrip("\n")

service.register_langgraph_tools([bash])

client = MultiServerMCPClient(
    {
        "demo_mcp": {
            "transport": "stdio",
            "command": sys.executable,
            "args": [str(Path("simple_mcp_server.py").resolve())],
        }
    }
)

mcp_tools = client.get_tools()
if inspect.isawaitable(mcp_tools):
    try:
        asyncio.get_running_loop()
    except RuntimeError:
        mcp_tools = asyncio.run(mcp_tools)
    else:
        raise RuntimeError("Await client.get_tools() before registering in async code.")

mcp_tools = list(mcp_tools)
service.register_langgraph_tools(mcp_tools)


def get_service() -> AtacService:
    return service

Recommended path:

  • use the native langchain_core.tools.tool decorator for local tools
  • use the official langchain_mcp_adapters.client.MultiServerMCPClient for MCP tools
  • register everything through service.register_langgraph_tools(...)

2. Call the ATaC SDK from Graph Code

python
from langgraph.graph import START, END, StateGraph

from atac import get_service


def run_bash(state: dict) -> dict:
    output = get_service().tool_call("bash", {"command": f"echo {state['who']}"})
    return {"output": output}


def build_graph():
    graph = StateGraph(dict)
    graph.add_node("run_bash", run_bash)
    graph.add_edge(START, "run_bash")
    graph.add_edge("run_bash", END)
    return graph.compile()

🚀 Quick Start

1. Install

bash
uv tool install atac

2. Run via Python SDK

python
from myapp.bootstrap import get_service

service = get_service()
result = service.run_graph("myapp.graphs:build_graph", {"who": "mob"})

3. Examples

Installation

TypingMind
{
  "mcpServers": {
    "atac": {
      "command": "atac",
      "args": [
        "mcp"
      ],
      "env": {
        "ATAC_MCP_SERVER_CONFIGS": "<ATAC_MCP_SERVER_CONFIGS>"
      }
    }
  }
}

Use ATaC (Agentic Trajectory as Code) MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once ATaC (Agentic Trajectory as Code) is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add ATaC (Agentic Trajectory as Code) as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the ATaC (Agentic Trajectory as Code) MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "atac": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the ATaC (Agentic Trajectory as Code) MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the ATaC (Agentic Trajectory as Code) MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use ATaC (Agentic Trajectory as Code) to help me with this task?
ATaC (Agentic Trajectory as Code)
Sure. I read it.
Here is what I found using ATaC (Agentic Trajectory as Code).

Frequently asked questions

What is the ATaC (Agentic Trajectory as Code) MCP server used for?

ATaC (Agentic Trajectory as Code) is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use ATaC (Agentic Trajectory as Code) MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use ATaC (Agentic Trajectory as Code) with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use ATaC (Agentic Trajectory as Code) MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With ATaC (Agentic Trajectory as Code) connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect ATaC (Agentic Trajectory as Code) MCP to TypingMind?

ATaC (Agentic Trajectory as Code) runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does ATaC (Agentic Trajectory as Code) MCP provide in TypingMind?

ATaC (Agentic Trajectory as Code) exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use ATaC (Agentic Trajectory as Code) MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If ATaC (Agentic Trajectory as Code) requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇