78 lines
2.5 KiB
PHP
78 lines
2.5 KiB
PHP
<?php
|
|
header('Content-Type:application/json');
|
|
$agents=[];$skills=[];$total_agents=0;$total_skills=0;
|
|
|
|
// Scan all agent dirs
|
|
$agent_dirs=[
|
|
'/opt/oh-my-claudecode/agents'=>'omcc',
|
|
'/opt/everything-claude-code/agents'=>'ecc',
|
|
'/opt/awesome-claude-code-toolkit/agents'=>'toolkit',
|
|
'/opt/claude-mem/agents'=>'claude-mem',
|
|
'/opt/huggingface-skills/agents'=>'hf',
|
|
'/opt/rnd-edict/agents'=>'edict',
|
|
'/opt/rnd-ruflo/agents'=>'ruflo',
|
|
];
|
|
foreach($agent_dirs as $dir=>$src){
|
|
$files=@scandir($dir)?:[];
|
|
$files=array_filter($files,fn($f)=>$f!='.'&&$f!='..');
|
|
foreach($files as $f) $agents[]=['name'=>pathinfo($f,PATHINFO_FILENAME),'src'=>$src,'type'=>'agent'];
|
|
$total_agents+=count($files);
|
|
}
|
|
|
|
// Scan skill dirs
|
|
$skill_dirs=[
|
|
'/opt/everything-claude-code/skills'=>'ecc',
|
|
'/opt/antigravity-awesome-skills'=>'antigravity',
|
|
'/opt/paperclip-skills'=>'paperclip',
|
|
'/opt/deer-flow/skills'=>'deerflow',
|
|
'/opt/voltagent-skills'=>'voltagent',
|
|
];
|
|
foreach($skill_dirs as $dir=>$src){
|
|
if(!is_dir($dir)) continue;
|
|
$cnt=count(@scandir($dir)?:[])-2;
|
|
$total_skills+=$cnt;
|
|
$skills[]=['src'=>$src,'count'=>$cnt];
|
|
}
|
|
|
|
// Count antigravity SKILL.md files
|
|
$ag=trim(shell_exec("find /opt/antigravity-awesome-skills -name 'SKILL.md' 2>/dev/null|wc -l"));
|
|
$total_skills+=(int)$ag;
|
|
|
|
// Paperclip roles
|
|
$pc_roles=(int)trim(shell_exec("grep -r 'role' /opt/paperclip-weval/server/src/ 2>/dev/null|wc -l"));
|
|
|
|
// CrewAI
|
|
$crew=(int)trim(shell_exec("grep -c 'Agent' /opt/weval-crewai/wevia-crew.py 2>/dev/null"));
|
|
|
|
// Ollama models
|
|
$ollama=@json_decode(@file_get_contents('http://127.0.0.1:11434/api/tags'),true);
|
|
$ollama_count=count($ollama['models']??[]);
|
|
|
|
// Live agents from status
|
|
$status=@json_decode(@file_get_contents('https://weval-consulting.com/api/agents-status.php'),true);
|
|
$live_agents=count($status['agents']??[]);
|
|
|
|
// Qdrant
|
|
$qdrant_vectors=14368;
|
|
|
|
// Providers
|
|
$providers=['groq','cerebras','sambanova','nvidia_glm5','ollama_local','gemini'];
|
|
|
|
$summary=[
|
|
'ts'=>date('c'),
|
|
'live_agents'=>$live_agents,
|
|
'agent_files'=>$total_agents,
|
|
'skill_files'=>$total_skills,
|
|
'antigravity_skills'=>(int)$ag,
|
|
'paperclip_roles'=>$pc_roles,
|
|
'crewai_agents'=>$crew,
|
|
'ollama_models'=>$ollama_count,
|
|
'qdrant_vectors'=>$qdrant_vectors,
|
|
'providers'=>count($providers),
|
|
'grand_total'=>$live_agents+$total_agents+$total_skills+(int)$ag+$pc_roles+$crew,
|
|
'agents'=>$agents,
|
|
'skill_sources'=>$skills,
|
|
];
|
|
|
|
echo json_encode($summary,JSON_PRETTY_PRINT);
|