> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent

> Build an AI chat agent that interacts on Slack

Build an AI chat agent that interacts on Slack. Typically used with the `slack_on_new_message` trigger to pass the incoming message to the agent, then `slack_send_channel_message` to post the reply. The agent exposes a **tools** source handle located beneath the node, connect tool-capable nodes to this handle and place them directly **below** the agent (not downstream in the main flow). Not all nodes can be tools; check each node’s `ai_tools` property to confirm availability.

|                     |                   |
| ------------------- | ----------------- |
| **App**             | AI                |
| **Operation ID**    | `ai_agent`        |
| **Type**            | Action            |
| **Connection**      | None              |
| **Credits per run** | 2                 |
| **Versions**        | 1, 2 (default: 2) |

## Inputs

| Field                     | Type                       | Required | Default                                            | Description                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------- | -------------------------- | -------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `instructions`            | string                     | No       | `You are a helpful agent, your name is Markifact.` | Instructions for the AI agent that define its role, behavior, and capabilities. This sets the personality and core directives for the agent.                                                                                                                                                                                                                                                                                          |
| `prompt`                  | string                     | Yes      | -                                                  | The message or question to send to the AI agent. This is a multi-line text area where you can: - Write multiple lines of text - Reference dynamic data from other nodes using \{\{nodeId\_\_data}} syntax - Combine multiple node references in the same prompt - Use line breaks to structure your message Example: "Analyze this Google Ads data: \{\{googleAdsNodeId\_\_data}} And this Meta Ads data: \{\{metaAdsNodeId\_\_data}} |
| `model`                   | string or SelectableOption | Yes      | -                                                  | The AI model to use for processing. Some available options: 'gpt-5.4' - Latest openai model with advanced capabilities 'gemini-3-pro-preview' - Google's most powerful model 'gemini-3-flash-preview' - Fast, efficient Gemini 3 variant 'claude-opus-4.5' - Anthropic's top-tier model Note: Some models require Advanced tier subscription.                                                                                         |
| `reasoning`               | string or SelectableOption | No       | -                                                  | Control how much reasoning effort supported OpenAI, Anthropic, and Google models apply. Options: 'low' - Basic reasoning 'medium' - Balanced reasoning (default) 'high' - Deep, thorough reasoning Only applicable to models configured with reasoning support.                                                                                                                                                                       |
| `tools`                   | array of object            | No       | -                                                  | External tools and APIs that the AI agent can call to perform actions. This is mainly the output from upstream workflow nodes that provide tool definitions. The agent will automatically decide when and how to use these tools based on the conversation context.                                                                                                                                                                   |
| `schema_fields`           | array of SchemaField       | No       | -                                                  | Define the structure for structured data output when you want the agent to return data in a specific format (like a table).  Each schema field should specify the variable name, data type, and description to guide the AI in formatting its response. Use this when you need the AI to return data in a consistent, structured format that can be used by downstream nodes like Google Sheets, Slides, etc.                         |
| `enable_code_interpreter` | boolean                    | No       | `True`                                             | Enable the agent to execute Python code for data analysis, calculations, and generating charts & visualizations. When enabled, the agent can write and run code to solve complex problems.                                                                                                                                                                                                                                            |
| `conversation_id`         | string                     | No       | -                                                  | Unique identifier to group related messages and maintain conversation context across multiple interactions.  Use the same ID to give your AI agent memory of previous exchanges.  You can reference conversation IDs from other nodes like Slack, email, using \{\{nodeId\_\_data.conversation\_id}} syntax.                                                                                                                          |

### SchemaField

| Field         | Type   | Required | Default | Description                                                                   |
| ------------- | ------ | -------- | ------- | ----------------------------------------------------------------------------- |
| `name`        | string | Yes      | -       | The name of the field.                                                        |
| `type`        | string | Yes      | -       | Data type of the field, available types: text, number, boolean, object, list. |
| `description` | string | Yes      | -       | Description of the field.                                                     |

### SelectableOption

| Field   | Type   | Required | Default | Description |
| ------- | ------ | -------- | ------- | ----------- |
| `value` | string | Yes      | -       |             |
| `label` | string | Yes      | -       |             |

## Output

**Type**: `str | Dict`

Returns markdown text. If schema\_fields provided, returns structured data matching the schema.

**Fields**: dynamic (depend on the inputs)

**Example**:

```json theme={"dark"}
[
  {
    "name": "John",
    "score": 85
  }
]
```
