opensource ai agents that airnt useless with d

Mark Davies mark.davies at trap10.net
Fri Oct 17 09:35:12 UTC 2025


On Friday, 17 October 2025 at 08:38:11 UTC, Serg Gini wrote:
> On Friday, 17 October 2025 at 07:53:58 UTC, Mark Davies wrote:
>> I should have mentioned in my previous reply but one of the 
>> code blobs I generated is the core of an agent written in 
>> DLang, it has websocket interface to the html front end and 
>> openai interface to llama.cpp. It has tool calling support and 
>> tracks conversations. I've kind of put it on the back burner 
>> as I can't get tool calling working in the way that I want.
>>
>> All the code was generated by AI models.
>>
>> Mark.
>
> Sounds nice.
>
> How do you handle async tasks for agents?

The websocket, web interface and openai interface run as separate 
threads with message passing by an internal mail system, tool 
calls are intercepted by the openai interface and external tasks 
are spawned as shell commands via pipe processes. There is a sub 
channel in the websocket messaging system for passing messages to 
and from the front end for task/internal status while text from 
the AI gets sent plain. This isn't fully complete as I was trying 
to resolve issues with tool calling before putting more effort 
into this area.

My plan was to write an internal built in editor for the AI that 
could read and write to internal buffers to reduce context use, 
having the ability to load a file into a buffer then scan and 
modify, then compile and run, capturing output in another buffer. 
This would allow context pruning while maintaining AI 
understanding of the task.

I can get it to use the shell interface quite well, I have had it 
scan a directory and analyse the files to generate what it thinks 
the files do. I can get it to use wget to retrieve information 
(bitcoin price, exchange rates etc.)

But I just can't get it to use the editor interface it gets 
totally confused. There was an issue with Qwen models and tool 
calling when using the openai streaming interface but they say 
they have fixed that. But it doesn't seemed to have helped in my 
case. I have put the code to one side until I can resolve this 
issue as that is the crux of what I wanted to do.




More information about the Digitalmars-d-learn mailing list