Reference

API Reference

AgentCo uses tRPC v11 for all API communication — fully type-safe from server to client. All endpoints are available at /api/trpc/[procedure].

Using the API

From within the Next.js app (React components), use the tRPC hooks:

import { trpc } from "@/lib/trpc/client"; // Query const { data: agents } = trpc.agent.list.useQuery(); // Mutation const runTask = trpc.run.task.useMutation({ onSuccess: (data) => console.log(data.content), }); runTask.mutate({ taskId: "...", agentName: "Scout", ... });

From outside the app (REST-style), batch queries via GET:

GET /api/trpc/agent.list?batch=1&input={}
agent4 endpoints
GETagent.list

All 9 agents with task counts and status

Input

none

Returns

Agent[]
GETagent.getById

Single agent with tasks and activity

Input

{ id: string }

Returns

Agent
POSTagent.updateStatus

Set agent status: IDLE | WORKING | PAUSED | ERROR

Input

{ id, status: AgentStatus }

Returns

Agent
POSTagent.toggleCron

Enable or disable an agent's cron schedule

Input

{ id, enabled: boolean }

Returns

Agent
project5 endpoints
GETproject.list

All projects owned by current user

Input

none

Returns

Project[]
GETproject.getById

Project with full task list and agent details

Input

{ id: string }

Returns

Project + tasks
POSTproject.create

Create a new project, starts at Step 1

Input

{ name, niche, description? }

Returns

Project
POSTproject.update

Update project name, niche, or advance the current step

Input

{ id, name?, niche?, step? }

Returns

Project
POSTproject.delete

Delete project and cascade-delete all tasks, meetings, decisions

Input

{ id: string }

Returns

{ success }
task4 endpoints
GETtask.list

Tasks filtered by project

Input

{ projectId? }

Returns

Task[]
POSTtask.create

Create a new task in a project

Input

{ title, projectId, phase, agentId?, gregStep?, priority? }

Returns

Task
POSTtask.updateStatus

Move task through: INBOX → ASSIGNED → IN_PROGRESS → TESTING → REVIEW → DONE

Input

{ id, status: TaskStatus }

Returns

Task
POSTtask.submitAdversaryReview

Attach Adversary critique and risk score (1-10) to a task

Input

{ id, review, risk: number }

Returns

Task
meeting7 endpoints
GETmeeting.list

All meetings, optionally filtered by project

Input

{ projectId? }

Returns

BoardMeeting[]
GETmeeting.getById

Full meeting with all presentations

Input

{ id: string }

Returns

BoardMeeting + presentations
POSTmeeting.create

Open a new board meeting (starts as PRESENTING)

Input

{ title, question, projectId, gregStep? }

Returns

BoardMeeting
POSTmeeting.addPresentation

Submit an agent's analysis to the meeting

Input

{ meetingId, agentId, content }

Returns

Presentation
POSTmeeting.submitCritique

Submit Adversary critique, advances to SYNTHESIZING

Input

{ meetingId, criticReview }

Returns

BoardMeeting
POSTmeeting.submitSynthesis

Submit unified synthesis, advances to DECIDING

Input

{ meetingId, synthesis }

Returns

BoardMeeting
POSTmeeting.decide

Record CEO decision, saves ProjectDecision, closes meeting

Input

{ meetingId, finalDecision }

Returns

BoardMeeting
run5 endpoints
GETrun.status

Check if Alibaba API key is configured

Input

none

Returns

{ configured, provider, baseURL }
POSTrun.task

Execute a task using the assigned agent's AI model

Input

{ taskId, agentName, taskTitle, projectName, projectNiche, ... }

Returns

{ content, model, complexity }
POSTrun.boardMeeting

Run AI presentations for all selected agents

Input

{ meetingId, agentNames: string[] }

Returns

{ presentations }
POSTrun.boardCritique

Run Adversary AI critique on all presentations

Input

{ meetingId }

Returns

{ critique, model }
POSTrun.adversaryDaily

Run Adversary's daily project review

Input

{ projectId }

Returns

{ critique, tasksReviewed }
activity2 endpoints
GETactivity.list

Recent agent activity, used by Live Feed

Input

{ limit?, agentId? }

Returns

Activity[]
POSTactivity.create

Log an activity event

Input

{ type, message, agentId?, taskId?, metadata? }

Returns

Activity
user2 endpoints
GETuser.me

Returns the first ADMIN user (used for project creation)

Input

none

Returns

User
POSTuser.update

Update user profile

Input

{ id, name?, email? }

Returns

User

Data Models

AgentStatus
IDLEWORKINGPAUSEDERROR
TaskStatus
INBOXASSIGNEDIN_PROGRESSTESTINGREVIEWDONE
Priority
LOWMEDIUMHIGHCRITICAL
Phase
DISCOVERYAUDIENCEBUILDSCALE
MeetingStatus
PRESENTINGCRITIQUINGSYNTHESIZINGDECIDINGCLOSED
DeliverableType
FILEREPORTCODEDESIGNDOCUMENT