# Agents

Agent related APIs

## GET /webapi/v2/agents

> 에이전트 얻기

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"agents","description":"Agent related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"AgentsResponse":{"properties":{"agents":{"items":{"$ref":"#/components/schemas/AgentResponse"},"title":"Agents","type":"array"}},"required":["agents"],"title":"AgentsResponse","type":"object"},"AgentResponse":{"properties":{"id":{"title":"Id","type":"string"},"lastName":{"title":"Lastname","type":"string"},"firstName":{"title":"Firstname","type":"string"},"email":{"title":"Email","type":"string"}},"required":["id","lastName","firstName","email"],"title":"AgentResponse","type":"object"}}},"paths":{"/webapi/v2/agents":{"get":{"operationId":"django_server_project_views_rest_agent_api_get_agents","summary":"에이전트 얻기","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"query","name":"offset","schema":{"default":0,"title":"Offset","type":"integer"},"required":false},{"in":"query","name":"limit","schema":{"default":100,"title":"Limit","type":"integer"},"required":false},{"in":"query","name":"email","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"required":false}],"responses":{"200":{"description":"알겠습니다.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentsResponse"}}}}},"tags":["agents"]}}}}
```

## GET /webapi/v2/agents/{agent\_id}

> Get Agent Detail

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"agents","description":"Agent related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"AgentResponse":{"properties":{"id":{"title":"Id","type":"string"},"lastName":{"title":"Lastname","type":"string"},"firstName":{"title":"Firstname","type":"string"},"email":{"title":"Email","type":"string"}},"required":["id","lastName","firstName","email"],"title":"AgentResponse","type":"object"}}},"paths":{"/webapi/v2/agents/{agent_id}":{"get":{"operationId":"django_server_project_views_rest_agent_api_get_agent_detail","summary":"Get Agent Detail","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"agent_id","schema":{"title":"Agent Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}}},"tags":["agents"]}}}}
```

## GET /webapi/agent\_builder/single\_action\_app\_tools

> 프로젝트의 모든 싱글액션 앱 도구를 검색하십시오.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"agents","description":"Agent related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/agent_builder/single_action_app_tools":{"get":{"tags":["agents"],"operationId":"getSingleActionAppTools","summary":"프로젝트의 모든 싱글액션 앱 도구를 검색하십시오.","responses":{"200":{"description":"싱글액션 앱 도구를 성공적으로 검색했습니다.","content":{"application/json":{"schema":{"type":"object","properties":{"tools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"도구의 고유 식별자"},"name":{"type":"string","description":"싱글액션 앱의 함수 이름. 이는 id와 접두사 \"func_\"에 의해 생성됩니다."},"display_name":{"type":"string","description":"싱글액션 앱의 표시 이름"},"description":{"type":"string","description":"싱글액션 앱에 대한 설명"},"single_action_inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"입력 필드 이름"},"type":{"type":"string","description":"입력 필드 유형(텍스트, 문단 등)"},"description":{"type":"string","description":"입력 필드 설명"}}}}}}}}}}}}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## GET /webapi/agent\_builder/single\_action\_app\_tool/{tool\_name}

> 특정 싱글액션 앱 도구를 이름으로 검색하십시오.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"agents","description":"Agent related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/agent_builder/single_action_app_tool/{tool_name}":{"get":{"tags":["agents"],"operationId":"getSingleActionAppToolByName","summary":"특정 싱글액션 앱 도구를 이름으로 검색하십시오.","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"name":"tool_name","in":"path","required":true,"schema":{"type":"string"},"description":"Name of the tool to retrieve"},{"name":"tool_name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"싱글액션 앱 도구를 성공적으로 검색했습니다.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"작업이 성공했는지 여부를 나타냅니다."},"tool":{"type":"object","properties":{"id":{"type":"string","description":"도구의 고유 식별자"},"name":{"type":"string","description":"싱글액션 앱의 함수 이름. ID와 접두사 \"func_\"에 의해 생성됩니다."},"display_name":{"type":"string","description":"싱글액션 앱의 표시 이름"},"description":{"type":"string","description":"싱글액션 앱이 수행하는 작업에 대한 설명"},"single_action_inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"입력 필드 이름"},"type":{"type":"string","description":"입력 필드 유형 (텍스트, 문단 등)"},"description":{"type":"string","description":"입력 필드 설명"}}}}}}}}}}},"404":{"description":"도구를 찾을 수 없습니다.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}}}}}}}
```

## GET /webapi/agent\_builder/agent\_tools

> Retrieve all agent tools for the project

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"agents","description":"Agent related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/agent_builder/agent_tools":{"get":{"tags":["agents"],"operationId":"getAgentTools","summary":"Retrieve all agent tools for the project","responses":{"200":{"description":"Successfully retrieved agent tools","content":{"application/json":{"schema":{"type":"object","properties":{"tools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the agent"},"name":{"type":"string","description":"The function name of the agent. it is generated by id and prefix \"func_\""},"display_name":{"type":"string","description":"The display name of the agent"},"description":{"type":"string","description":"Description of what the agent does"},"project_id":{"type":"string","description":"The project ID"},"published":{"type":"boolean","description":"Whether the agent is published"},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Variable name"},"type":{"type":"string","description":"Variable type (string, integer, etc.)"},"description":{"type":"string","description":"Description of the variable"},"required":{"type":"boolean","description":"Whether the variable is required"}}}}}}}}}}}}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## GET /webapi/agent\_builder/agent\_tool/{tool\_name}

> Retrieve a specific agent tool by its name

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"agents","description":"Agent related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/agent_builder/agent_tool/{tool_name}":{"get":{"tags":["agents"],"operationId":"getAgentToolByName","summary":"Retrieve a specific agent tool by its name","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"name":"tool_name","in":"path","required":true,"schema":{"type":"string"},"description":"Name of the agent tool to retrieve"},{"name":"tool_name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved the agent tool","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the operation was successful"},"tool":{"type":"object","description":"The agent tool data"}}}}}},"404":{"description":"Agent tool not found"}}}}}}
```

## Retrieve OAuth2 information by state

> Get OAuth2 configuration information for an AI agent using the OAuth state parameter

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"agents","description":"Agent related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/agent_builder/oauth2_information":{"post":{"tags":["agents"],"operationId":"getOauth2Information","summary":"Retrieve OAuth2 information by state","description":"Get OAuth2 configuration information for an AI agent using the OAuth state parameter","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","description":"OAuth2 state parameter to identify the OAuth configuration"}},"required":["state"]}}}},"responses":{"200":{"description":"Successfully retrieved OAuth2 information","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the operation was successful"},"oauth2_info":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the OAuth2 information"},"hub_id":{"type":"string","description":"Hub identifier"},"configuration_name":{"type":"string","description":"Name of the OAuth2 configuration"},"authorization_url":{"type":"string","description":"OAuth2 authorization URL"},"token_url":{"type":"string","description":"OAuth2 token URL"},"client_id":{"type":"string","description":"OAuth2 client ID"},"client_secret":{"type":"string","description":"OAuth2 client secret"},"scope":{"type":"array","items":{"type":"string"},"description":"OAuth2 scopes"},"redirect_uri":{"type":"string","description":"OAuth2 redirect URI"},"place_access_token":{"type":"string","description":"Where to place access token"},"place_expires_in":{"type":"string","description":"Where to place expires_in value"},"place_refresh_token":{"type":"string","description":"Where to place refresh token"},"place_token_type":{"type":"string","description":"Where to place token type"},"headers":{"type":"object","description":"Additional headers configuration"},"additional":{"type":"object","description":"Additional configuration data"},"token_info":{"type":"object","description":"Current token information"},"token_generated":{"type":"number","description":"Token generation timestamp"},"state":{"type":"string","description":"OAuth2 state parameter"},"code_verifier":{"type":"string","description":"PKCE code verifier"}}}}}}}},"400":{"description":"Bad request - invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}},"404":{"description":"OAuth2 information not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## Update OAuth2 token information

> Update OAuth2 token information (tokenInfo and tokenGenerated) for an existing OAuth configuration

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"agents","description":"Agent related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/agent_builder/oauth2_information/update":{"post":{"tags":["agents"],"operationId":"updateOauth2Information","summary":"Update OAuth2 token information","description":"Update OAuth2 token information (tokenInfo and tokenGenerated) for an existing OAuth configuration","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","description":"OAuth2 state parameter to identify the OAuth configuration"},"tokenInfo":{"type":"object","description":"Updated token information"},"tokenGenerated":{"type":"number","description":"Timestamp when the token was generated"}},"required":["state"]}}}},"responses":{"200":{"description":"Successfully updated OAuth2 information","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the operation was successful"}}}}}},"400":{"description":"Bad request - invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}},"404":{"description":"OAuth2 information not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## 에이전트 관리

> 프로젝트에서 에이전트를 생성 및 삭제하는 데 사용됨

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"agents","description":"Agent related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/agent_management":{"post":{"tags":["agents"],"operationId":"editAgents","summary":"에이전트 관리","description":"프로젝트에서 에이전트를 생성 및 삭제하는 데 사용됨","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"생성하거나 삭제하려는 에이전트의 이메일"},"deleteFlag":{"type":"boolean","description":"에이전트를 삭제하려면 True, 생성하려면 False"},"password":{"type":"string","description":"새 에이전트를 만들 때 필요합니다. 비밀번호는 유효해야 합니다 (소문자, 대문자, 숫자, 비알파벳 문자 중 4개 중 3개를 포함해야 함)."},"locale":{"type":"string","description":"생성 중인 계정의 언어 설정. 두 글자 ISO 639-1 코드를 사용해 주세요."},"permission_group_id":{"type":"string","description":"에이전트에게 할당할 권한 그룹의 ID"},"permission_group_name":{"type":"string","description":"에이전트에게 할당할 권한 그룹 이름"}}}}}},"responses":{"200":{"description":"에이전트가 성공적으로 수정되었습니다.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"string","description":"삭제/생성된 에이전트의 ID"},"status":{"type":"string","description":"무슨 일이 일어났나요 (삭제됨 또는 생성됨)"}}}}}}}},"400":{"description":"잘못된 매개변수","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"string","description":"생성하려는 에이전트에 이미 등록된 이메일이 있는 경우"}}}}}},"404":{"description":"에이전트를 찾을 수 없습니다.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"string","description":"존재하지 않는 에이전트를 삭제하려고 하면"}}}}}}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```
