# tags

Connection tags are visual representations of the data available from connected blocks. They provide an easy way to reference outputs from previous blocks in your workflow.

## What Are Connection Tags?

Connection tags are interactive elements that appear when blocks are connected. They represent the data that can flow from one block to another and allow you to:

* Visualize available data from source blocks
* Reference specific data fields in destination blocks
* Create dynamic data flows between blocks

{% hint style="info" %}
Connection tags make it easy to see what data is available from previous blocks and use it in your current block without having to remember complex data structures.
{% endhint %}

## Using Connection Tags

There are two primary ways to use connection tags in your workflows:

{% columns %}
{% column %}

#### Drag and Drop

Click on a connection tag and drag it into input fields of destination blocks. A dropdown will appear showing available values.

1. Hover over a connection tag to see available data
2. Click and drag the tag to an input field
3. Select the specific data field from the dropdown
4. The reference is inserted automatically
   {% endcolumn %}

{% column %}

#### Angle Bracket Syntax

Type `<>` in input fields to see a dropdown of available connection values from previous blocks.

1. Click in any input field where you want to use connected data
2. Type `<>` to trigger the connection dropdown
3. Browse and select the data you want to reference
4. Continue typing or select from the dropdown to complete the reference
   {% endcolumn %}
   {% endcolumns %}

## Tag Syntax

Connection tags use a simple syntax to reference data:

```
<blockId.path.to.data>
```

Where:

* `blockId` is the identifier of the source block
* `path.to.data` is the path to the specific data field

For example:

* `<agent1.content>` - References the content field from a block with ID "agent1"
* `<api2.data.users[0].name>` - References the name of the first user in the users array from the data field of a block with ID "api2"

## Dynamic Tag References

Connection tags are evaluated at runtime, which means:

1. They always reference the most current data
2. They can be used in expressions and combined with static text
3. They can be nested within other data structures

### Examples

```javascript
// Reference in text
"The user's name is <userBlock.name>"

// Reference in JSON
{
  "userName": "<userBlock.name>",
  "orderTotal": <apiBlock.data.total>
}

// Reference in code
const greeting = "Hello, <userBlock.name>!";
const total = <apiBlock.data.total> * 1.1; // Add 10% tax
```

{% hint style="warning" %}
When using connection tags in numeric contexts, make sure the referenced data is actually a number to avoid type conversion issues.
{% endhint %}


---

# 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://whitepaper.aitech.io/agentforge/connections/tags.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.
