Skip to content
Last updated

Agent Setup

Treasure AI provides Skills (treasure-data/td-skills) and MCP servers so your AI coding agent can search live documentation, query databases, build segments and journeys in YAML, and run workflows directly from natural-language prompts.

Turn your AI agent into a marketing engine

Paste into any AI coding agent to install Treasure AI MCP servers and td-skills:


Pick Your Agent

Select an agent to get step-by-step setup instructions, or filter by where the agent runs.

Filter by workflow:
Anthropic
TerminalIDEExtension

Claude Code

Terminal-based coding agent that understands your codebase, queries Treasure AI data, edits YAML, and manages git. Pre-configured via tdx claude.

tdx claudeView guide →
OpenAI
TerminalCloud

Codex

OpenAI coding agent CLI and cloud workspace. Connect via tdx codex or Local MCP Server with TD Skills installed.

tdx codexView guide →
Cursor
IDE

Cursor

AI-first IDE built on VS Code with multi-file Composer edits, background agents, and native MCP & Skills support.

MCPView guide →
GitHub / Microsoft
IDEExtension

GitHub Copilot (VS Code)

Editor extension and Copilot Chat Agent mode in Visual Studio Code with MCP tool execution and TD Skills plugins.

MCPView guide →
Snowflake
Terminal

Snowflake Cortex Code

Snowflake CLI coding agent (cortex). Connect to tdx mcp over stdio or a Treasure AI Studio MCP Endpoint over HTTP.

MCPView guide →
Databricks
Terminal

Databricks Genie Code

Databricks terminal coding agent (genie). Query Treasure AI databases and segments via tdx mcp or trigger Studio Actions.

MCPView guide →
Snowflake
Cloud

Snowflake CoWork

Browser-based Snowflake assistant for business users. Uses a Cortex Agent and Python stored procedure to inspect CDP audiences and journeys.

MCPView guide →
Databricks
Cloud

Databricks Genie Agents

Databricks agents for business users. Uses Unity Catalog functions to inspect CDP parent segments, segments, and journeys read-only.

MCPView guide →
Earendil
Terminal

Pi

Minimal, extensible terminal agent harness with Codemode scripting across tdx and td-docs MCP servers. Pre-configured via tdx pi.

tdx piView guide →
Anomaly
Terminal

OpenCode

Open-source terminal coding agent with a rich TUI that connects to Treasure AI models and credentials through tdx opencode.

tdx opencodeView guide →

Compare Agents

Capabilities, MCP connections, and TD Skills installation compared across supported agents.

Agent Workflow Pre-configured Launcher MCP Support TD Skills
Claude CodeTerminal, IDE, Extensiontdx claudeDocs + Platform + StudioBundled via tdx claude, tdx skill install, or /plugin install
OpenAI CodexTerminal, Cloudtdx codexPlatform + StudioBundled via tdx codex, tdx skill install, or codex plugin add
CursorIDE—Docs + Platform + StudioCopy into ~/.cursor/skills
GitHub Copilot (VS Code)IDE, Extension—Docs + Platform + Studiocopilot plugin install
Snowflake Cortex CodeTerminal—Platform + StudioNot covered in this guide
Databricks Genie CodeTerminal—Platform + StudioNot covered in this guide
Snowflake CoWorkCloud—None (the stored procedure calls the CDP REST API)Orchestration instructions set with ALTER AGENT
Databricks Genie AgentsCloud—None (Unity Catalog functions call the CDP REST API)General Instructions set in the Genie Agent
PiTerminaltdx piDocs + Platform (Codemode)Bundled via tdx pi (~/.agents/skills)
OpenCodeTerminaltdx opencodeNot covered in this guideNot covered in this guide

Studio MCP Endpoint works with any MCP client that connects over Streamable HTTP and sends an Authorization header. See Connecting an MCP Client. Pi and OpenCode link to their tdx command pages because tdx launches them.


Treasure AI Platform Access for Agents

Your AI agent connects to Treasure AI through three building blocks: TD Skills (domain knowledge), MCP Servers (live tools), and LLM-friendly Documentation (llms.txt and .md exports).

1. TD Skills (treasure-data/td-skills)

TD Skills are reusable instruction packages that teach your coding agent Treasure AI conventions—Trino and Hive SQL functions (td_interval, td_time_range), Treasure Workflow syntax, CDP segment/journey YAML schemas, RT 2.0 real-time personalization and journeys, and the JavaScript and Python SDKs—so you do not have to explain them in every prompt.

Skill Bundle Included Skills What It Teaches Your Agent
tdx-skills (bundled with tdx)tdx-basic, parent-segment, parent-segment-analysis, segment, validate-segment, activation, connector-config, journey, validate-journey, engage, workflow, foundry-agent, foundry-agent-test, foundry-agent-prompt, ai-decision, casOperating the Treasure AI platform with tdx, validating segment and journey YAML, configuring activations, building AI Agent Foundry agents, classifying text with the AI Decisions API, and managing Composable Audience Studio (CAS) audiences
sql-skillstrino, hive, time-filtering, trino-optimizer, trino-to-hive-migrationWriting and optimizing Treasure AI Trino and Hive queries, partition pruning with td_interval, and migrating memory-heavy queries
workflow-skillsdigdag, dbt, llm-workflowAuthoring Treasure Workflow (.dig) definitions, scheduling, retry/backfill patterns, LLM steps with Slack or email notifications, and running dbt on Treasure AI Trino
realtime-skillsrt-setup-personalization, rt-setup-triggers, rt-config, rt-config-setup, rt-config-events, rt-config-attributes, rt-config-id-stitching, rt-personalization, rt-personalization-validation, rt-triggers, rt-journey-create, rt-journey-activations, rt-journey-monitor, activations, identity, identify-top-key-values, id-graph-canonical-id-size, id-graph-ids-to-canonical-idSetting up RT 2.0 parent segments, personalization services, and real-time journeys; monitoring activation and identity logs; and diagnosing ID stitching issues
sdk-skillsjavascript, pythonImporting browser events with the JavaScript SDK, and querying or uploading data from Python with pytd

Install skills automatically with tdx claude, tdx codex, or tdx pi, or install them into any project or global agent directory with tdx skill:

# Install bundled tdx skills for Claude Code, Codex, and Pi
tdx skill install --global --agent claude-code codex pi

In Claude Code, install the SQL, Workflow, Real-Time, and SDK plugins from treasure-data/td-skills with these slash commands:

/plugin marketplace add treasure-data/td-skills
/plugin install sql-skills@td-skills
/plugin install workflow-skills@td-skills
/plugin install realtime-skills@td-skills
/plugin install sdk-skills@td-skills

See the TD Skills Guide for the complete catalog.

2. MCP Servers

The Model Context Protocol (MCP) gives your agent live tools to search documentation, run CLI commands, and trigger Treasure AI Studio Actions at runtime.

MCP Server Transport & Endpoint What Your Agent Can Do
MCP Server (Docs)Streamable HTTP: https://docs.treasure.ai/mcpSearch live product documentation and inspect OpenAPI endpoint schemas (search, list-apis, get-endpoint-info)
Local MCP ServerLocal stdio: tdx mcpQuery databases, inspect schemas, validate and push segments or journeys, and run workflows (tdx_run, tdx_search)
Treasure AI Studio MCP EndpointStreamable HTTP: https://agent-gateway.<REGION>.treasure.ai/v1/mcp/<ENDPOINT_ID>List shared work folders, run saved Studio Actions, and start or continue Studio chats (list_work_folders, run_action, start_chat)

3. Machine-Readable Documentation (llms.txt and Markdown)

Every page on docs.treasure.ai is built for both human readers and AI agents:

  • Documentation Index (/llms.txt): Point any agent or web-fetching tool at https://docs.treasure.ai/llms.txt to discover all documentation pages and their summaries.
  • Markdown Page Export (.md): Append .md to any documentation URL (for example, https://docs.treasure.ai/products/headless/claude-code.md) or click Copy for LLM at the top of any page to copy clean Markdown directly into your prompt context.

Understanding Agent Concepts

Concept How It Works with Treasure AI
SkillsReusable Markdown instruction packages (SKILL.md) that load on demand when your prompt matches a task (such as writing a segment YAML or optimizing a Trino query). Maintained in treasure-data/td-skills and bundled inside @treasuredata/tdx
MCP (Model Context Protocol)An open standard that lets coding agents call external tools safely. Connect https://docs.treasure.ai/mcp for zero-setup documentation search, or connect tdx mcp to let the agent query your Treasure AI account
Pre-configured Launchers (tdx claude, tdx codex, tdx pi, tdx opencode)Commands built into the Treasure Code (tdx) CLI that launch your coding agent with Treasure AI's LLM proxy (billed to your Treasure AI Credits), authentication, MCP servers, and TD Skills pre-wired—or pass --no-proxy to use your own vendor subscription
Guardrails & Dry RunsAgents operating via tdx mcp inherit your tdx profile's permissions. High-impact commands (tdx sg push, tdx journey push, tdx wf run) support --dry-run and validate subcommands so you can review changes before applying them to production

Learn More