Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Library API to Include Status #9246

Open
Swiftyos opened this issue Jan 10, 2025 — with Linear · 0 comments
Open

Update Library API to Include Status #9246

Swiftyos opened this issue Jan 10, 2025 — with Linear · 0 comments
Labels
API platform/backend AutoGPT Platform - Back end

Comments

Copy link
Contributor

So tis something like this:

class LibraryAgentResponse:
    agents: List[LibraryAgent]
    pagination: Pagination # info


class LibraryAgent(BaseModel):
    agent_id: str
    agent_version: int
    name: str
    image_url: str
    creator_name: str
    creator_image_url: str
    short_description: str
    status: AgentStatus
    new_output: bool
    can_access_graph: bool
    input_schema: ...
    preset_id: str | None
    preset_input_data: ... | None
    
class AgentStatus(enum):
    HEALTHY
    ERROR
    WAITING
    COMPLETED


As for the runs we can use a slightly modified GraphExecution:

# Reuse GraphExecution, with cost added to it.
class GraphExecution(BaseDbModel):
    execution_id: str
    started_at: datetime
    ended_at: datetime
    duration: float
    total_run_time: float
    status: ExecutionStatus
    graph_id: str
    graph_version: int
+++ preset_id: str | None # needed to be able to link runs to a specific preset
+++ cost: int   
@Swiftyos Swiftyos added API platform/backend AutoGPT Platform - Back end labels Jan 10, 2025 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API platform/backend AutoGPT Platform - Back end
Projects
None yet
Development

No branches or pull requests

1 participant