Description
Currently the Lucidia project has modules for an interactive agent but lacks a user-friendly command-line interface. Adding a CLI will make it easier to test and interact with the system.
Proposed work
- Develop a Python script (e.g.,
lucidia/chat_cli.py) that imports the ChatGPTAgent and ContradictionAgent classes.
- Implement a loop that prompts the user for input, passes the input to
ChatGPTAgent.evaluate, and displays the agent's response.
- After each response, call
ContradictionAgent.analyze to record any detected contradictions. Provide commands for listing and clearing contradictions.
- Ensure the CLI gracefully handles session termination: allow the user to exit the conversation and persist memory using the existing memory manager.
- Provide usage instructions and argument parsing (if needed) so the script can be run via
python -m lucidia.chat_cli.
Acceptance criteria
- Running
python -m lucidia.chat_cli launches an interactive prompt in the terminal.
- User inputs are processed by
ChatGPTAgent.evaluate and responses are displayed.
- The CLI saves conversation history and sentiment tags in memory between sessions via the memory manager.
- Contradictions can be listed and cleared through CLI commands, and are stored in
contradictions.json.
- A README section or docstring explains how to use the CLI.