Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2026-03

Control an AI agent

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

Hi,

For those that do not like AI - please stop reading, nothing interesting down the line.

For those interested:

I created a package that allows you to embed an AI agent in your program. It uses the ACP (Agent Client Protocol) protocol which is meanwhile supported by all major agents:

https://gitlab.com/freepascal.org/acp

There are several demos, including a TUI demo.

The repo contains also a lazacpclient.lpk: this is a package that allows you to control an AI agent in the IDE itself.

- It supports multiple simultaneous sessions.

- Configurable permissions. By default permission is asked for everything.

- It has command completion (thanks to synedit):
the / commands will be shown when you type the / at the start of the prompt.

- You can save the session.

- There is tight integration with the IDE itself: whenever the AI agent creates a file you can have it added to the active project, it will reload files that are modified.

- You can also define MCP servers from within the IDE.

There are quite some options that you can set, and more will come: I'm working on coupling an AI agent session to a project so that when you switch projects, the sessions associated with the project will be reloaded.

I am using it daily with Claude code meanwhile, so it is well tested - but tuned to my habits. Other experiences welcome.

If there are ideas for improvements, I'm all ears.

Michael.

Reply by email