Search

Assistants

Assistants

An assistant is a core part of the Kodexa platform, designed to be easy to create and offer a way to add functionality to the core platform to suit a wide range of business use cases.

image

What is Event Processing in an Assistant?

An assistant is a collection of event handlers that are triggered when certain events occur in the Kodexa platform. For example, when a document is created, updated, or deleted, the assistant can be triggered to perform specific actions on the document.

Custom Events

Custom events can also be triggered by the assistant, which can be used for testing, training, etc. When a use case requires processing to occur at certain times, the assistant can be triggered based on a schedule to perform the processing.

image

Working with Assistants in Python

Assistants are based on an Assistant Definition, and you create an instance of the assistant on a specific project. Here's how you can work with assistants using the Kodexa Python client:

  1. First, connect to the Kodexa platform:
from kodexa.platform import KodexaClient

client = KodexaClient()
  1. Find your organization and list its projects:
philips_organization = client.organizations.find_by_slug('philips-world')
projects = philips_organization.projects.list().to_df()
print(projects)
  1. Find a specific project by name:
my_project = philips_organization.projects.find_by_name('Dae Similar Formats')
  1. List assistants in the project:
assistants = my_project.assistants.list()
print(assistants[0].name)  # Output: 'Pipeline Assistant'

This code demonstrates how to interact with assistants programmatically, allowing you to integrate assistant functionality into your Kodexa workflows.

Assistants play a crucial role in handling events and triggering appropriate actions within your Kodexa projects, enabling you to automate processes and respond to changes in your data effectively.

← Previous

Projects