top | item 43471948

(no title)

mrieck | 11 months ago

I recently looked at source for Cline because I’m making my own coding agent and they use tools without using tools.

See how they request the agent to use xml to call tools: https://github.com/cline/cline/blob/main/src/core/prompts/sy...

And also: https://github.com/cline/cline/blob/main/src/core/Cline.ts

discuss

order

ai-christianson|11 months ago

In RA.Aid (https://github.com/ai-christianson/RA.Aid) we support normal tool calling, but we also have a our own agent backend called Code Is All You Need.

The way it works is we prompt the LLM to generate code to call the tools directly. We then parse the AST to validate it and restrict it to a very small/safe subset (whitelisted function calls.)

HF smolagents does something similar and there are a few papers out there validating the approach.

bhouston|11 months ago

That makes sense because Cline existed prior to tool use being part of the standard LLM APIs. I think OpenAI had it at that point, but Anthropic and Ollama hasn't yet standardized on an API.

But the vendors are training their models specifically on tool use with their expected internal formats so you might as well leverage that if you are starting fresh now.