agentsociety.webapi.api.agent_profiles¶
Module Contents¶
Classes¶
Request model for saving agent profiles |
Functions¶
List all agent profiles for the current tenant |
|
Get agent profile data by profile ID |
|
Delete a saved agent profile |
|
Validate and process ID fields in the data. Handles three cases: |
|
Upload an agent profile file and save it to the database. |
Data¶
API¶
- agentsociety.webapi.api.agent_profiles.__all__¶
[‘router’]
- agentsociety.webapi.api.agent_profiles.router¶
‘APIRouter(…)’
- class agentsociety.webapi.api.agent_profiles.SaveProfileRequest¶
Bases:
pydantic.BaseModelRequest model for saving agent profiles
- async agentsociety.webapi.api.agent_profiles.list_agent_profiles(request: fastapi.Request) agentsociety.webapi.models.ApiResponseWrapper[List[agentsociety.webapi.models.agent_profiles.ApiAgentProfile]]¶
List all agent profiles for the current tenant
- async agentsociety.webapi.api.agent_profiles.get_agent_profile(request: fastapi.Request, profile_id: uuid.UUID) agentsociety.webapi.models.ApiResponseWrapper[List[Dict[str, Any]]]¶
Get agent profile data by profile ID
- async agentsociety.webapi.api.agent_profiles.delete_agent_profile(request: fastapi.Request, profile_id: uuid.UUID) agentsociety.webapi.models.ApiResponseWrapper[Dict[str, str]]¶
Delete a saved agent profile
- agentsociety.webapi.api.agent_profiles.validate_and_process_ids(data: List[Dict[str, Any]]) List[Dict[str, Any]]¶
Validate and process ID fields in the data. Handles three cases:
All records have IDs
No records have IDs
Some records have IDs while others don’t
Args: data: List of dictionaries containing agent profile data
Returns: List of dictionaries with validated and processed IDs
Raises: HTTPException: If invalid or duplicate IDs are found
- async agentsociety.webapi.api.agent_profiles.upload_agent_profile(request: fastapi.Request, file: fastapi.UploadFile = File(...), name: Optional[str] = Form(None), description: Optional[str] = Form(None)) agentsociety.webapi.models.ApiResponseWrapper[agentsociety.webapi.models.agent_profiles.ApiAgentProfile]¶
Upload an agent profile file and save it to the database.