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:
From outside the app (REST-style), batch queries via GET:
agent4 endpointsagent.listAll 9 agents with task counts and status
Input
noneReturns
Agent[]agent.getByIdSingle agent with tasks and activity
Input
{ id: string }Returns
Agentagent.updateStatusSet agent status: IDLE | WORKING | PAUSED | ERROR
Input
{ id, status: AgentStatus }Returns
Agentagent.toggleCronEnable or disable an agent's cron schedule
Input
{ id, enabled: boolean }Returns
Agentproject5 endpointsproject.listAll projects owned by current user
Input
noneReturns
Project[]project.getByIdProject with full task list and agent details
Input
{ id: string }Returns
Project + tasksproject.createCreate a new project, starts at Step 1
Input
{ name, niche, description? }Returns
Projectproject.updateUpdate project name, niche, or advance the current step
Input
{ id, name?, niche?, step? }Returns
Projectproject.deleteDelete project and cascade-delete all tasks, meetings, decisions
Input
{ id: string }Returns
{ success }task4 endpointstask.listTasks filtered by project
Input
{ projectId? }Returns
Task[]task.createCreate a new task in a project
Input
{ title, projectId, phase, agentId?, gregStep?, priority? }Returns
Tasktask.updateStatusMove task through: INBOX → ASSIGNED → IN_PROGRESS → TESTING → REVIEW → DONE
Input
{ id, status: TaskStatus }Returns
Tasktask.submitAdversaryReviewAttach Adversary critique and risk score (1-10) to a task
Input
{ id, review, risk: number }Returns
Taskmeeting7 endpointsmeeting.listAll meetings, optionally filtered by project
Input
{ projectId? }Returns
BoardMeeting[]meeting.getByIdFull meeting with all presentations
Input
{ id: string }Returns
BoardMeeting + presentationsmeeting.createOpen a new board meeting (starts as PRESENTING)
Input
{ title, question, projectId, gregStep? }Returns
BoardMeetingmeeting.addPresentationSubmit an agent's analysis to the meeting
Input
{ meetingId, agentId, content }Returns
Presentationmeeting.submitCritiqueSubmit Adversary critique, advances to SYNTHESIZING
Input
{ meetingId, criticReview }Returns
BoardMeetingmeeting.submitSynthesisSubmit unified synthesis, advances to DECIDING
Input
{ meetingId, synthesis }Returns
BoardMeetingmeeting.decideRecord CEO decision, saves ProjectDecision, closes meeting
Input
{ meetingId, finalDecision }Returns
BoardMeetingrun5 endpointsrun.statusCheck if Alibaba API key is configured
Input
noneReturns
{ configured, provider, baseURL }run.taskExecute a task using the assigned agent's AI model
Input
{ taskId, agentName, taskTitle, projectName, projectNiche, ... }Returns
{ content, model, complexity }run.boardMeetingRun AI presentations for all selected agents
Input
{ meetingId, agentNames: string[] }Returns
{ presentations }run.boardCritiqueRun Adversary AI critique on all presentations
Input
{ meetingId }Returns
{ critique, model }run.adversaryDailyRun Adversary's daily project review
Input
{ projectId }Returns
{ critique, tasksReviewed }activity2 endpointsactivity.listRecent agent activity, used by Live Feed
Input
{ limit?, agentId? }Returns
Activity[]activity.createLog an activity event
Input
{ type, message, agentId?, taskId?, metadata? }Returns
Activityuser2 endpointsuser.meReturns the first ADMIN user (used for project creation)
Input
noneReturns
Useruser.updateUpdate user profile
Input
{ id, name?, email? }Returns
UserData Models
AgentStatusTaskStatusPriorityPhaseMeetingStatusDeliverableType