agent¶
Functions¶
agent.add_skill_dirs(dirs)— Register additional skill roots: directories whose immediate subdirectories each hold aSKILL.md. Calls accumulate, and these take precedence over skills found under the prompts directory.agent.add_skill_files(paths)— Register individualSKILL.mdfiles to load as skills. Calls accumulate, and these take precedence over discovered skill roots.agent.append_system_prompt(text)— Set text appended after the base system prompt. The last call wins; takes precedence over~/.config/wallah/APPEND_SYSTEM.mdbut not--append-system/--append-system-file.agent.configure_compaction(settings)— Set the context-compaction policy. The last call wins.agent.configure_startup_banner(settings)— Set the startup-banner policy. The last call wins.agent.configure_webfetch(settings)— Set thewebfetchpolicy (SSRF allowances, size cap, timeout). The last call wins.agent.on(name, handler)— Register a handler for a host event (e.g.discover_providers).agent.set_prompts_dir(dir)— Set the directory searched for per-projectAGENTS.mdprompt files. The last call wins; takes precedence over~/.config/wallah/prompts.agent.set_system_prompt(system)— Override the base system prompt. The last call wins; takes precedence over~/.config/wallah/SYSTEM.mdbut not--system/--system-file.agent.show_confirmation(prompt, options) -> string— Ask the user to choose one ofoptions(e.g. from atool_callhandler, to gate a sensitive call on approval), pausing this Lua call until they answer. Shows an overlay in the TUI; fails with an error when no interactive TUI is running to show it, oroptionsis empty.