Haverscript is a language for building LLM-based agents, providing a flexible
and composable way to interact with large language models.
[0.3.0] - 2025-02-26
Added
- Initial agentic support. An
Agent
is a python class that has access to an LLM. Markdown
, a simple DSL for building markdown-style prompts.tools
argument forModel.chat
, that supplies function-calling callbacks.format
now supports standard types such aslist[int]
andbool
for stuctured output.echo
middleware now takes an optionalstream
parameter, defaulting toTrue
.Model.compress()
can remove older chat calls from the history, reducing context sizes.connect_chatbot
which promotes a chatbot into aModel
.Model.ask()
which is a one-shotModel.chat()
that returns dynamic content.Reply.informational
andReply.pure
generate specific Reply objects.ChatBot
class for wrapping up pseudo LLMs (or agents acting like LLMs).
Deprecated
dedent
has stubed out (has no effect). This has been replaced by Markdown support.meta
middleware is removed, and has been replaced byChatBot
.
Changed
- Internally, resolve refs from JSON schemas in format (this works around an ollama bug)
Model
andResponse
are now pydantic classes.retry()
now takes a simple retry count, and no longer uses the tenacity package.