# Agents & Actions

> Build AI agents with custom personas, attach reusable actions, connect knowledge bases, and deploy across phone, email, and chat.

Source: https://docs.graph8.com/ai-features/skills/

Agents are AI-powered assistants you build and deploy. Each agent has a persona, knowledge base, and set of actions it can perform. Deploy agents on phone calls, email responses, web chat, or internal workflows.

## Agent Types

| Type | What It Is | Use Case |
|------|-----------|----------|
| **Agent** | AI assistant with custom persona and capabilities | Customer-facing calls, email handling, chat support |
| **Twin** | Agent cloned from a real person's LinkedIn profile and writing style | Outbound outreach that sounds like a specific team member |

## Creating an Agent

1. Go to **Agents → Create Agent**
2. Configure the agent:
   - **Name** - display name for the agent
   - **Role** - what the agent does (SDR, support, researcher, etc.)
   - **Persona** - personality settings:
     - **Formality** - casual to formal tone
     - **Conciseness** - detailed to direct responses
     - **Assertiveness** - gentle to assertive approach
   - **Instructions** - custom behavior guidelines
3. Set up identity:
   - **Phone number** - assign a number for calls
   - **Voice** - choose from preset voices or clone a voice
   - **Calendar** - connect for meeting scheduling
4. Attach actions and knowledge collections
5. Click **Save**

### Creating a Twin

Twins replicate a real person's communication style:

1. Click **Create Twin**
2. Enter the person's LinkedIn URL
3. graph8 extracts their profile, writing style, and background
4. Upload additional writing samples (emails, posts) for better style matching
5. The twin generates outreach that sounds like that person

## Actions

Actions are the capabilities you give your agents. Each action defines one thing an agent can do.

### Action Types

| Type | How It Runs | Example |
|------|------------|---------|
| **LLM** | AI generates a response using a prompt template | Research a company, draft an email, score a lead |
| **API** | Calls an external API endpoint | Look up data in your CRM, check inventory, send a notification |
| **Script** | Runs custom code | Transform data, calculate scores, format output |
| **Workflow** | Executes a multi-step workflow (see below) | Lead qualification pipeline, content distribution |

### Built-In Action Templates

graph8 includes 15+ pre-built action templates:

- **Company Research** - deep dive on a target company
- **Contact Dossier** - compile everything known about a person
- **Competitor Analysis** - analyze competitive positioning
- **Keywords Research** - discover relevant keywords
- **FAQ Generation** - create FAQ from knowledge base
- **Content creation** - generate social posts, emails, summaries

Attach actions to agents so they can use them during conversations and workflows.

### Approval Gates

Actions can require human approval before executing. Enable **Requires Approval** on any action, and the agent pauses to ask for confirmation before running it. Approve or reject from the execution history.

### Action Execution Input

When you run an action manually (or test one before attaching it to an agent), the **Action Execution Input** dialog walks you field-by-field through the action's expected inputs. Required fields are marked, and the dialog inlines hints from the action's input schema so you can see what each variable expects before you submit.

The same dialog is reused inside agent chat — when an agent kicks off an action that needs input, the prompt to the user uses this consistent form.

## Workflows

Workflows chain multiple actions into automated multi-step processes using a visual builder.

### Building a Workflow

1. Go to **Agents → Workflows**
2. Click **Create Workflow** or start from a template
3. Build your workflow using three modes:
   - **Visual** - drag-and-drop node canvas (ReactFlow)
   - **Simple** - linear step-by-step list
   - **Code** - JSON editor for advanced configuration
4. Connect nodes to define the flow
5. Test with sample data
6. Save and attach to an agent

### Node Types

| Node | What It Does |
|------|-------------|
| **Start** | Entry point - defines trigger and input data |
| **Action** | Executes an LLM, API, or script action |
| **Agent** | Hands off to another agent |
| **Tool** | Calls an MCP server tool |
| **Condition** | Branches based on data conditions |
| **Loop** | Repeats over a list of items |
| **Transform** | Transforms data between steps |
| **State** | Stores intermediate state |
| **Human** | Pauses for human approval |
| **Handoff** | Transfers to a human or another system |
| **End** | Completes the workflow |

### Workflow Templates

Start from pre-built templates:

- **Lead Qualification** - score and route incoming leads
- **Content to Social Media** - repurpose content across platforms
- Custom templates you save from your own workflows

## Knowledge Collections

Knowledge collections give your agents access to your company's documents and data.

1. Go to **Agents → Collections**
2. Create a collection (e.g., "Product Docs", "Case Studies")
3. Upload files - PDFs, documents, spreadsheets
4. Organize with folders
5. Attach collections to agents

Agents search their attached collections when answering questions, ensuring responses are grounded in your actual content.

## MCP Servers

Connect external tool servers using the Model Context Protocol (MCP):

1. Go to **Agents → MCP Servers**
2. Click **Create Server**
3. Configure connection:
   - **SSE** - connect to a remote server via URL
   - **Stdio** - connect to a local process
4. Test the connection
5. graph8 caches available tools for offline reference

MCP tools appear as **Tool nodes** in the workflow builder and are available to agents during conversations.

## Agent Chat

Test and interact with agents in real time:

1. Open an agent's detail page
2. Click the **Chat** tab
3. Type a message - the agent responds using its persona, actions, and knowledge
4. Watch tool executions in the side panel as the agent works

Chat sessions are saved with full history and can be resumed later.

## Agent Analytics

Track agent performance:

- **Call analytics** - inbound call results, duration, outcomes
- **Activity feed** - chronological log of all agent actions
- **Execution history** - action-by-action results with inputs and outputs

> **Tip:**
> Start with a focused agent that does one thing well (e.g., "Meeting Scheduler" or "Lead Qualifier"). Add capabilities gradually as you refine its persona and knowledge base. Use the approval gate on high-stakes actions until you trust the agent's judgment.

## Related

- [Voice Agents →](https://docs.graph8.com/ai-features/voice-agents/) - Phone-specific agent deployment
- [Workflows →](https://docs.graph8.com/ai-features/workflows/) - Detailed workflow builder guide
- [Web Chat →](https://docs.graph8.com/engage/web-chat/) - Deploy agents on your website
- [Copilot →](https://docs.graph8.com/ai-features/copilot/) - Built-in AI assistant
