Skip to content

AcademIA AI Tasks

AcademIA AI Tasks uses the AI content generators that come with AcademIA: quizzes, lessons, flashcards, games such as crosswords or escape rooms, or a path’s syllabus from a document. The work is done by AcademIA’s own AI, not by your flow’s model, and the result stays in AcademIA, next to the course.

Each generation is a task that AcademIA does in the background. With this component you start it, check how it is going and collect its result, or cancel it.

When to use it

  • A teacher asks an assistant for a practice quiz for a module of their course.
  • You want to generate review games for the modules of a course from an automation.
  • You have a document uploaded to AcademIA and want it to suggest a path’s syllabus.
  • A task is no longer needed and you want to cancel it.

Configuration

You need an AcademIA credential with two details: AcademIA API address, the AcademIA API address (for example https://academia.nappai.es/api), and API key, an AcademIA API key (it starts with nappai_int_sk_live_). NappAI doesn’t ask for the email or password of any AcademIA account. See Credentials.

An AcademIA administrator creates the key with New key:

  • A Super admin, in Platform › API keys. In Acts as, choose the role the key works with (and its organisation or faculty, if the role needs one). For the voice evaluator and the course mentor, also tick Voice and mentor sessions.
  • A Corporate admin, in Advanced › API keys. That key acts as their company’s administrator and only sees their organisation.

AcademIA shows the key only once: copy it when you create it and paste it into API key. If someone revokes it in AcademIA, the flow stops getting in straight away and you need to create another one.

The credential’s key must be able to edit the content, so it must act as Content admin (CONTENT_ADMIN), Faculty admin (FACULTY_ADMIN) or Super admin (SUPER_ADMIN).

FieldWhat it does
Credential (required)The AcademIA credential. It fills in AcademIA API address and AcademIA API key for you.
ResourceAlways AI Tasks.
OperationCreate AI Task, Get AI Task or Cancel AI Task. See Resources and operations.

Resources and operations

AI Tasks

OperationWhat it doesFields
Create AI TaskStarts an AI generator on a module, a path or a lesson. It can wait for the result.Task type, Label, Content ID. Optional: Applies to, Options (JSON), Wait until done and Max wait (s).
Get AI TaskReturns a task’s status and result. It can wait for it to finish.Task ID. Optional: Wait until done and Max wait (s).
Cancel AI TaskMarks a pending or running task as cancelled.Task ID

The fields of Create AI Task:

  • Task type is what AcademIA generates. Among others: QUIZ_GENERATION (quiz), LESSON_GENERATION (lesson), LESSON_FROM_DOCUMENT (lesson from a document), PATH_CURRICULUM_GENERATION (a path’s syllabus from a document), FLASHCARDS_GENERATION (flashcards) and games such as TRIVIA_GENERATION, CROSSWORD_GENERATION, HANGMAN_GENERATION, WORD_PUZZLE_GENERATION, MEMORY_MATCH_GENERATION, MATCHING_PAIRS_GENERATION, DRAG_AND_DROP_GENERATION, TIMELINE_CHALLENGE_GENERATION, SPEED_QUIZ_GENERATION, SCENARIO_CHALLENGE_GENERATION, ESCAPE_ROOM_GENERATION or ADVENTURE_GENERATION. The full list is in the dropdown.
  • Label is the text the task shows in AcademIA.
  • Applies to is the kind of content it works on: module (default), path or lesson. Content ID is its ID.
  • Options (JSON) are the generator’s settings, for example {"generationParams": {"quantity": 10, "language": "es"}}. The content’s ID is added on its own.
  • Wait until done: on, the component waits for the task to finish and returns its result. Max wait (s), in the advanced settings, is how long it waits at most: 300 seconds by default.

Task ID is the ID Create AI Task returns in its id value.

Output

The Data output returns the task with:

  • id: its ID.
  • status: PENDING, RUNNING, COMPLETED, FAILED or CANCELLED.
  • progressPct: the progress percentage.
  • resultPayload: the result, once it has finished.

If the wait ends before the task finishes, the result says so: read it again later with Get AI Task.

The component supports Batch Mode and it can be connected to an Agent as a tool. See Tools.

Example

An academy wants its teachers to ask for practice quizzes from a chat.

  1. Build a chat with Chat Input, an Agent and Chat Output.
  2. Add AcademIA AI Tasks with the Create AI Task operation and connect its Tool output to the agent’s Tools input.
  3. Fix Task type to QUIZ_GENERATION and Applies to to module, and let the agent fill in Label and Content ID. Turn off Wait until done.
  4. In the agent’s instructions, explain that it must create the task with the module the teacher mentions and tell them the quiz will appear in AcademIA when it’s ready.

Good practices

  • In a chat, don’t wait for the result: create the task without waiting and read it later with Get AI Task.
  • If you want to write the content with your flow’s model instead of AcademIA’s AI, generate the syllabus with a model and save it with AcademIA Content, Import Curriculum operation.
  • The syllabus PATH_CURRICULUM_GENERATION produces is saved in the path with AcademIA Content, Import Curriculum operation: pass its modules in Modules (JSON) and the task’s ID in AI task ID.

Security and limitations

  • Cancelling a task only changes its status: if the generation had already started, it may finish anyway.
  • Tasks don’t survive a restart of AcademIA: if AcademIA restarts while a task is running, it is lost.
  • PATH_CURRICULUM_GENERATION needs a document uploaded to AcademIA beforehand. Its ID (uploadId) goes in Options (JSON) and is only valid for one hour.