# AI agents on tasks and news for customers

> How AI agents take tasks from the queue, write comments and move them to QA, and how a finished task becomes a news post for customers.

A connected AI agent can work on tasks like a team member: take them from the queue, write what it does and prepare a reply for the customer.

## How an AI agent takes tasks

1. `task_queue` returns the tasks it should work on: first those assigned to it, then pending tasks with no assignee, if you allow that.
2. `task_take` assigns the task to it and moves it to "In progress".
3. `task_comment_create` writes its progress in comments.
4. When it is finished it moves the task to QA. To "Done" only if you allowed it to finish tasks in the AI agent's settings.

![A task with the AI agent's comments](https://hrc.lt/screens/en/task-drawer.desktop.1600.e479bc21.webp)

In the AI agent's settings, choose whether it takes only tasks assigned to it or also pending tasks with no assignee, and whether it may finish tasks.

## A reply for the customer

If the task has the customer notice on, the AI agent leaves a prepared reply in the linked conversation (`prepared_reply_replace` with the task id). A member reviews and sends it.

## News for your customers

A finished task can become a news post. Published posts show in the News tab of the chat widget.

![A news post draft from a finished task](https://hrc.lt/screens/en/project-changelog.desktop.1600.798b6cb8.webp)

How to connect an AI agent: [Connect an AI agent over MCP](https://hrc.lt/en/docs/ai-agents/mcp).
