Tutorial: GTM Ops Agent
This tutorial builds a simple GTM operations agent in Studio. The same pattern applies to customer support, compliance, finance ops, incident response, and other workflows where an agent needs to read tools, explain what happened, and leave an operator trail.
Goal
Build an agent that can:
- Read campaign, CRM, or POS-style API data through connections
- Use skills and knowledge to answer domain questions consistently
- Store structured findings
- Render a small dashboard page
- Run evals before promotion
- Leave sessions, logs, activity, and cost data for operators
1. Start from Studio
Create an agent in Studio and connect it to a GitHub repo. You can start from a template or an empty repo.
The repo is the source of truth. Studio gives you the product workflow around that source: source browsing, editing, diffs, commit/deploy, deploy history, settings, logs, sessions, and evals.
2. Add a Connection
Add a connection for the system the agent should query. For example:
connections/pos/
spec.json
access.json
surface.md
entities.md
rules.mdspec.json is the machine-readable API contract. surface.md, entities.md, and rules.md are the model-readable operating manual: what the API does, what the entities mean, and when the agent should or should not use endpoints.
3. Add Skills and Knowledge
Skills teach the agent how to work:
skills/campaign-diagnosis.md
skills/store-performance-review.mdKnowledge teaches the agent your domain:
knowledge/store-regions.md
knowledge/campaign-naming.md
knowledge/escalation-policy.mdTogether, these make the agent behave like a trained operator rather than a generic chatbot.
4. Add a Store
Stores persist structured data the agent can query later:
stores/campaign-findings.jsonUse stores for findings, summaries, classifications, mappings, and other structured records. Keep narrative operating context in knowledge/.
5. Add a Page
Pages are React views backed by agent data:
pages/gtm-dashboard.tsxA page can show campaign performance, store outliers, recent agent findings, eval status, or anything else the team needs to scan before chatting with the agent.
6. Deploy and Promote
Commit the source changes from Studio and deploy them. The deploy is a materialized runtime for a specific commit.
Promote only after the deploy looks good. Promotion points the production URL at that deploy. Rolling back is promoting a previous known-good deploy.
7. Run Evals
Add evals for critical questions:
evals/campaign-drop.md
evals/store-outlier.md
evals/refund-spike.mdRun the suite in Studio before promotion. Use Arena when you want to compare model behavior.
8. Operate the Agent
Once the agent is live, use Studio to answer operational questions:
- Sessions — What did the agent say? Which tools did it call?
- Logs — Did a connection fail? Did a tool time out?
- Activity — Who changed source, settings, deploys, or secrets?
- Cost — Which scopes, models, or sessions cost the most?
- Deploys — Which commit is production running?
The goal is not just a chat box. The goal is an operational workspace where the team can inspect, trust, and improve the agent.