# Agents Overview

### Overview

HockeyStack Agents are AI-powered automations that transform natural language instructions into reliable, repeatable workflows. Instead of manually analyzing data or building complex integrations, you describe what you want in plain English—and the system handles the rest.

Users write a "contract" (natural language instructions), and HockeyStack's AI translates it into a structured, enterprise-grade automation that runs on schedule, on-demand, or in response to events.

***

### The Three Core Components

#### 1. Agent Contract (What You Write)

The contract is your plain English description of what the agent should do. Think of it as giving instructions to a new team member.

<mark style="color:$primary;">Example Contract:</mark>

<mark style="color:$primary;">For each company in my target account list:</mark>

1. <mark style="color:$primary;">Fetch their recent website activity and engagement data</mark>
2. <mark style="color:$primary;">Analyze their behavior and assign a score from 1–100</mark>
3. <mark style="color:$primary;">Generate a one-paragraph summary explaining the score</mark>
4. <mark style="color:$primary;">Save the score and summary to the company record</mark>

No coding required. The system validates your instructions and highlights any ambiguities before execution.

***

#### 2. AI Engine

Behind the scenes, HockeyStack converts your contract into a Domain-Specific Language (DSL) — a structured, machine-readable format designed specifically for go-to-market automation.

Why this matters:

* Reliability — Workflows execute predictably
* Transparency — Every step can be audited and debugged
* Scalability — Process thousands of records without manual effort

The DSL supports four step types:

<table data-header-hidden><thead><tr><th width="161.69921875"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Step Type</strong></td><td><strong>Purpose</strong></td><td><strong>Example</strong></td></tr><tr><td>inject</td><td>Add data or constants to the workflow</td><td>Load your target account list</td></tr><tr><td>for_each</td><td>Loop through records</td><td>Process each company in a segment</td></tr><tr><td>if/else</td><td>Make conditional decisions</td><td>If score > 80, mark as high priority</td></tr><tr><td>agent</td><td>Run AI with tools and structured output</td><td>Analyze engagement and generate insights</td></tr></tbody></table>

***

#### 3. Nex-LM

Agents then turn user-generated, natural language Contracts into a multi-agent system to execute.&#x20;

Nex-LM is an AI model purpose-built for GTM workflows, understanding buyer journeys, buying committees, attribution, scoring, deal stages, and more.

It turns Agent Contracts into multi-step agent outcomes.&#x20;

***

### Built-In Intelligence

#### AI-Powered Agent Steps

Each agent step can:

* Receive data from previous workflow steps
* Autonomously call tools to query HockeyStack data
* Return structured output that fits a defined schema

Example:

An agent analyzing a company may fetch visits, evaluate trends, pull associated deals, and then return a scored recommendation.

#### Example Tools Agents Use

Each agent can use a variety of tools depending on the Agent Contract, including fetching record details, metadata, records, analyzing patterns and buyer journeys, sending data to destinations and more.&#x20;

***

### Enterprise-Grade Execution

#### Durable Workflows

HockeyStack ensures:

* No lost work — workflows resume after failures
* Long-running support — multi-hour jobs supported
* Deduplication — prevents accidental double runs
* Full audit trails — every execution logged

#### Flexible Triggers

| **Trigger Type** | **Use Case**                  |
| ---------------- | ----------------------------- |
| Scheduled        | Daily scoring, weekly digests |
| Manual           | One-off analysis or action    |

***

### Structured, Trustworthy Output

Chat AI output:   "The score is probably around 75 or so…"

Agent output:     { score: 75,

&#x20;                   reasoning: "High engagement...",

&#x20;                   nextSteps: \["Schedule demo"] }

This makes the output safe and compatible for CRMs, automation, and downstream tools.

### Interfaces

Each agent can use chat, slack, and email as interfaces. Agents that are built for next best steps or tasks can use Rep Cockpit as their interface.&#x20;

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hockeystack.com/revenue-agents/hockeystack-revenue-agents/agents-overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
