diff --git a/tests/apis/agents/agents.http b/tests/apis/agents/agents.http new file mode 100644 index 0000000000..679bf64ea5 --- /dev/null +++ b/tests/apis/agents/agents.http @@ -0,0 +1,55 @@ +@host=http://localhost:23333 +@token=cs-sk-af798ed4-7cf5-4fd7-ae4b-df203b164194 + +### List Agents +GET {{host}}/v1/agents +Authorization: Bearer {{token}} + + +### Create Agent +POST {{host}}/v1/agents +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "name": "Claude Code", + "type": "claude-code", + "model": "anthropic:claude-sonnet-4", + "description": "An AI assistant specialized in code review and debugging", + "avatar": "https://example.com/avatar.png", + "instructions": "You are a helpful coding assistant. Focus on writing clean, maintainable code and providing constructive feedback.", + "accessible_paths": [ + "/tmp/workspace" + ], + "permission_mode": "acceptEdits", + "max_steps": 10 +} + +### Get Agent Details +GET {{host}}/v1/agents/agent_1757663884173_4tyeh3vqq +Authorization: Bearer {{token}} +Content-Type: application/json + +### Delete Agent +DELETE {{host}}/v1/agents/agent_1757663884173 +Authorization: Bearer {{token}} +Content-Type: application/json + +### Update Agent +PATCH {{host}}/v1/agents/agent_1757663884173 +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "name": "Claude Code", + "model": "anthropic:claude-sonnet-4", + "description": "An AI assistant specialized in code review and debugging", + "avatar": "https://example.com/avatar.png", + "instructions": "You are a helpful coding assistant. Focus on writing clean, maintainable code and providing constructive feedback.", + "accessible_paths": [ + "/tmp/workspace" + ], + "permission_mode": "acceptEdits", + "max_steps": 10 +} + diff --git a/tests/apis/agents/sessions.http b/tests/apis/agents/sessions.http new file mode 100644 index 0000000000..152e8e022c --- /dev/null +++ b/tests/apis/agents/sessions.http @@ -0,0 +1,40 @@ + +@host=http://localhost:23333 +@token=cs-sk-af798ed4-7cf5-4fd7-ae4b-df203b164194 +@agent_id=agent_1757663884173_4tyeh3vqq + +### List Sessions +GET {{host}}/v1/agents/{{agent_id}}/sessions +Authorization: Bearer {{token}} +Content-Type: application/json + + +### Create Session +POST {{host}}/v1/agents/{{agent_id}}/sessions +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "name": "Code Review Session", + "user_goal": "Review the newly implemented feature for bugs and improvements" +} + +### Get Session Details +GET {{host}}/v1/agents/{{agent_id}}/sessions/session_1757815281790_q4yxgdk74 +Authorization: Bearer {{token}} +Content-Type: application/json + +### Delete Session +DELETE {{host}}/v1/agents/{{agent_id}}/sessions/session_1757815245456_tfs6oogl0 +Authorization: Bearer {{token}} +Content-Type: application/json + +### Update Session +PUT {{host}}/v1/agents/{{agent_id}}/sessions/session_1757815281790_q4yxgdk74 +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "name": "Code Review Session 1", + "user_goal": "Review the newly implemented feature for bugs and improvements" +}