Complete API documentation for programmatic access to Agentwise's orchestration system.
Primary interfaces for interacting with the Agentwise system.
Create, manage, and monitor projects
interface ProjectManager {
createProject(name: string, spec: ProjectSpec): Promise<Project>
getProject(id: string): Promise<Project>
listProjects(): Promise<Project[]>
deleteProject(id: string): Promise<void>
}
Control and monitor AI agents
interface AgentOrchestrator {
launchAgents(agents: Agent[], task: Task): Promise<void>
monitorProgress(): Observable<Progress>
getAgentStatus(agentId: string): AgentStatus
terminateAgent(agentId: string): Promise<void>
}
Distribute and manage tasks across agents
interface TaskDistributor {
distributeTask(task: Task, agents: Agent[]): Promise<void>
getTaskStatus(taskId: string): TaskStatus
cancelTask(taskId: string): Promise<void>
prioritizeTask(taskId: string, priority: number): Promise<void>
}
HTTP endpoints for RESTful API access.
/api/status
/api/agents
/api/projects
/api/metrics
/api/agents/launch
/api/tasks/create
/api/projects/:id
/api/tasks/:id
Real-time event streaming for live updates.
const ws = new WebSocket('ws://localhost:3001')
ws.on('connect', () => {
console.log('Connected to Agentwise')
})
ws.on('message', (data) => {
const event = JSON.parse(data)
console.log('Event:', event.type, event.payload)
})
ws.on('error', (error) => {
console.error('WebSocket error:', error)
})
agent:start
Agent begins execution
{ agentId, taskId, timestamp }
agent:progress
Progress update from agent
{ agentId, progress, message }
agent:complete
Agent completes task
{ agentId, taskId, result }
agent:error
Error during execution
{ agentId, error, stack }
task:created
New task created
{ taskId, type, priority }
task:completed
Task fully completed
{ taskId, duration, status }
Interface for 61+ MCP servers providing extended functionality
interface MCPServer {
name: string
version: string
tools: Tool[]
resources: Resource[]
// Connection management
connect(config: MCPConfig): Promise<void>
disconnect(): Promise<void>
// Tool execution
execute(tool: string, params: any): Promise<any>
// Resource access
getResource(uri: string): Promise<Resource>
listResources(): Promise<Resource[]>
}
Standardized error codes and handling strategies.