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

# Connectors

> Feed external events into AMFS — PagerDuty, GitHub, Slack, Jira, and custom webhooks.

Connectors let AMFS ingest events from external systems and turn them into structured memory entries that agents can query and learn from.

## How It Works

1. Enable a connector in **Dashboard → Connectors**
2. Copy your webhook URL
3. Paste it into the external system's webhook settings
4. Events flow in automatically — agents see them via `search()` and `briefing()`

Every event is validated, deduplicated, and transformed into versioned memory entries with proper entity paths and confidence scores.

***

## Available Connectors

### PagerDuty

Ingests incident lifecycle events: triggered, acknowledged, resolved.

**What it captures:**

* Incident title, severity, and status
* Assigned responders
* Service and escalation policy
* Resolution notes

**Entity path:** `incidents/pagerduty/{service_name}`

**Setup:**

1. In AMFS Dashboard → Connectors, enable **PagerDuty**
2. Copy the webhook URL
3. In PagerDuty → Integrations → Generic Webhooks (v3), add the URL

***

### GitHub

Ingests pull request events, deployment statuses, and issue updates.

**What it captures:**

* PR opened/merged/closed events with diff stats
* Deployment success/failure with environment info
* Issue state changes and label updates

**Entity path:** `repos/{owner}/{repo}`

**Setup:**

1. In AMFS Dashboard → Connectors, enable **GitHub**
2. Copy the webhook URL and signing secret
3. In your GitHub repo → Settings → Webhooks, add the URL with the secret

***

### Slack

Ingests channel messages and thread context relevant to incidents or decisions.

**What it captures:**

* Messages from monitored channels
* Thread context around incident discussions
* Bot interaction logs

**Entity path:** `comms/slack/{channel}`

**Setup:**

1. In AMFS Dashboard → Connectors, enable **Slack**
2. Copy the webhook URL
3. In your Slack app → Event Subscriptions, add the URL

***

### Jira

Ingests issue transitions, sprint events, and release notes.

**What it captures:**

* Issue status transitions (e.g., In Progress → Done)
* Sprint start/complete events
* Release creation and deployment tracking

**Entity path:** `projects/jira/{project_key}`

**Setup:**

1. In AMFS Dashboard → Connectors, enable **Jira**
2. Copy the webhook URL
3. In Jira → System → Webhooks, add the URL

***

## Direct Event Ingestion

For any system that doesn't have a built-in connector, push events directly via the REST API:

```bash theme={null}
curl -X POST https://amfs-login.sense-lab.ai/api/v1/events \
  -H "Content-Type: application/json" \
  -H "X-AMFS-API-Key: <your-api-key>" \
  -d '{
    "source": "monitoring",
    "entity_path": "myapp/checkout",
    "key": "high-cpu-alert",
    "value": {"host": "prod-3", "cpu_percent": 95},
    "event_type": "alert.triggered"
  }'
```

Events are stored as shared memory entries with `agent_id="external/{source}"`, visible to all agents and automatically included in Cortex digest compilation.

Use this for:

* Monitoring alerts (Datadog, Grafana, custom)
* CI/CD pipelines reporting deployment status
* Cron jobs pushing periodic metrics
* Any system with an outgoing webhook

***

## Webhook Authentication

All webhook endpoints require your API key. Include it as a header when configuring webhooks in external systems:

```
URL:    https://amfs-login.sense-lab.ai/api/v1/webhooks/pagerduty
Header: X-AMFS-API-Key: <your-api-key>
```

AMFS also validates the source system's signature (e.g., PagerDuty's `X-PagerDuty-Signature`, GitHub's `X-Hub-Signature-256`) using the signing secret configured in Dashboard → Connectors.

***

## Verifying Events

After configuring a webhook, trigger a test event from the external system and check that it arrived:

```bash theme={null}
curl "https://amfs-login.sense-lab.ai/api/v1/entries?entity_path=incidents/pagerduty" \
  -H "X-AMFS-API-Key: <your-api-key>"
```

Or check the Dashboard → Memory Explorer to see incoming entries in real-time.
