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

# Applications

> How to organize and manage your automations in CogniAgent

Applications are the top-level containers in CogniAgent. Think of them as project folders that hold everything related to a specific automation or set of related automations.

## What's Inside an Application

Each application contains:

| Component             | Purpose                                                    |
| --------------------- | ---------------------------------------------------------- |
| **Workflows**         | The automation logic — triggers, actions, and control flow |
| **Variables**         | Data that persists across workflow executions              |
| **Integrations**      | Connections to external services used by this application  |
| **Execution History** | Logs of every workflow run                                 |
| **Settings**          | Configuration options for the application                  |

## When to Create a New Application

Create separate applications when automations are logically distinct:

<AccordionGroup>
  <Accordion title="Good: Separate applications" icon="check">
    * **Customer Support** — Ticket routing, auto-responses, escalation
    * **Order Management** — Order confirmation, shipping updates, returns
    * **Marketing** — Lead capture, email sequences, campaign tracking

    These serve different purposes and involve different teams.
  </Accordion>

  <Accordion title="Good: Single application" icon="check">
    * Order confirmation email
    * Shipping notification
    * Delivery confirmation
    * Review request

    These are all part of the same customer journey and share data.
  </Accordion>
</AccordionGroup>

## Creating an Application

<Steps>
  <Step title="Open the dashboard">
    Log in to CogniAgent and go to the main dashboard.
  </Step>

  <Step title="Click Create Application">
    Find the "Create Application" button in the top right.
  </Step>

  <Step title="Name your application">
    Choose a descriptive name that reflects what the automation does.

    **Good names:**

    * "Customer Support Automation"
    * "E-commerce Order Flow"
    * "Lead Qualification"

    **Avoid:**

    * "Test"
    * "New Application"
    * "Untitled"
  </Step>

  <Step title="Add a description (optional)">
    Describe what this application does. Helpful when you have many applications.
  </Step>
</Steps>

## Application Variables

Variables store data that workflows can read and write. Two types:

### Runtime Variables

Exist only during a single workflow execution. Use these for temporary data.

**Example:** Store the result of an AI classification to use in a condition node later in the same workflow.

### Application Variables

Persist across executions. Use these for data that needs to survive between runs.

**Example:** Track how many support tickets were processed today, or store the last sync timestamp for an integration.

### Setting Variables

You can set variables in two ways:

1. **Update Variable node** — Set a value during workflow execution
2. **Application settings** — Set initial values or defaults

### Referencing Variables

Use the syntax `{{variable_name}}` to reference variables in node configurations.

```
Hello {{customer_name}}, your order {{order_id}} has shipped.
```

## Managing Applications

### Viewing Execution History

Every workflow run is logged. The execution history shows:

* **Status** — Completed, Failed, Running, or Waiting
* **Start time** — When the execution began
* **Duration** — How long it took
* **Trigger** — What started the workflow
* **Node details** — What each node did, including inputs and outputs

<Tip>
  Use execution history to debug issues. Click on any execution to see exactly what happened at each step.
</Tip>

### Application States

Applications can be:

| State      | Meaning                                      |
| ---------- | -------------------------------------------- |
| **Active** | Workflows run when triggered                 |
| **Paused** | Triggers are disabled, workflows won't start |
| **Draft**  | Still being built, not ready for production  |

### Duplicating Applications

Need a similar automation? Duplicate an existing application instead of starting from scratch. All workflows, variables, and settings are copied.

### Deleting Applications

<Warning>
  Deleting an application removes all workflows, variables, and execution history permanently. This cannot be undone.
</Warning>

## Best Practices

### Naming Conventions

Use consistent naming across your applications:

* **Applications** — Describe the business function (e.g., "Invoice Processing")
* **Workflows** — Describe the specific automation (e.g., "Process New Invoice")
* **Variables** — Use clear, descriptive names (e.g., `last_sync_timestamp` not `lst`)

### Keep Applications Focused

Each application should do one thing well. If an application is getting too complex:

* Split it into multiple applications
* Use the "Call AI Agent" action to coordinate between them

### Document Your Automations

Add descriptions to:

* Applications — What business problem does this solve?
* Workflows — What triggers this and what does it do?
* Complex nodes — Why is this configured this way?

Future you (or your teammates) will appreciate it.

## Next Steps

<CardGroup cols={2}>
  <Card title="Define Your Workflow" icon="diagram-project" href="/applications/define-workflow">
    Learn how to build workflows inside applications
  </Card>

  <Card title="Create Your First Application" icon="rocket" href="/applications/create-application">
    Step-by-step guide to getting started
  </Card>
</CardGroup>
