Let's dive into designing a keyboard-driven, information-dense interface for power users to interact with LLMs (Large Language Models) and Agents. We'll break down the interaction into simple yet versatile primitives, allowing for a powerful and emergent experience.
Primitive 1: Commands
- Represented by a single key or a short key combination (e.g.,
Ctrl + <letter>)
- 10-20 basic commands, easily memorizable
- Examples:
Ctrl + N: Create a new context (or "note")
Ctrl + Shift + N: Merge two contexts
Ctrl + K: Kill (delete) a context
Primitive 2: Contexts
- A context represents a self-contained conversation or task
- Each context has a unique name (auto-generated or user-assigned)
- Contexts can be:
- Empty (newly created)
- Active (currently being interacted with)
- Inactive (backgrounded)
Primitive 3: Input Modes
- 3-4 basic input modes, toggled using a single key or key combination
- Examples:
Ctrl + I: Toggle " Insert" mode ( typing inserts text into the active context)
Ctrl + R: Toggle "Replace" mode ( typing replaces the entire active context)
Ctrl + E: Toggle "Edit" mode (allows for precise cursor control within the context)
Primitive 4: Navigation
- Use a combination of keyboard navigation and prefix-based filtering
- Examples:
Ctrl + P: Switch to a different context ( fuzzy prefix matching)
Ctrl + Shift + P: Switch to a recently used context
Alt + <arrow keys>: Navigate within a context ( scroll, page up/down)
Primitive 5: Agents and LLMs
- Represented as special types of contexts with specific behaviors
- Can be invoked using a command (e.g.,
Ctrl + Shift + A to invoke an Agent)
- Can be used to generate text, answer questions, or perform actions
Primitive 6: Output and Feedback
- Use a combination of:
- In-context output (e.g., displaying generated text within the active context)
- Toast notifications ( brief, non-intrusive pop-ups for feedback)
- A separate "output buffer" for longer outputs or logs
Step-by-Step Usage Example
- The user starts the interface and presses
Ctrl + N to create a new context, named "Research".
- The user types some text in the "Research" context, exploring a topic.
- The user presses
Ctrl + Shift + A to invoke an Agent, which generates some text based on the current context.
- The user reviews the generated text and decides to merge it with another context, "Outline". They press
Ctrl + Shift + N and select the "Outline" context.
- The user switches to the "Outline" context using
Ctrl + P and fuzzy prefix matching.
- The user edits the merged text using
Ctrl + E (Edit mode) and precise cursor control.
- The user wants to ask a follow-up question to an LLM. They press
Ctrl + Shift + L to invoke the LLM and type their question.
- The LLM responds, and the user reviews the output in the "Research" context.
Emergent Behavior
As users interact with the interface, they can develop complex workflows and strategies by combining the primitives in creative ways. For example:
- Using Agents to generate text, then editing and merging it with other contexts
- Creating custom workflows by chaining together commands and input modes
- Utilizing the output buffer to review and analyze longer outputs from LLMs and Agents
This design distills the interaction down to simple, versatile primitives, allowing power users to create complex and efficient workflows. The keyboard-driven interface enables rapid navigation and execution, making it an ideal tool for users who require a high degree of control and productivity.