Skip to content

Remove /api/v1/chat and the chat agent once the backend chat module is gone #207

Description

@daniilperkin

Parent Story

Part of SprintStartProject/Wiki#319. Follow-up cleanup: /api/v1/chat is only called by the backend chat module, which sprintstart-backend#260 removes.

Blocked by sprintstart-backend#260 (backend chat-module removal). The other prerequisite landed 2026-10-02: sprintstart-ai#206 mounted GrepTool and the reasoning streaming in Buddy's search-only mode, so those must not be deleted with the chat agent.

Scope

  • Remove api/routes/chat.py and its router registration (api/app.py), the orchestrator factory in api/dependencies.py (OrchestratorFactory, ChatOrchestrator import), the ChatAgent / ChatOrchestrator exports in agents/__init__.py, agents/chat_agent.py (ChatAgent), agents/orchestrator.py (ChatOrchestrator) and the chat-only schemas (ChatRequest, legacy prompt/context field mapping)
  • Keep: agents/tools/grep.py (the Buddy turn mounts GrepTool after ai#206), agents/tools/retrieve.py and tools/base.py if anything outside the chat agent still references them, the filter schema reused by BuddyAgentRequest, api/routes/title.py (/api/v1/generate-title, used for Buddy titles)
  • Update AGENTS.md: its architecture section describes ChatAgent as the chat engine, "Conventions" says "Chat is one agent, one loop" (restate it for the Buddy turn), and "Project separation" lists ChatRequest
  • sprintstart chat CLI: scripts/sprintstart.py registers a chat subcommand (scripts/chat_cli.py) that streams from /api/v1/chat. Remove it, or point it at the Buddy route with capabilities off
  • AGENT.md and README.md also describe the chat agent: update them with AGENTS.md
  • Remove the tests for deleted code

Acceptance Criteria

  • /api/v1/chat is gone; Buddy routes and title generation still work
  • No script or CLI calls /api/v1/chat
  • No dead imports of chat_agent / orchestrator
  • AGENTS.md describes the Buddy agent as the one conversation engine
  • Gates pass: uv run ruff format --check ., uv run ruff check ., uv run pyright src/, uv run pytest

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions