Skip to main content

Commits API

Create and manage semantic commits.

Create Commit

POST /api/v1/commits

Request

{
"project_id": "proj_abc123",
"conversation_id": "conv_456",
"turn_window": {
"start_turn_hash": "sha256:start...",
"end_turn_hash": "sha256:end..."
},
"message": "Initial research complete"
}

Response

{
"commit_hash": "sha256:xyz789...",
"parent_hashes": ["sha256:prev..."],
"branch": "main",
"message": "Initial research complete",
"turn_window": {...},
"facet_snapshot": {
"entities": ["Tokyo", "Kyoto"],
"keywords": ["travel", "budget"],
"topics": ["trip planning"]
},
"created_at": "2024-01-15T12:00:00Z"
}

List Commits

GET /api/v1/commits

Query Parameters

ParameterTypeDescription
project_idstringFilter by project
branchstringFilter by branch
limitintMax results
offsetintSkip results
curl "http://localhost:8000/api/v1/commits?project_id=proj_abc123&branch=main"

Get Commit

GET /api/v1/commits/{commit_hash}

Returns full commit with facet snapshot.