-
Notifications
You must be signed in to change notification settings - Fork 44.8k
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
refactor(platform): Update database model to reflect domain #8375
refactor(platform): Update database model to reflect domain #8375
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
✅ Deploy Preview for auto-gpt-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
When we come to an agreement on the schema changes I will propagate all these changes throughout the codebase |
Background
We are enhancing our platform’s capabilities by introducing several new features that require an updated database schema. These features include group support, user-specific agent configurations, an accounting and credit system, and a marketplace for agent listings. These changes are essential to support the domino feature, which integrates these components to provide a more robust and user-friendly experience.
Changes 🏗️
Renamed AgentGraph to Agent:
@@map("AgentGraph")
to maintain backward compatibility with the existing database.Group Support:
UserGroup
model to enable user group functionalities.id
,name
,description
,groupIconUrl
, and relations toUser
,Agent
,Profile
, andStoreListing
.Updated the User model:
groups
andadminGroups
to represent group memberships and admin roles.User-Specific Agent Configurations:
ConfiguredAgent
model:id
,name
,description
, and relations toUser
,Agent
, andAgentNodeExecutionInputOutput
.UserAgents
model:id
,userId
,agentId
, and flags likeisFavorite
,isPublished
, etc.Accounting and Credit System:
UserAccounting
model to manage user balances and transactions.id
,userId
,usdBalance
, and relations toUserBlockCredit
.UserBlockCredit
model:UserAccounting
,Agent
, andStoreListing
.UserBlockCreditType
:COMMISSION
,PURCHASE
,SALE
.UserSubscription
andSubscriptionPlan
models:UserSubscription
tracks user subscriptions, including status and plan details.SubscriptionPlan
defines available subscription plans with pricing and credit information.Marketplace Functionality:
Profile
model to represent user or group profiles in the marketplace.id
,username
,description
, social links, and avatar URL.StoreListing
model to enable users to list agents for sale.id
,slug
,name
,description
, and relations toAgent
,User
,UserGroup
, and store-related models.StoreListingVersion
,StorePricing
, andStoreListingApproval
models to handle versioning, pricing, and approval workflows for listings.Updated Triggering Mechanism:
AgentGraphExecutionSchedule
to now trigger aConfiguredAgent
using the input data from thereWebhookTriggers
table for tracking web hook triggerstriggerIdentifier
so agents can identify what tigger resulted in there executionUpdated Existing Models:
AgentNode
,AgentGraphExecution
, andAgentNodeExecutionInputOutput
:AgentGraph
toAgent
.Organized the schema into sections with clear comments for maintainability.
These changes collectively update the database schema to support the new features associated with the domino initiative, enhancing the platform’s functionality and scalability.