Warning: still work in progress.
Pragtical Assistant is a Pragtical plugin for AI-assisted coding conversations. It provides an editor-native conversation view, project-scoped context, provider integrations, and a guarded tool layer for coding agents.
- Conversation UI with rendered Markdown transcript and Markdown prompt editor.
- Prompt helpers for inserting files or project files/directories directly into the conversation prompt.
- Project-local sessions, memories, raw provider logs, and protocol logs.
- Provider adapters for Ollama, llama.cpp server, LM Studio, OpenAI, Codex, ACP, and GitHub Copilot.
- HTTP chat and OpenAI Responses support with streaming, tool calling, local compaction, optional reasoning effort, model metadata refresh, and generated conversation titles.
- Persistent app-server/ACP style backends for agent protocols.
- Collaboration modes for planning and implementation, with different tool availability and approval behavior.
- Async prompt queueing and streamed transcript updates.
- Compact activity rendering by default, with optional verbose activity/tool transcript output for debugging.
Registered assistant tools currently include:
- Files:
read,search,list,file_info,write,edit,apply_patch - Process:
exec_command,write_stdin,exec_status,send_eof,interrupt_exec,close_exec - Web:
web_fetch,web_search,web_find - Git:
git_status,git_diff - Interaction:
tool_catalog,time,update_plan,request_user_input
For non-GPT implementation models, the plugin advertises write and edit.
For models whose name contains gpt, it advertises apply_patch instead of
write and edit.
New conversations start with a system role message for the current project.
When present, project instructions are read from AGENTS.md. Runtime
environment context is sent as a separate provider-only message and refreshed
before provider requests.
Project-local state is stored under:
.pragtical/assistant/
Important subdirectories and files:
sessions/: saved conversationsmemories/: project-local assistant memories- raw/protocol logs: per-conversation troubleshooting data when logging is enabled
The plugin is configured through config.plugins.assistant.
Common options:
agent: default provider (ollama,llamacpp,lms,openai,codex,acp, orcopilot)agents: per-agent provider configuration, set programmatically withassistant.configure_agent(name, options)stream: enable streaming responsesreasoning_effort:none,low,medium, orhighsend_max_tokensandsend_max_tokens_amountcompact_tool_results,compact_tool_history,auto_compactverbose_tool_calling,verbose_activityreasoning_activity_messagesgenerate_conversation_titlesconfirm_writesallow_any_read_pathweb_search_url,web_search_query_param,web_timeout_ms,web_allow_hosts
Provider-specific settings such as model, base URL, command, transport, API key, and keep-alive are intentionally not exposed in the settings UI yet. Configure them from user init code, for example:
local assistant = require "plugins.assistant"
assistant.configure_agent("ollama", {
base_url = "http://127.0.0.1:11434",
model = "glm-5.1:cloud",
keep_alive = "-1"
})
assistant.configure_agent("acp", {
command = "some-acp-agent",
transport = "stdio"
})Local providers do not receive API keys unless their agent configuration explicitly opts into API key authentication.
Main commands:
assistant:new-conversationassistant:list-conversationsassistant:list-modelsassistant:resume-conversationassistant:delete-conversationassistant:add-memoryassistant:list-memoriesassistant:delete-memory
Conversation commands:
assistant-conversation:sendassistant-conversation:cancelassistant-conversation:select-modelassistant-conversation:insert-fileassistant-conversation:insert-project-fileassistant-conversation:cycle-modeassistant-conversation:compactassistant-conversation:view-raw-responsesassistant-conversation:view-raw-markdownassistant-conversation:view-rendered-markdownassistant-conversation:respond-to-requestassistant-conversation:rename
Default keymaps:
ctrl+alt+a: start a new conversationctrl+enter/ctrl+return: send promptctrl+m: select modelctrl+alt+u: insert a file or directory path into the promptctrl+shift+u: insert a project file path into the promptshift+tab: cycle collaboration modeescape: cancel the active conversation requestctrl+alt+enter/ctrl+alt+return: respond to a pending requestctrl+backspace: clear prompt
The prompt view also exposes file buttons above the prompt editor:
D: choose any file or directory throughcore:open-fileL: choose a project file throughcore:find-file
Inserted project paths are shortened to project-relative paths when possible. Directory insertions include a trailing path separator so agents can distinguish them from files.
init.lua: plugin config, commands, keymaps, agent/backend registrationagent.lua: shared provider behavior, payloads, tool schemas, compactionconversation.lua: messages, context, sessions, memories, markdown exportpromptview.lua: Widget-based assistant UItools.lua: tool facade and registrationtool/: individual tool implementationstool_router.lua: mode-specific tool selection and permission routingbackend/: HTTP, CLI, app-server, and ACP backendsagent/: provider adapterstests/: Pragtical test suitelive_tests/: manual/live provider conversation checks
Run the full plugin test suite from this directory with:
SDL_VIDEO_DRIVER=dummy pragtical test testsFocused suites used often during tool/backend work:
SDL_VIDEO_DRIVER=dummy pragtical test tests/tools.lua
SDL_VIDEO_DRIVER=dummy pragtical test tests/agent.lua
SDL_VIDEO_DRIVER=dummy pragtical test tests/backend_http.lua
SDL_VIDEO_DRIVER=dummy pragtical test tests/backend_acp.lua
SDL_VIDEO_DRIVER=dummy pragtical test tests/promptview.luaLive conversation tests are intentionally provider-dependent. Also they should be ran without setting the SDL_VIDEO_DRIVER=dummy environment variable.