Docs & rules

ericmjl/llamabotGitHub

This is a public, read-only report. Striff reads this repository's docs, turns each sentence that makes a claim about the code into a rule, and checks the rule against the code on the default branch. How this works

main30d24aeLast read Oct 11

Is this yours? Install to manage it

Once installed, Striff checks every pull request.

Documents
Rules
66
66
7
7
32
7
2
5
7
5
2
8
7
1
2
2
8
6
2
2
2
25
14
2
2
5
2
3
7
5
2
4
25 docs
ericmjl/llamabotOpen repository

ericmjl/llamabot — documented rules

66 of 66 rules, printed November 6, 2026.

The sentence in your docs
Ensure ChatMemory is top-level in llamabot/__init__.py ✅
ChatMemory is in llamabot
Holds
add_message() → append()
ChatMemory has an append method
Holds
get_messages() → retrieve()
ChatMemory has a retrieve method
Holds
New threading support with ChatMemory.threaded()
ChatMemory has a threaded method
Holds
save(), load(), export()
3 rules from this sentence
ChatMemory has a save method
checks “save()”
Holds
ChatMemory has a load method
checks “load()”
Holds
ChatMemory has an export method
checks “export()”
Holds
2026-03-28 — DecideNode.aexec constructs AsyncToolBot and awaits AsyncToolBot.__call__ (removed ToolBot.acall).
DecideNode depends on AsyncToolBot
Holds
Routing is implemented by DecideNode, which uses ToolBot in exec and AsyncToolBot in aexec to map shared["memory"] to a single tool call per decision step.
DecideNode depends on ToolBot
Holds
The system shall implement DecideNode.exec such that the routing step uses ToolBot, and DecideNode.aexec such that the routing step uses AsyncToolBot, each with the same tool list and model configuration as the AgentBot instance (subject to Ollama-specific prompt and tool_choice adjustments).
3 rules from this sentence
AgentBot depends on DecideNode
Holds
DecideNode depends on ToolBot
checks “DecideNode.exec such that the routing step uses ToolBot”
Holds
DecideNode depends on AsyncToolBot
checks “DecideNode.aexec such that the routing step uses AsyncToolBot”
Holds
The system shall not expose a separate async entrypoint (e.g. acall) on ToolBot;
ToolBot may not have acall
Holds
async tool selection shall live on AsyncToolBot.__call__ only.
AsyncToolBot has __call__
Holds
Class QueryBot, Module llamabot.bot.querybot, Base SimpleBot
QueryBot extends SimpleBot
Holds
Class AsyncQueryBot, Module llamabot.bot.querybot, Base QueryBot
AsyncQueryBot extends QueryBot
Holds
Field docstore, Type AbstractDocumentStore, Role Primary retrieval corpus required
QueryBot has a docstore field
Holds
Field memory, Type Optional[AbstractDocumentStore], Role Optional second retrieval source also receives append of assistant text after each successful call when set
QueryBot has a memory field
Holds
compose_rag_messages(query, n_results, outer_span):
QueryBot has a compose_rag_messages method
Holds
The system shall provide QueryBot with a required docstore of type AbstractDocumentStore and an optional memory of the same abstract type.
QueryBot depends on AbstractDocumentStore
Holds
AsyncQueryBot.__call__ shall delegate to QueryBot.__call__ via asyncio.to_thread with the same query and n_results.
AsyncQueryBot depends on QueryBot
Holds
SimpleBot is the base completion stack for most LlamaBot bots: LiteLLM (completion / acompletion) behind the shared message model, optional recorder spans, and SQLite logging of turns.
SimpleBot imports litellm
Holds
Class AsyncSimpleBot, Module llamabot.bot.simplebot, Base SimpleBot
AsyncSimpleBot extends SimpleBot
Holds
SimpleBot.__call__: Creates a Span (child of current span when present), records metadata, calls make_response + stream_chunks, builds AIMessage with content and tool calls, sqlite_log, and appends to memory when configured (last processed user message + assistant message).
3 rules from this sentence
SimpleBot depends on Span
checks “Creates a **Span”
Holds
SimpleBot depends on AIMessage
checks “builds AIMessage”
Holds
SimpleBot has __call__
checks “SimpleBot.__call__”
Holds
AsyncSimpleBot.__call__: Uses token streaming via stream_tokens_for_messages and a finalize callback to assemble the final AIMessage, span fields, logging, and memory.
2 rules from this sentence
AsyncSimpleBot depends on AIMessage
checks “assemble the final AIMessage”
Holds
AsyncSimpleBot has __call__
checks “AsyncSimpleBot.__call__”
Holds
SimpleBot.__call__ shall append the last processed user message and the assistant AIMessage to memory when memory is configured.
SimpleBot depends on AIMessage
Holds
StructuredBot subclasses SimpleBot but does not use SimpleBot.__call__ for its main path.
StructuredBot extends SimpleBot
Holds
Class AsyncStructuredBot, Module llamabot.bot.structuredbot, Base StructuredBot
AsyncStructuredBot extends StructuredBot
Holds
AsyncToolBot uses native acompletion and async_stream_chunks—no asyncio.to_thread around the sync ToolBot.__call__.
AsyncToolBot may not use asyncio.to_thread
Holds
Class ToolBot, Module llamabot.bot.toolbot, Base SimpleBot
ToolBot extends SimpleBot
Holds
Class AsyncToolBot, Module llamabot.bot.toolbot, Base ToolBot
AsyncToolBot extends ToolBot
Holds
AsyncToolBot.__call__: make_async_response + async_stream_chunks, then same extraction and memory updates.
AsyncToolBot has __call__
Holds
AgentBot LLD — PocketFlow graph uses ToolBot / AsyncToolBot inside DecideNode.
2 rules from this sentence
DecideNode depends on ToolBot
Holds
DecideNode depends on AsyncToolBot
Holds
ToolBot.__call__ shall return the list from extract_tool_calls after make_response and stream_chunks, and shall append the first user message and an AIMessage whose content is the string representation of that tool-call list to chat_memory.
2 rules from this sentence
ToolBot depends on AIMessage
checks “ToolBot.__call__ shall return the list from extract_tool_calls after make_response and stream_chunks, and shall append the first user message and an AIMessage”
Holds
ToolBot depends on ChatMemory
Holds
AgentBot.close_mcp() or AsyncAgentBot.close_mcp()
2 rules from this sentence
AgentBot has a close_mcp method
Holds
AsyncAgentBot has a close_mcp method
Holds
decide_node (DecideNode):
AgentBot has decide_node
Holds
tools (List[Callable]):
AgentBot has tools
Holds
docstore (AbstractDocumentStore): The document store used for retrieval
QueryBot has docstore
Holds
memory (Optional[AbstractDocumentStore]): The chat memory component (if any)
QueryBot has memory
Holds
memory (Optional[AbstractDocumentStore], default: None): An optional chat memory component to use. If provided, the bot will retain chat history. For conversational memory, use ChatMemory (e.g., lmb.ChatMemory()). For RAG/document retrieval, use an AbstractDocumentStore (such as BM25DocStore or LanceDBDocStore).
2 rules from this sentence
BM25DocStore depends on AbstractDocumentStore
Holds
LanceDBDocStore depends on AbstractDocumentStore
Holds
BaseMessage objects (HumanMessage, AIMessage, SystemMessage)
3 rules from this sentence
HumanMessage depends on BaseMessage
Holds
AIMessage depends on BaseMessage
Holds
SystemMessage depends on BaseMessage
Holds
pydantic_model (BaseModel): The Pydantic model for validation
StructuredBot has pydantic_model
Holds
allow_failed_validation (bool): Whether to allow failed validation
StructuredBot has allow_failed_validation
Holds
tools (List[Dict]): List of tool JSON schemas
ToolBot has tools
Holds
name_to_tool_map (Dict[str, Callable]): Mapping from tool names to tool functions
ToolBot has name_to_tool_map
Holds
chat_memory (ChatMemory): The chat memory component
ToolBot has chat_memory
Holds
Create ChatMemory with LLM-based threading.
ChatMemory has threaded
Holds
graph (networkx.DiGraph): The NetworkX graph storing conversation structure
ChatMemory has graph
Holds
node_selector (NodeSelector): The node selection strategy
ChatMemory has node_selector
Holds
summarizer (Optional[Summarizer]): The summarization strategy (if any)
ChatMemory has summarizer
Holds
context_depth (int): Default context depth for retrieval
ChatMemory has context_depth
Holds
prompt_hash (str | None, default: None): Optional hash of the prompt
BaseMessage has prompt_hash
Holds
tool_calls (list, default: []): List of tool calls associated with the message
BaseMessage has tool_calls
Holds
Sync bots (SimpleBot, QueryBot, …) expose blocking __call__ only.
2 rules from this sentence
SimpleBot has __call__
Holds
QueryBot has __call__
Holds
Message lists are built from shared compose_* helpers on the sync base classes (for example SimpleBot.compose_messages_for_human_messages, QueryBot.compose_rag_messages).
2 rules from this sentence
SimpleBot has compose_messages_for_human_messages
Holds
QueryBot has compose_rag_messages
Holds
66 rules from 19 docs

More open-source reports

Every report →

Other public repositories whose docs Striff read and checked against their code.