API Documentation

AI-Powered Coding Agent with GitHub Integration

Checking status...

🚀 Overview

The Vibez.now API provides a headless Claude-powered AI coding agent that can read, write, and execute code in isolated user workspaces. The agent integrates with GitHub for version control and includes an approval system for critical actions.

🤖

Claude Sonnet 4

Latest AI model

🔧

11 Agent Tools

Files, Git, Code

🔒

Isolated Workspaces

Secure per-user

🐙

GitHub Integration

Clone, commit, push

Approval System

Confirm critical actions

Multi-Step Tasks

Complex workflows

🏃 Quick Start Flow

1. Register/Login POST /api/auth/register or /login | -> Returns JWT token v 2. Save GitHub Creds POST /api/auth/github-credentials | -> Stores your GitHub PAT v 3. Chat with Agent POST /api/agent/chat | -> Agent clones, writes, commits v 4. Approve Actions POST /api/agent/approval/:requestId | -> Agent pushes to GitHub v 5. Done! Code is now on GitHub

🔑 Authentication

All endpoints (except status) require Authorization: Bearer YOUR_TOKEN

POST /api/auth/register

Create a new account

{ "email": "you@example.com", "password": "pass", "username": "Name" }

POST /api/auth/login

Login with existing credentials

{ "email": "you@example.com", "password": "pass" }

POST /api/auth/github-credentials

Save GitHub credentials for the agent

{
  "githubUsername": "your-username",
  "githubToken": "ghp_xxxx",
  "gitEmail": "you@example.com",
  "githubRepo": "username/repo-name"
}
Create a Personal Access Token at github.com/settings/tokens with repo scope.

GET /api/auth/github-credentials

Check if GitHub credentials are configured

DELETE /api/auth/github-credentials

Remove stored GitHub credentials

💬 Agent Chat

POST /api/agent/chat

Send a message to the AI coding agent

{
  "message": "Clone my repo, add index.html, commit and push",
  "context": [],        // Optional: conversation history
  "clearHistory": false // Optional: clear server history
}
Note: When the agent requests approval, the HTTP request will wait (up to 5 minutes) for you to approve/reject. Set appropriate client timeouts.

GET /api/agent/history

Get your conversation history

DELETE /api/agent/history

Clear your conversation history

GET /api/agent/status

Check agent availability (no auth required)

📋 Approval System

The agent requests approval before critical actions like git push. The chat request waits until you approve.

POST /api/agent/approval/:requestId

Approve or reject a pending action

{ "approved": true }

GET /api/agent/approvals

Get all pending approvals for your user

How it works: Agent requests approval → Notification sent → Chat waits → You call approval endpoint → Agent continues → Chat completes

🛠 Agent Tools

The agent has access to these tools in your isolated workspace:

Interactive Demo

📝 Register

🔓 Login

💻 Code Example

// 1. Login
const { token } = await fetch('/api/auth/login', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ email: 'you@example.com', password: 'pass' })
}).then(r => r.json());

// 2. Chat with agent
const { reply } = await fetch('/api/agent/chat', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${token}`
  },
  body: JSON.stringify({
    message: 'Create index.html with Hello World, commit and push'
  })
}).then(r => r.json());

console.log(reply);