API Reference¶
MCP tools and REST API endpoints.
MCP Tools¶
Semantic Analysis¶
| Tool | Description |
|---|---|
heartbeat | Connection health monitoring |
test_connection | Server connectivity verification |
determine_insights | AI-powered content analysis |
analyze_code | Code pattern and quality analysis |
analyze_repository | Repository-wide architecture analysis |
extract_patterns | Design pattern identification |
create_ukb_entity_with_insight | Knowledge base entity creation |
execute_workflow | Multi-agent workflows |
generate_documentation | Automated documentation |
create_insight_report | Detailed analysis reports |
generate_plantuml_diagrams | Architecture diagrams |
reset_analysis_checkpoint | Reset checkpoints |
refresh_entity | Refresh knowledge entity |
analyze_code_graph | AST-based code analysis |
Constraint Monitor¶
| Tool | Description |
|---|---|
check_constraints | Validate against constraints |
get_constraint_status | Current compliance metrics |
get_violation_history | Past violations |
update_constraints | Modify constraint rules |
Code Graph RAG¶
| Tool | Description |
|---|---|
index_repository | Build code graph |
query_code_graph | Natural language queries |
get_code_snippet | Retrieve source code |
surgical_replace_code | Targeted code replacement |
comprehensive_analysis | LLM-powered analysis |
REST APIs¶
Constraint Monitor API (Port 3031)¶
List Violations¶
Response:
{
"violations": [
{
"id": "uuid",
"constraintId": "no-logging-statements",
"severity": "warning",
"message": "Avoid logging statements",
"timestamp": "2025-01-15T10:30:00Z"
}
],
"total": 1
}
Log Violation¶
POST /api/violations
Content-Type: application/json
{
"constraintId": "no-logging-statements",
"severity": "warning",
"message": "Logging statement found in file.js",
"project": "coding"
}
Get Compliance¶
Response:
List Constraints¶
Health Check¶
Health Dashboard API (Port 3033)¶
Overall Health¶
Response:
{
"status": "healthy",
"services": {
"lsl": "healthy",
"ukb": "healthy",
"constraints": "healthy"
},
"uptime": 3600
}
Service Status¶
Metrics History¶
Alerts¶
VKB Server API (Port 8080)¶
List Entities¶
Get Entity¶
Search¶
Graph Data¶
Agent Integration¶
AgentAdapter Interface¶
interface AgentAdapter {
// Identification
getName(): string;
getVersion(): string;
// Capabilities
supportsMemory(): boolean;
supportsBrowser(): boolean;
supportsHooks(): boolean;
// Operations
initialize(config: AgentConfig): Promise<void>;
createMemory(key: string, value: any): Promise<void>;
searchMemory(query: string): Promise<Memory[]>;
readMemory(key: string): Promise<any>;
}
Required APIs for New Agents¶
| API | Purpose |
|---|---|
| Transcript generation | JSONL format session logs |
| Memory operations | create/search/read |
| Browser automation | navigate/act/extract |
| Hook support | PreToolUse/PostToolUse |
Integration Steps¶
- Implement
AgentAdapterinterface - Register in
agent-registry.js - Add detection in
agent-detector.js - Create launcher script
launch-{agent}.sh - Update
bin/codingrouting - Test with validation commands
Webhook Events¶
Constraint Violations¶
{
"event": "constraint.violation",
"data": {
"constraintId": "no-hardcoded-secrets",
"severity": "critical",
"project": "coding",
"blocked": true
}
}