> For the complete documentation index, see [llms.txt](https://docs.younium.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.younium.com/agents/agents.md).

# Agents

## Overview

Younium Agents is an AI-powered operations workspace that applies AI to work a team would otherwise do by hand. The **Account Validation Agent** inspects your Younium data on a schedule and surfaces what needs attention as a queue of findings, checking account and invoicing setup against a set of validation rules and proposing the missing values back to Younium. The **Contract Import Agent** works the other way round, reading a contract, quote or invoice you upload as a PDF and building an order draft from it.

Agents is available in Younium under **Insights → Agents**. The product is currently in beta. It uses AI to learn tenant-specific validation rules from your own data and to suggest field values where data is missing or invalid.

***

## Core Concepts

### Agent

An agent is a workspace of its own: it has its own settings, its own schedule, its own findings queue, and can be switched on or off. Settings are held per tenant, and the Account Validation Agent runs per legal entity.

### Account Validation Agent

The Account Validation Agent checks account data quality — missing or invalid fields, duplicates, incomplete addresses, invoicing setup, and e-invoice configuration. For most checks it can propose a value and write it to Younium after review. A few, such as duplicates, have to be resolved in Younium by hand.

### Contract Import Agent

The Contract Import Agent turns a PDF into an order draft. It reads the document, extracts the customer, dates, currency and line items, matches those line items to products in your catalogue and the customer to an account, and presents the result for review before anything is written to Younium.

It is reached from the order screen rather than from the findings queue, and it produces a draft for a person to check rather than a finding to action.

### Finding

A finding is what the agent produces. Each one links to a Younium record — usually an account — describes the issue, suggests a fix, and carries a confidence score. Findings move through a status workflow as your team acts on them.

| Status        | Meaning                                                                                                       |
| ------------- | ------------------------------------------------------------------------------------------------------------- |
| Pending       | New finding awaiting review                                                                                   |
| Assigned      | Routed to a Younium user                                                                                      |
| Paused        | Snoozed without dismissing                                                                                    |
| Applied       | Fix was written to Younium                                                                                    |
| AutoApplied   | Fix was applied automatically because its confidence was high enough                                          |
| Dismissed     | Marked as a false positive                                                                                    |
| AutoDismissed | Dismissed automatically after repeated dismissals of the same type                                            |
| Resolved      | Closed — either the issue is no longer present in Younium, or someone acknowledged that they fixed it by hand |

Findings fall into two groups. **Auto-fixable** findings cover missing or invalid fields where the agent can propose and apply a value. **Informational** findings, such as duplicates, are fixed in Younium and then acknowledged here, so they leave the queue with a record of who cleared them.

### Validation rules and ontology

On its first run the Account Validation Agent performs ontology discovery: it inspects a sample of your Younium data and builds a tenant-specific model of the entities, properties and patterns it finds, on top of a set of baseline checks. Rules are managed in the Validation Rules tab — enable, disable, pin or remove them per tenant. The agent also learns from what your team does: a rule whose findings are repeatedly dismissed is ranked down and can be disabled automatically.

Four checks are switched off until you opt in, because not every organisation uses the fields they cover: **Missing Invoice Settings Group**, **Missing Invoice Batch Group**, **Missing Tax Template** and **Incomplete Delivery Address**.

### Tier and scope

The Account Validation Agent runs against a capped set of accounts on the **Free** tier: the 25 oldest accounts in scope, held steady between runs so the same accounts are reported each time. The **Unlimited** tier removes the cap. Tier is assigned per tenant and legal entity.

***

## What the Account Validation Agent Checks

These are the baseline checks. Ontology discovery can add more from your own data, and any of them can be disabled.

| Check                              | Priority     | What it looks for                                                                                              |
| ---------------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------- |
| Missing Name                       | Critical     | The account has no name                                                                                        |
| Duplicate Name                     | Important    | Another account has the same name                                                                              |
| Duplicate Account Number           | Critical     | Another account has the same account number                                                                    |
| Missing Account Type               | Important    | No account type is set                                                                                         |
| Missing Currency                   | Important    | No currency is set                                                                                             |
| Missing Organization Number        | Critical     | No organisation number                                                                                         |
| Duplicate Organization Number      | Critical     | Another account has the same organisation number                                                               |
| Missing Tax Registration Number    | Critical     | No tax registration number                                                                                     |
| Duplicate Tax Registration Number  | Critical     | Another account has the same tax registration number                                                           |
| Missing Your Reference             | Important    | No customer reference for the invoice                                                                          |
| Missing Our Reference              | Important    | No own reference on the account or on orders invoiced separately                                               |
| Inactive Account With Orders       | Critical     | The account is inactive but still has orders                                                                   |
| Active Account Without Active CMRR | Important    | The account is active but has no active subscription revenue                                                   |
| Missing Delivery Method            | Important    | No invoice delivery method is set                                                                              |
| Missing Payment Term               | Important    | No default payment term is set                                                                                 |
| Missing Invoice Email              | Critical     | No invoice email address                                                                                       |
| Invalid Invoice Email              | Critical     | The invoice email address is not a valid address                                                               |
| Missing Invoice Email CC           | Nice to have | No copy address for invoices                                                                                   |
| Missing Reminder Email             | Nice to have | No address for payment reminders                                                                               |
| Invoice Reminder Disabled          | Important    | Reminders are switched off for this account                                                                    |
| E-Invoice Scheme Validation        | Important    | The e-invoice scheme is missing or does not match the account's country when the delivery method is electronic |
| Missing E-Invoice Address          | Nice to have | Electronic delivery is selected but no e-invoice address is set                                                |
| Missing Invoice Settings Group     | Nice to have | No invoice settings group — off until you opt in                                                               |
| Missing Invoice Batch Group        | Nice to have | No invoice batch group — off until you opt in                                                                  |
| Missing Invoice Template           | Critical     | No invoice template                                                                                            |
| Missing Tax Template               | Critical     | No tax template — off until you opt in                                                                         |
| Missing Accounts Receivable        | Important    | No accounts receivable account                                                                                 |
| Incomplete Invoice Address         | Critical     | The invoice address is missing required parts                                                                  |
| Incomplete Delivery Address        | Important    | The delivery address is missing required parts — off until you opt in                                          |

***

## What the Contract Import Agent Does

Uploading a PDF starts three steps in order: Younium reads the text and tables out of the document, identifies the commercial content in it, and then matches that content against your catalogue and your accounts. Nothing is written to Younium until you submit the result.

### What it reads from the document

| Group      | Values                                                                         |
| ---------- | ------------------------------------------------------------------------------ |
| Customer   | Company name, customer reference or contact person, invoice address and e-mail |
| Order      | Effective start date, effective end date or contract duration, currency        |
| Line items | Product descriptions, quantities, unit prices, total amounts                   |

The document has to carry selectable text. A contract that is a scan rather than a text PDF has nothing to extract, and clear table structures extract more reliably than prose.

### Matching line items to products

A line item is matched against your catalogue on the product's name, its price, and its billing period — monthly, annual or one-time — with each contributing to a confidence score shown against the match. Products have to exist in the catalogue for this to work: the agent matches against what is there and does not create products.

Where a name in the document does not resemble the catalogue name, a custom field on the product provides an alternative. Set any custom field on the product to the name as it appears in the incoming document, and the agent matches on that instead — the comparison ignores case but is otherwise exact. No configuration is needed beyond setting the field; the agent picks it up on the next upload.

The same mechanism expresses a bundle. Where several products carry the same value in a custom field, a single line item in the document matching that value is expanded into one order line per product, and the line's price is divided evenly between them. A document line of 3,000 matching three products becomes three order lines of 1,000, each against its own product.

A match that is wrong or missing can be replaced by choosing the correct product by hand, which updates the line's product information from the catalogue.

When a product is matched, the charges from its charge plan come with it. Where the product has more than one charge plan, a different plan can be chosen and the charges change with it.

> **Note on prices:** Prices come from the document, not from the catalogue. Catalogue prices are used to help identify the right product and are then set aside, so a negotiated rate, a discount or a bespoke price in the contract survives into the order draft rather than being overwritten by the list price.

### Matching the customer to an account

The customer is matched against your accounts on organisation number or account number, each of which has to agree exactly, or on close similarity of company name — ignoring suffixes such as AB, Ltd or Inc. Where nothing matches, the draft is set to create a new account rather than failing, so an unfamiliar customer does not block the import.

### Dates

The effective start date is taken from the first of these the document provides: an explicit start or subscription date, an order or purchase date, an invoice date, any other date in the document, and failing all of those, today. The effective end date is taken from an explicit end date, or calculated from a stated contract duration such as "12 months", and is otherwise left empty.

Because a date is always produced for the start, a document with no usable date silently yields today's date. This is worth checking on review rather than after submission.

### What submitting produces

| Created      | Notes                                                     |
| ------------ | --------------------------------------------------------- |
| Account      | Only where the customer did not match an existing account |
| Subscription | Carrying the extracted dates and terms                    |
| Order        | Carrying the line items, as a draft                       |
| Attachment   | The original PDF, kept against the record                 |

Younium returns the subscription identifier, which is how the created order is found afterwards.

***

## Behaviour and Rules

### Agent runs

A run is started by hand with **Run Now**, or automatically when **Auto Run** is switched on. Scheduled runs happen daily at 03:00 UTC.

Each run records a run log, executes discovery if no ontology exists yet, scans your Younium data against the enabled rules, saves new and updated findings, and enriches unresolved findings with suggested values. Findings whose underlying data has since been corrected in Younium resolve themselves, so the queue reflects the current state rather than the state at the time of the run.

### What your team can do with a finding

| Action            | Effect                                                                                      |
| ----------------- | ------------------------------------------------------------------------------------------- |
| Apply / Apply All | Writes the proposed fix to Younium                                                          |
| Review            | Opens the finding for manual review when its confidence falls in the review band            |
| Dismiss           | Marks it as a false positive; repeated dismissals of the same type can trigger auto-dismiss |
| Acknowledge       | Confirms an informational issue was fixed in Younium; the finding is closed as Resolved     |
| Reopen            | Undoes an acknowledgement or a dismissal and returns the finding to the queue               |
| Assign            | Routes the finding to a Younium user                                                        |
| Pause / Unpause   | Snoozes it without dismissing                                                               |
| Comment           | Adds discussion, at any status                                                              |

### Confidence and automation

Every proposed fix carries a confidence score, and three thresholds decide how much the agent does on its own:

| Threshold                                  | Value | Effect                                                                                                               |
| ------------------------------------------ | ----- | -------------------------------------------------------------------------------------------------------------------- |
| Auto-apply minimum confidence              | 90%   | At or above this score a fix is eligible to be applied automatically                                                 |
| Review minimum confidence                  | 70%   | Between this score and the auto-apply threshold, the fix waits for manual review                                     |
| Consecutive dismissals before auto-dismiss | 5     | After this many dismissals of the same finding type, the remaining findings of that type are dismissed automatically |

**Confirm on Apply** is on by default, so a user confirms before anything is written to Younium.

***

## Configuration and Settings

Settings are reached from **Workspace Settings**. The agent has an enable switch of its own; when it is off, the agent is shown as Disabled on its card and is not scheduled.

### Schedule

| Setting              | Description                                                       | Default |
| -------------------- | ----------------------------------------------------------------- | ------- |
| **Auto Run**         | The agent runs automatically on its schedule — daily at 03:00 UTC | Off     |
| **Confirm on Apply** | Show a confirmation dialog before applying changes                | On      |

### Account Settings

What decides which accounts a run covers.

| Setting                                              | Description                                                                                                       | Default                  |
| ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------ |
| **Account Scope**                                    | All accounts, or active customer accounts only                                                                    | Active customer accounts |
| **Younium Account Types**                            | Which account types to include — Customer, Reseller, Prospect, Other. Applied only when the scope is All accounts | All four                 |
| **Only include accounts with active revenue (CMRR)** | Restricts the run to accounts with at least one active order                                                      | Off                      |

### Prompt

Written instructions that steer what the agent looks at.

| Setting                                 | Description                                                                                                                                                     |
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **System instructions (from ontology)** | Generated from your ontology, and read-only — regenerate rather than edit                                                                                       |
| **User prompt**                         | Your own instructions — for example, that organisation number and tax registration number must always have a value. Lower priority than the system instructions |

**Reset to Defaults** returns the settings to how they arrived.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.younium.com/agents/agents.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
