Overview
Add a foreground mode to the local-agi agent run command that allows running an agent synchronously with a prompt and printing the output directly to the foreground.
Current State
Issue #448 was closed, implementing the local-agi agent run command for standalone agent execution. However, the current implementation runs agents in background mode.
New Requirement
Add support for foreground execution mode with the following usage:
Expected Usage
Requirements
- Add a
--prompt flag to the local-agi agent run command
- When
--prompt is provided:
- Create an agent instance (from name or JSON import)
- Execute the agent's
Ask("") method with the provided prompt
- Collect and print the output directly to stdout
- Exit after the operation completes (no background process)
- The foreground mode should work alongside the existing background mode
- Proper error handling and output formatting
Priority
P0 - This is a high-priority enhancement to the agent CLI functionality.
Related
Overview
Add a foreground mode to the
local-agi agent runcommand that allows running an agent synchronously with a prompt and printing the output directly to the foreground.Current State
Issue #448 was closed, implementing the
local-agi agent runcommand for standalone agent execution. However, the current implementation runs agents in background mode.New Requirement
Add support for foreground execution mode with the following usage:
Expected Usage
Requirements
--promptflag to thelocal-agi agent runcommand--promptis provided:Ask("")method with the provided promptPriority
P0 - This is a high-priority enhancement to the agent CLI functionality.
Related