Fency.ai

Events

Event objects notify you when memories or agent tasks change.

Events are our way of letting you know when something interesting happens in your account. When an interesting event occurs, we create a new event object. For example, when a memory is created, we create an event of type memory.created, and when a memory is updated, we create an event of type memory.updated.

Events contain different data fields depending on its type. For example, a memory.updated event contains the given entity object (the memory object) that was updated.

We have a separate webhooks system for sending the Event objects directly to an endpoint on your server. You can manage webhooks in your account dashboard.

We only guarantee access to the events through the API and dashboard for 30 days.

The event object

AttributeTypeDescription
idstringThe unique identifier of the event.
typestringThe type of the event.
createdAtstringThe timestamp the event was created.
entityobjectThe object the event is about. Its shape depends on type: a memory object for memory.* events, an agent task object for agent.task.* events.

Event types

memory.created

Event published when a new memory is created. The entity attribute is the memory that was created.

{
    "id": "evt_123e4567e89b12d3a456426614174000",
    "type": "memory.created",
    "createdAt": "2023-10-01T12:00:00Z",
    "entity": {
        "id": "mem_cf4fe6caa10b4009a8b103d2d5d64042",
        "createdAt": "2024-04-08T17:02:27.887295Z",
        "updatedAt": "2024-04-08T17:02:27.887295Z",
        "sourceType": "TEXT",
        "typeId": "mty_cf4fe6caa10b4009a8b103d2d5d64042",
        "title": "Example Title",
        "content": "This is the full content of the secret memory.",
        "contentParts": 1,
        "contentStatus": "SYNCHRONIZED",
        "metadata": {
            "organization_id": "org_1234567890",
            "allowed_roles": [
                "Admin",
                "Member"
            ],
            "size": 1337,
            "is_available": true,
            "mean_score": 3.14
        },
        "customerId": "cus_examplecustomerid000000000000"
    }
}

memory.updated

Event published when a memory is updated. The entity attribute is the memory that was updated.

{
    "id": "evt_123e4567e89b12d3a456426614174000",
    "type": "memory.updated",
    "createdAt": "2023-10-01T12:00:00Z",
    "entity": {
        "id": "mem_cf4fe6caa10b4009a8b103d2d5d64042",
        "createdAt": "2024-04-08T17:02:27.887295Z",
        "updatedAt": "2024-04-08T17:02:27.887295Z",
        "sourceType": "TEXT",
        "typeId": "mty_cf4fe6caa10b4009a8b103d2d5d64042",
        "title": "Example Title",
        "content": "This is the full content of the secret memory.",
        "contentParts": 1,
        "contentStatus": "SYNCHRONIZED",
        "metadata": {
            "organization_id": "org_1234567890",
            "allowed_roles": [
                "Admin",
                "Member"
            ],
            "size": 1337,
            "is_available": true,
            "mean_score": 3.14
        },
        "customerId": "cus_examplecustomerid000000000000"
    }
}

memory.deleted

Event published when a memory is deleted. The entity attribute is the memory that was deleted.

{
    "id": "evt_123e4567e89b12d3a456426614174000",
    "type": "memory.deleted",
    "createdAt": "2023-10-01T12:00:00Z",
    "entity": {
        "id": "mem_cf4fe6caa10b4009a8b103d2d5d64042",
        "createdAt": "2024-04-08T17:02:27.887295Z",
        "updatedAt": "2024-04-08T17:02:27.887295Z",
        "sourceType": "TEXT",
        "typeId": "mty_cf4fe6caa10b4009a8b103d2d5d64042",
        "title": "Example Title",
        "content": "This is the full content of the secret memory.",
        "contentParts": 1,
        "contentStatus": "SYNCHRONIZED",
        "metadata": {
            "organization_id": "org_1234567890",
            "allowed_roles": [
                "Admin",
                "Member"
            ],
            "size": 1337,
            "is_available": true,
            "mean_score": 3.14
        },
        "customerId": "cus_examplecustomerid000000000000"
    }
}

agent.task.created

Event published when a new agent task is created (or first observed for delivery). The entity attribute is the agent task that was created.

{
    "id": "evt_123e4567e89b12d3a456426614174000",
    "type": "agent.task.created",
    "createdAt": "2023-10-01T12:00:00Z",
    "entity": {
        "id": "ata_cf4fe6caa10b4009a8b103d2d5d64042",
        "createdAt": "2023-10-01T12:00:00Z",
        "updatedAt": "2023-10-01T12:00:00Z",
        "status": "SUCCEEDED",
        "taskType": "MEMORY_CHAT",
        "succeededAt": "2023-10-01T12:00:00Z",
        "successResponse": {},
        "failedAt": "2023-10-01T12:00:00Z",
        "failureResponse": {
            "message": "Task failed: upstream timeout"
        },
        "metadata": {
            "organization_id": "org_1234567890",
            "allowed_roles": [
                "Admin",
                "Member"
            ],
            "size": 1337,
            "is_available": true,
            "mean_score": 3.14
        },
        "conversationId": "cnv_cf4fe6caa10b4009a8b103d2d5d64042",
        "manualActionResults": [
            {
                "actionCallId": "aca_cf4fe6caa10b4009a8b103d2d5d64042",
                "status": "APPROVED",
                "name": "createIncident",
                "input": {},
                "reason": "User approved.",
                "recordedAt": "2023-10-01T12:05:00Z"
            }
        ]
    }
}

agent.task.updated

Event published when an agent task is updated (for example status or result changes). The entity attribute is the agent task that was updated.

{
    "id": "evt_123e4567e89b12d3a456426614174000",
    "type": "agent.task.updated",
    "createdAt": "2023-10-01T12:00:00Z",
    "entity": {
        "id": "ata_cf4fe6caa10b4009a8b103d2d5d64042",
        "createdAt": "2023-10-01T12:00:00Z",
        "updatedAt": "2023-10-01T12:00:00Z",
        "status": "SUCCEEDED",
        "taskType": "MEMORY_CHAT",
        "succeededAt": "2023-10-01T12:00:00Z",
        "successResponse": {},
        "failedAt": "2023-10-01T12:00:00Z",
        "failureResponse": {
            "message": "Task failed: upstream timeout"
        },
        "metadata": {
            "organization_id": "org_1234567890",
            "allowed_roles": [
                "Admin",
                "Member"
            ],
            "size": 1337,
            "is_available": true,
            "mean_score": 3.14
        },
        "conversationId": "cnv_cf4fe6caa10b4009a8b103d2d5d64042",
        "manualActionResults": [
            {
                "actionCallId": "aca_cf4fe6caa10b4009a8b103d2d5d64042",
                "status": "APPROVED",
                "name": "createIncident",
                "input": {},
                "reason": "User approved.",
                "recordedAt": "2023-10-01T12:05:00Z"
            }
        ]
    }
}

On this page