Skip to main content

Clone Repository as Agent

Clones a GitHub repository and registers it as an agent on the Nasiko platform.

POST /api/v1/github/clone — 🔒 Requires Auth

Request Body

FieldTypeRequiredDescription
repository_full_namestringowner/repo (e.g., octocat/my-agent)
branchstringBranch to clone (default: repo default branch)
agent_namestringOverride the agent name

Examples

curl -X POST https://nasiko.dev/api/v1/github/clone \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Content-Type: application/json" \
-d '{
"repository_full_name": "octocat/my-agent",
"branch": "main",
"agent_name": "my-agent"
}'

Response

Status: 201 Created

{
"data": {
"success": true,
"agent_name": "my-agent",
"status": "uploading",
"capabilities_generated": true,
"orchestration_triggered": true,
"version": "1.0.0"
},
"status_code": 201,
"message": "Repository cloned and agent registered"
}