{"openapi":"3.1.0","info":{"title":"Agent API","description":"FastAPI service for GitHub repository search and agent sandbox orchestration.","version":"0.1.0"},"paths":{"/repositories/top-starred":{"get":{"tags":["repositories"],"summary":"Get Top Starred Repositories","operationId":"get_top_starred_repositories_repositories_top_starred_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryListResponse"}}}}}}},"/repositories/search-by-topic":{"get":{"tags":["repositories"],"summary":"Search Repositories By Topic","operationId":"search_repositories_by_topic_repositories_search_by_topic_get","parameters":[{"name":"topic","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"GitHub repository topic","title":"Topic"},"description":"GitHub repository topic"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum returned repositories","default":30,"title":"Limit"},"description":"Maximum returned repositories"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repositories/search":{"get":{"tags":["repositories"],"summary":"Search Repositories By Keyword","operationId":"search_repositories_by_keyword_repositories_search_get","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"GitHub repository keyword query","title":"Query"},"description":"GitHub repository keyword query"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum returned repositories","default":30,"title":"Limit"},"description":"Maximum returned repositories"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeywordSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/sms/send":{"post":{"tags":["auth"],"summary":"Send Sms Code","operationId":"send_sms_code_auth_sms_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendSmsCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendSmsCodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/sms/login":{"post":{"tags":["auth"],"summary":"Sms Login","operationId":"sms_login_auth_sms_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsLoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/me":{"get":{"tags":["auth"],"summary":"Get Me","operationId":"get_me_auth_me_get","parameters":[{"name":"agent_auth","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Auth"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_auth_logout_post","parameters":[{"name":"agent_auth","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Auth"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/sessions":{"post":{"tags":["agent"],"summary":"Create Session","operationId":"create_session_agent_sessions_post","parameters":[{"name":"agent_auth","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Auth"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSession"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["agent"],"summary":"List Sessions","operationId":"list_sessions_agent_sessions_get","parameters":[{"name":"agent_auth","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Auth"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/sessions/{session_id}":{"get":{"tags":["agent"],"summary":"Get Session","operationId":"get_session_agent_sessions__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"agent_auth","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Auth"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSession"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agent"],"summary":"Delete Session","operationId":"delete_session_agent_sessions__session_id__delete","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"agent_auth","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Auth"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/sessions/{session_id}/messages":{"get":{"tags":["agent"],"summary":"List Messages","operationId":"list_messages_agent_sessions__session_id__messages_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"agent_auth","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Auth"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentMessageListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agent"],"summary":"Send Message","operationId":"send_message_agent_sessions__session_id__messages_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"agent_auth","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Auth"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/skills":{"get":{"tags":["agent"],"summary":"List Skills","operationId":"list_skills_agent_skills_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillListResponse"}}}}}}},"/agent/skill-hub/search":{"post":{"tags":["agent"],"summary":"Search Skill Hub","operationId":"search_skill_hub_agent_skill_hub_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillHubSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Search Skill Hub Agent Skill Hub Search Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/skill-hub/find":{"post":{"tags":["agent"],"summary":"Find Skill Hub","operationId":"find_skill_hub_agent_skill_hub_find_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillHubSkillRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Find Skill Hub Agent Skill Hub Find Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/skill-hub/markdown":{"post":{"tags":["agent"],"summary":"Get Skill Hub Markdown","operationId":"get_skill_hub_markdown_agent_skill_hub_markdown_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillHubSkillRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Skill Hub Markdown Agent Skill Hub Markdown Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/sessions/{session_id}/messages/stream":{"post":{"tags":["agent"],"summary":"Stream Message","operationId":"stream_message_agent_sessions__session_id__messages_stream_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"agent_auth","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Auth"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Check Health Get"}}}}}}}},"components":{"schemas":{"AgentMessage":{"properties":{"id":{"type":"string","title":"Id"},"session_id":{"type":"string","title":"Session Id"},"role":{"type":"string","enum":["user","assistant","tool"],"title":"Role"},"content":{"type":"string","title":"Content"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"token_usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Token Usage"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["id","session_id","role","content","created_at"],"title":"AgentMessage"},"AgentMessageListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AgentMessage"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"AgentMessageListResponse"},"AgentSession":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"status":{"type":"string","enum":["active","closed","error"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"sandbox":{"anyOf":[{"$ref":"#/components/schemas/SandboxInfo"},{"type":"null"}]}},"type":"object","required":["id","title","status","created_at","updated_at"],"title":"AgentSession"},"AgentSessionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AgentSession"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"AgentSessionListResponse"},"CreateSessionRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","title":"CreateSessionRequest"},"CurrentUser":{"properties":{"id":{"type":"string","title":"Id"},"phone":{"type":"string","title":"Phone"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"}},"type":"object","required":["id","phone","created_at","updated_at"],"title":"CurrentUser"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KeywordSearchResponse":{"properties":{"total":{"type":"integer","title":"Total"},"items":{"items":{"$ref":"#/components/schemas/RepositoryItem"},"type":"array","title":"Items"},"query":{"type":"string","title":"Query"}},"type":"object","required":["total","items","query"],"title":"KeywordSearchResponse"},"RepositoryItem":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"full_name":{"type":"string","title":"Full Name"},"html_url":{"type":"string","title":"Html Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"stargazers_count":{"type":"integer","title":"Stargazers Count"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"topics":{"items":{"type":"string"},"type":"array","title":"Topics"},"owner":{"$ref":"#/components/schemas/RepositoryOwner"},"owner_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Location"},"region_guess":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region Guess"}},"type":"object","required":["id","name","full_name","html_url","stargazers_count","owner"],"title":"RepositoryItem"},"RepositoryListResponse":{"properties":{"total":{"type":"integer","title":"Total"},"items":{"items":{"$ref":"#/components/schemas/RepositoryItem"},"type":"array","title":"Items"}},"type":"object","required":["total","items"],"title":"RepositoryListResponse"},"RepositoryOwner":{"properties":{"login":{"type":"string","title":"Login"}},"type":"object","required":["login"],"title":"RepositoryOwner"},"SandboxInfo":{"properties":{"session_id":{"type":"string","title":"Session Id"},"container_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container Id"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"status":{"type":"string","enum":["creating","running","stopped","error"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["session_id","container_id","base_url","status","created_at"],"title":"SandboxInfo"},"SendMessageRequest":{"properties":{"content":{"type":"string","minLength":1,"title":"Content"},"requested_skills":{"items":{"type":"string"},"type":"array","title":"Requested Skills"},"deep_think":{"type":"boolean","title":"Deep Think","default":false}},"type":"object","required":["content"],"title":"SendMessageRequest"},"SendMessageResponse":{"properties":{"message":{"$ref":"#/components/schemas/AgentMessage"},"tool_calls":{"items":{"$ref":"#/components/schemas/ToolCallPayload"},"type":"array","title":"Tool Calls"},"tool_results":{"items":{"$ref":"#/components/schemas/ToolResultPayload"},"type":"array","title":"Tool Results"},"requested_skills":{"items":{"type":"string"},"type":"array","title":"Requested Skills"},"loaded_skills":{"items":{"type":"string"},"type":"array","title":"Loaded Skills"},"loaded_references":{"items":{"type":"string"},"type":"array","title":"Loaded References"},"thought_trace":{"items":{"type":"string"},"type":"array","title":"Thought Trace"},"session_status":{"type":"string","enum":["active","closed","error"],"title":"Session Status"}},"type":"object","required":["message","session_status"],"title":"SendMessageResponse"},"SendSmsCodeRequest":{"properties":{"phone":{"type":"string","maxLength":20,"minLength":11,"title":"Phone"}},"type":"object","required":["phone"],"title":"SendSmsCodeRequest"},"SendSmsCodeResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true}},"type":"object","title":"SendSmsCodeResponse"},"SkillHubSearchRequest":{"properties":{"query":{"type":"string","title":"Query","default":""},"page":{"type":"integer","minimum":1.0,"title":"Page","default":1}},"type":"object","title":"SkillHubSearchRequest"},"SkillHubSkillRequest":{"properties":{"id":{"type":"string","title":"Id"}},"type":"object","required":["id"],"title":"SkillHubSkillRequest"},"SkillListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SkillSummary"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"SkillListResponse"},"SkillSummary":{"properties":{"name":{"type":"string","title":"Name"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"references":{"items":{"type":"string"},"type":"array","title":"References"}},"type":"object","required":["name","title","description"],"title":"SkillSummary"},"SmsLoginRequest":{"properties":{"phone":{"type":"string","maxLength":20,"minLength":11,"title":"Phone"},"code":{"type":"string","maxLength":10,"minLength":4,"title":"Code"}},"type":"object","required":["phone","code"],"title":"SmsLoginRequest"},"SmsLoginResponse":{"properties":{"user":{"$ref":"#/components/schemas/CurrentUser"}},"type":"object","required":["user"],"title":"SmsLoginResponse"},"ToolCallPayload":{"properties":{"tool":{"type":"string","title":"Tool"},"input":{"additionalProperties":true,"type":"object","title":"Input"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id"}},"type":"object","required":["tool"],"title":"ToolCallPayload"},"ToolResultPayload":{"properties":{"tool":{"type":"string","title":"Tool"},"ok":{"type":"boolean","title":"Ok"},"output":{"additionalProperties":true,"type":"object","title":"Output"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id"}},"type":"object","required":["tool","ok"],"title":"ToolResultPayload"},"TopicSearchResponse":{"properties":{"total":{"type":"integer","title":"Total"},"items":{"items":{"$ref":"#/components/schemas/RepositoryItem"},"type":"array","title":"Items"},"topic":{"type":"string","title":"Topic"}},"type":"object","required":["total","items","topic"],"title":"TopicSearchResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}