Skip to content

Conversation

@jonastemplestein
Copy link
Contributor

Refactors agent interaction into a unified AgentService to support local and remote CLI modes, enabling TUI remote connections and expanding the HTTP API.

This refactoring centralizes agent interaction logic, allowing CLI tools (TUI, single-turn, piped) to use a single service interface that can operate locally or connect to a remote HTTP server. The HTTP API is extended with endpoints for event streaming, adding events with idle-based responses, session management, and status checks. It also fixes an issue where SetLlmConfigEvent and SystemPromptEvent were redundantly emitted on resumed sessions.


Open in Cursor Open in Web

This commit introduces the AgentService as a central abstraction for interacting with agents. It simplifies the MiniAgent interface by renaming `events` to `tapEventStream` and `getReducedContext` to `getState`. This change improves code organization and testability.

Co-authored-by: jonas <[email protected]>
@cursor
Copy link

cursor bot commented Dec 8, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants