API Quick Reference
Complete documentation for the EVE AI API endpoints
https://eveaicore.com
💬 Chat & Communication
Send a message to EVE and receive a response
WebSocket for real-time bidirectional communication
Server-Sent Events for consciousness updates
Retrieve historical events with pagination
🔒 Authentication
Register a new user account
Login and receive JWT token
Refresh an expired access token
Get current user profile
📈 Analytics NEW
Get dashboard metrics overview
Consciousness level metrics over time
Emotional state trends and patterns
Memory usage and consolidation stats
Goal completion and progress metrics
AI-generated insights and recommendations
🗃 Memory Search & Export
Search across working, episodic, and semantic memories
Get memory system statistics
Export memories in JSON, CSV, JSONL, or gzip
Get memory timeline visualization data
💡 Governance & System
Get current consciousness state and metrics
Get overall system status
Get all system metrics (JSON)
Kubernetes liveness probe
🎯 Goals & Autonomy
List all goals with status
Create a new goal for EVE
Get specific goal details
Cancel or remove a goal
🛠 Admin / Audit Logs
Query audit logs with filters
Export audit logs to JSON or CSV
Code Examples
Ready-to-use code snippets for common API operations
Send a Chat Message
// Send a message to EVE
const response = await fetch('/api/chat', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ message: 'Hello EVE!' })
});
const data = await response.json();
console.log(data.response);
WebSocket Connection
// Connect to EVE via WebSocket
const ws = new WebSocket('wss://eveaicore.com/ws');
ws.onopen = () => {
console.log('Connected to EVE');
ws.send(JSON.stringify({
type: 'chat',
message: 'Hello!'
}));
};
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log('EVE:', data.message);
};
Authentication Flow
// 1. Register a new account
const registerResponse = await fetch('/api/auth/register', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email: '[email protected]',
username: 'myuser',
password: 'securepass123'
})
});
// 2. Login to get tokens
const loginResponse = await fetch('/api/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email: '[email protected]',
password: 'securepass123'
})
});
const { token } = await loginResponse.json();
// 3. Use token for authenticated requests
const meResponse = await fetch('/api/auth/me', {
headers: { 'Authorization': `Bearer ${token}` }
});
Subscribe to Events (SSE)
// Listen for real-time governance updates
const eventSource = new EventSource('/api/events/stream');
eventSource.onmessage = (event) => {
const data = JSON.parse(event.data);
switch (data.type) {
case 'governance_update':
updateGovernanceDisplay(data.level);
break;
case 'emotion_change':
updateEmotionDisplay(data.emotion);
break;
}
};
eventSource.onerror = () => {
console.log('Connection lost, reconnecting...');
};