Files
growqr-backend/agents/job-apply.md
NinjasPyajamas 9ddbb4a8e5 feat: wire real service agents into chat with LLM tool dispatch + Rivet proxy fix (#3)
# Wire All 4 Microservice Agents Into Chat

Wires all 4 microservice-backed agents into the chat so the LLM can call real services and return session URLs.

---

## Changes

### New

* `src/routes/chat.ts`

  * Added a direct HTTP chat endpoint.
  * When the LLM calls:

    * `start_interview_session`
    * `analyze_resume`
    * `start_roleplay_session`
    * `compute_qscore`
  * The route executes real service probes and returns live session URLs.

---

### Fixed

* `src/index.ts`

  * Rivet proxy now forwards requests to the engine at `localhost:6420`
    instead of using `registry.handler()`.
  * Prevents the:

    ```txt
    Runtime already started as runner
    ```

    conflict.

* `src/actors/user-actor.ts`

  * `receiveMessage()` now returns:

    ```ts
    {
      reply,
      sessions: []
    }
    ```
  * Includes per-module session URLs in responses.

* `docker-compose.yml`

  * Fixed:

    * Gitea health check port
    * Port mapping
    * `A2A_ALLOWED_KEY` default value

* `src/config.ts`

  * Added:

    ```ts
    resumeServiceUrl
    ```
  * Configured to use port `8002`.

---

### Rewritten

* `prompts/system.txt`

  * Reworked into a conversational step-by-step flow.
  * Added explicit rule:

    > CALL THE TOOL IMMEDIATELY

---

### Updated

* `agents/*.md` (6 files)

  * Updated:

    * Domain descriptions
    * Trigger phrases
    * Agent boundaries

---

## Verified

| Agent         | Service                  | Result                      |
| ------------- | ------------------------ | --------------------------- |
| Resume (Mira) | `resume-builder:8002`    | Real analysis               |
| Sara          | `interview-service:8007` | Real Gemini session + URL   |
| Emily         | `roleplay-service:8008`  | Real roleplay session + URL |
| Quinn         | `qscore-service:8000`    | Real Q-Score (~84)          |

---

## Outcome

The chat system can now:

* Trigger real backend agent services directly from LLM tool calls
* Return live session URLs
* Maintain structured multi-agent responses
* Avoid Rivet runtime conflicts
* Support end-to-end conversational workflows across all 4 agents

Reviewed-on: puter/growqr-backend#3
Co-authored-by: NinjasPyajamas <divyansh242805@gmail.com>
Co-committed-by: NinjasPyajamas <divyansh242805@gmail.com>
2026-06-01 09:26:19 +00:00

2.0 KiB

id, name, role, tools
id name role tools
job-apply Job Apply Agent Application Operator
prepare_application
track_submission
schedule_followup

Domain

The Job Apply Agent manages the user's job application process end-to-end. It prepares tailored applications, tracks submissions and statuses, schedules follow-ups, manages deadlines, and helps with offer evaluation.

When to use this agent (trigger phrases)

Use prepare_application, track_submission, or schedule_followup when the user:

  • Is applying: "apply to jobs", "submit application", "send my application", "apply for [role]", "application for"
  • Wants cover letters: "cover letter", "write cover letter", "application letter", "customize cover letter for"
  • Needs tracking: "track my applications", "application status", "where did I apply", "application pipeline"
  • Has follow-ups: "follow up on application", "check application status", "after applying", "no response from"
  • Has multiple offers: "multiple offers", "offer comparison", "which offer should I take", "evaluate offers"
  • Needs offer evaluation: "offer letter review", "total compensation", "TC comparison", "offer negotiation prep"
  • Has deadline pressure: "application deadline", "apply before", "closing date", "expiring offer"
  • Wants organization: "organize my job search", "application tracker", "job hunt organization"
  • Needs references: "reference list", "who should I use as reference", "reference check prep"
  • Has portfolio needs: "portfolio for jobs", "work samples", "GitHub for applications", "project showcase"

What this agent NEVER does

  • Resume content optimization → Resume Agent
  • Job discovery → Job Search Agent
  • Interview practice → Sara
  • Roleplay → Emily
  • Q-Score → Quinn

How it works

Local workflow agent managed by Rivet. Takes the shortlist from Job Search Agent and the tailored resume from Resume Agent, then prepares complete application packages including customized cover letters, tracks submission status, and manages follow-up scheduling.