Architecture
llmAssistant is an intermediary Model Context Protocol (MCP) agent between client requests and default LLM-agent execution from AchillesAgentLib.
Component Overview
| Component | Location | Role |
|---|---|---|
| Model Context Protocol contract declaration | llmAssistant/mcp-config.json |
Declares tool contracts, schemas, command wrapper, and TOOL_NAME mapping. |
| Wrapper entrypoint | llmAssistant/tools/llm_tool.sh |
Starts a new Node invocation for each tool call. |
| Dispatcher runtime | llmAssistant/tools/llm_tool.mjs |
Parses input envelope, validates args, and routes execution to helper operations. |
| Commit-message helper | llmAssistant/lib/git-commit-message.js |
Builds prompt from diffs and returns commit message text. |
| Conflict-resolution helper | llmAssistant/lib/git-resolve-conflict.js |
Attempts deterministic merge first, then LLM-assisted conflict resolution. |
| Agent bootstrap | llmAssistant/scripts/startAgent.sh |
Loads provider credentials from env or .ploinky/.secrets and starts AgentServer. |
Runtime Boundary
Clients consume MCP tools only. They do not call Achilles LLM runtime directly. The agent owns prompt shaping, context clipping, and output normalization for each tool contract.
{
"name": "llm_autocomplete",
"command": "tools/llm_tool.sh",
"cwd": "workspace",
"env": {
"TOOL_NAME": "llm_autocomplete"
}
}
Intermediary Guarantee
Explorer and other agents receive deterministic contract outputs (ok, payload fields, explicit errors) while internal LLM provider changes remain behind this boundary.
The agent is a contract-oriented orchestration layer, not a generic free-form chat endpoint.