PocketAccountant / src /agent /__init__.py
eldinosaur's picture
PocketAccountant: custom ledger UI + deterministic agent (engine, ledger, retrieval, classifier)
c55ab5e verified
Raw
History Blame Contribute Delete
964 Bytes
"""Agent — the plan → call-tools → ground → explain loop.
The model (fine-tuned MiniCPM via llama.cpp) orchestrates; it does NOT compute. Each
tool is a thin, typed wrapper over the deterministic engine and the ledger. The
agent's only arithmetic is choosing which tool to call.
The runtime is pluggable (``LLMClient``): ``LlamaCppClient`` for local-first
inference, ``ScriptedClient`` for tests/demos without weights. Every run yields a
shareable ``Trace`` (📡).
"""
from .llm import (
AssistantTurn,
LlamaCppClient,
LLMClient,
ScriptedClient,
ToolCall,
)
from .loop import DEFAULT_SYSTEM_PROMPT, Agent, Step, Trace
from .tools import Tool, ToolContext, build_tools, calc_to_dict
__all__ = [
"Agent",
"Trace",
"Step",
"DEFAULT_SYSTEM_PROMPT",
"Tool",
"ToolContext",
"build_tools",
"calc_to_dict",
"LLMClient",
"ScriptedClient",
"LlamaCppClient",
"AssistantTurn",
"ToolCall",
]