-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Bug Description
The AutoMagik Hive integration in automagik_spark/core/workflows/automagik_hive.py
is using deprecated Agno v1 Playground endpoints that no longer exist in the current Hive implementation.
AutoMagik Hive has migrated from Agno v1 Playground to Agno v2 AgentOS, but Spark's integration code still references the old /playground/*
routes.
Steps to Reproduce
-
Review
automagik_spark/core/workflows/automagik_hive.py
-
Observe usage of deprecated endpoints:
/playground/status
(lines 98-124)/playground/agents
(line 148)/playground/teams
(line 198)/playground/workflows
(line 249)/playground/agents/{id}/runs
(line 401)/playground/teams/{id}/runs
(line 428)/playground/workflows/{id}/runs
(line 466)
-
Check Hive's actual API implementation in
automagik-hive/api/serve.py
-
Observe that AgentOS auto-generates routes without
/playground/
prefix
Expected Behavior
Spark should use the current AgentOS v2 endpoints:
- ✅
/api/v1/health
- Health check (exists inapi/routes/health.py
) - ✅
/agents
- List/manage agents - ✅
/teams
- List/manage teams - ✅
/workflows
- List/manage workflows - ✅
/agents/{id}/runs
- Execute agent - ✅
/teams/{id}/runs
- Execute team - ✅
/workflows/{id}/runs
- Execute workflow
Actual Behavior
Spark attempts to call deprecated /playground/*
endpoints that don't exist, causing integration failures.
Environment
- Affected File:
automagik_spark/core/workflows/automagik_hive.py
- Test File:
tests/core/workflows/test_automagik_hive.py
- AutoMagik Hive Version: Agno v2 (AgentOS)
- AutoMagik Spark Version: 0.2.2
Impact
High - Hive integration is currently broken due to endpoint mismatch
Required Changes
1. Update Endpoint URLs (Simple Find/Replace)
# BEFORE (Deprecated)
/playground/agents → /agents
/playground/teams → /teams
/playground/workflows → /workflows
/playground/agents/{id}/runs → /agents/{id}/runs
/playground/teams/{id}/runs → /teams/{id}/runs
/playground/workflows/{id}/runs → /workflows/{id}/runs
2. Fix Health/Status Check (Lines 88-136)
# BEFORE (Incorrect - uses config endpoint)
status_response = await client.get("/playground/status")
# AFTER (Correct - use dedicated health endpoint)
health_response = await client.get("/api/v1/health")
health_data = health_response.json()
# Returns: {"status": "success", "service": "Automagik Hive Multi-Agent System", ...}
Note: Do NOT use /api/v1/agentos/config
for health checks - use /api/v1/health
3. Update Tests
- Update
tests/core/workflows/test_automagik_hive.py
to mock correct endpoints - Add integration test with live Hive instance if possible
4. Verify Response Formats
- AgentOS may return slightly different response structures
- Validate that response parsing still works correctly
Affected Areas
- Hive Integration
- Workflows
- Testing
Possible Solution
- Replace all
/playground/
prefixes with/
(except health endpoint which uses/api/v1/health
) - Update
validate()
method to use proper health endpoint - Test against running Hive instance on port 8886
- Update integration tests
- Verify authentication still works (should - uses
x-api-key
header)
Additional Context
- Hive API Key: Available in
../automagik-hive/.env
asHIVE_API_KEY
- Hive Port: 8886
- Reference: Hive's
api/serve.py
lines 537-651 show AgentOS initialization - Reference: Hive's
api/routes/health.py
shows correct health endpoint