Middleware Pipeline
The agent uses a middleware chain — a stack of interceptors that wrap every model call and tool call. Middleware can inject context into the system prompt, intercept errors, and send progress updates — all without the tools or the LLM knowing.
Multi-Chat Isolation
A single instance of Quartermaster serves one shop owner. However, the architecture is designed for multi-chat safety from day one — every database row is tagged with the Telegram chat_id, and the runtime uses contextvars to ensure each request has unambiguous context.
Pricing & GST
The Paise Convention
Subagent Delegation
Complex tasks that require focused reasoning are delegated to subagents — separate LLM instances with their own system prompt, tools, and instruction files.