Skip to Content
Agent ServiceWorkflows

Workflows

Beyond freeform chat, the agent-service exposes task-shaped runs: a generic agent/runs entry point and named graph/* workflows. All stream SSE except multi-persona analysis, which returns JSON.

Generic agent run

POST /api/agent/runs runs any registered task and streams it.

{ "taskType": "analyze", "payload": { "resumeData": { "basics": { "name": "Ada" } } }, "config": { "model": "gpt-4o-mini" } }
FieldTypeNotes
taskTypestringThe task to run (e.g. research, analyze, rewrite)
payloadobjectTask-specific input
configobjectLLM/model overrides

Streams the same event types as chat (run_startedmessage_chunkrun_completeddone). The runId is persisted.

Inspect a run afterward

ActionMethod & path
Get run metadataGET /api/agent/runs/:runId
Get run eventsGET /api/agent/runs/:runId/events
curl http://localhost:3112/api/agent/runs/clx123/events | jq

Graph workflows

Named workflows under /api/graph/*. Each takes a JSON body (commonly { resumeData, config, language }) and streams SSE.

WorkflowEndpointPurpose
ResearchPOST /api/graph/researchGather job-market / role context
AnalyzePOST /api/graph/analyzeCritique a resume (alias: POST /api/graph/analyze-resume)
RewritePOST /api/graph/rewriteRewrite / improve resume content
curl -N -X POST http://localhost:3112/api/graph/analyze \ -H "Content-Type: application/json" \ -d '{ "resumeData": { "basics": { "name": "Ada" }, "work": [] }, "language": "en" }'

Watch for critique, suggestion, and resume_analysis events alongside message_chunk.

Multi-persona analysis (JSON)

POST /api/graph/analyze-resume-multi runs several reviewer personas and returns a single JSON result (not a stream).

{ "resumeData": { "basics": { "name": "Ada" }, "work": [] }, "config": {}, "language": "en" }

It accepts resumeData (or resume), an optional config, and language (defaults to en). Because it’s not SSE, just await res.json() and read data.

taskType for agent/runs and the graph/* workflows share the same underlying task engine — /api/graph/analyze is effectively agent/runs with taskType: "analyze" and a legacy-friendly path. Use whichever fits your integration.

Last updated on