Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 62 additions & 26 deletions api/ee/src/core/entitlements/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ class Probe(BaseModel):
},
"features": [
"2 prompts",
"5k traces/month",
"20 evaluations/month",
"5k traces/month",
"2 seats",
],
},
Expand Down Expand Up @@ -109,44 +109,66 @@ class Probe(BaseModel):
},
"features": [
"Unlimited prompts",
"10k traces/month",
"Unlimited evaluations",
"3 seats included",
"10k free traces/month",
"3 free seats",
"Up to 10 seats",
],
},
# {
# "title": "Business",
# "description": "For scale, security, and support.",
# "type": "standard",
# "price": {
# "base": {
# "type": "flat",
# "currency": "USD",
# "amount": 399.00,
# "starting_at": True,
# },
# },
# "features": [
# "Unlimited prompts",
# "Unlimited traces",
# "Unlimited evaluations",
# "Unlimited seats",
# ],
# },
{
"title": "Enterprise",
"description": "For large organizations or custom needs.",
"title": "Business",
"description": "For scale, security, and support.",
"type": "standard",
"plan": Plan.CLOUD_V0_BUSINESS.value,
"price": {
"base": {
"type": "flat",
"currency": "USD",
"amount": 399.00,
},
"traces": {
"type": "tiered",
"currency": "USD",
"tiers": [
{
"limit": 1_000_000,
"amount": 0.00,
},
{
"amount": 5.00,
"rate": 10_000,
},
],
},
},
"features": [
"Everything in Pro",
"Unlimited seats",
"1M free traces/month",
"Multiple workspaces [soon]",
"Roles and RBAC",
"SSO and MFA [soon]",
"SOC 2 reports",
"HIPAA BAA [soon]",
"Private Slack Channel",
"Business SLA",
],
},
{
"title": "Enterprise",
"description": "For large organizations or custom needs.",
"type": "standard",
"features": [
"Everything in Business",
"Custom roles",
"Enterprise SSO",
"Audit logs",
"Self-hosting options",
"Bring Your Own Cloud (BYOC)",
"Security reviews",
"Dedicated support",
"Custom SLAs",
"Custom SLA",
"Custom terms",
"Self-hosted deployment options",
],
},
{
Expand Down Expand Up @@ -207,6 +229,20 @@ class Probe(BaseModel):
Gauge.APPLICATIONS: Quota(strict=True),
},
},
Plan.CLOUD_V0_BUSINESS: {
Tracker.FLAGS: {
Flag.HOOKS: True,
Flag.RBAC: True,
},
Tracker.COUNTERS: {
Counter.TRACES: Quota(monthly=True, free=1_000_000),
Counter.EVALUATIONS: Quota(monthly=True, strict=True),
},
Tracker.GAUGES: {
Gauge.USERS: Quota(strict=True),
Gauge.APPLICATIONS: Quota(strict=True),
},
},
Plan.CLOUD_V0_HUMANITY_LABS: {
Tracker.FLAGS: {
Flag.HOOKS: True,
Expand Down
1 change: 1 addition & 0 deletions api/ee/src/core/subscriptions/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
class Plan(str, Enum):
CLOUD_V0_HOBBY = "cloud_v0_hobby"
CLOUD_V0_PRO = "cloud_v0_pro"
CLOUD_V0_BUSINESS = "cloud_v0_business"
#
CLOUD_V0_HUMANITY_LABS = "cloud_v0_humanity_labs"
CLOUD_V0_X_LABS = "cloud_v0_x_labs"
Expand Down
2 changes: 1 addition & 1 deletion api/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "api"
version = "0.59.2"
version = "0.59.3"
description = "Agenta API"
authors = [
{ name = "Mahmoud Mabrouk", email = "[email protected]" },
Expand Down
2 changes: 1 addition & 1 deletion sdk/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "agenta"
version = "0.59.2"
version = "0.59.3"
description = "The SDK for agenta is an open-source LLMOps platform."
readme = "README.md"
authors = [
Expand Down
2 changes: 1 addition & 1 deletion web/ee/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agenta/ee",
"version": "0.59.2",
"version": "0.59.3",
"private": true,
"engines": {
"node": ">=18"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,25 @@ import {PricingCardProps} from "../types"

const PricingCard = ({plan, currentPlan, onOptionClick, isLoading}: PricingCardProps) => {
const _isLoading = isLoading === plan.plan
const isDisabled = useMemo(
() =>
(isLoading !== null && isLoading !== plan.plan) ||
currentPlan?.plan == plan.plan ||
currentPlan?.plan == Plan.Business ||
currentPlan?.plan == Plan.Enterprise,
[isLoading, currentPlan, plan],
)
const isDisabled = useMemo(() => {
if (isLoading !== null && isLoading !== plan.plan) {
return true
}

if (currentPlan?.plan === plan.plan) {
return true
}

if (currentPlan?.plan === Plan.Enterprise) {
return true
}

if (currentPlan?.plan === Plan.Business && plan.plan === Plan.Pro) {
return true
}

return false
}, [isLoading, currentPlan?.plan, plan.plan])

return (
<Card
Expand All @@ -30,31 +41,30 @@ const PricingCard = ({plan, currentPlan, onOptionClick, isLoading}: PricingCardP
}}
rootClassName="flex flex-col justify-between"
actions={[
plan.title == "Enterprise" || plan.title == "Business" ? (
plan.title == "Enterprise" ? (
<Button
disabled={isDisabled}
className="w-full"
type={
currentPlan?.plan == Plan.Business ||
currentPlan?.plan == Plan.Enterprise
? "link"
: "primary"
}
type={currentPlan?.plan == Plan.Enterprise ? "link" : "primary"}
onClick={() =>
window.open("https://cal.com/mahmoud-mabrouk-ogzgey/demo", "_blank")
}
>
{currentPlan?.plan == Plan.Business || currentPlan?.plan == Plan.Enterprise
? "Current plan"
: "Talk to us"}
{currentPlan?.plan == Plan.Enterprise ? "Current plan" : "Talk to us"}
</Button>
) : (
<Button
disabled={isDisabled}
loading={_isLoading}
className="w-full"
onClick={() => onOptionClick(plan)}
type={currentPlan?.plan === plan.plan ? "link" : "default"}
type={
currentPlan?.plan === plan.plan
? "link"
: plan.plan === Plan.Hobby
? "text"
: "default"
}
>
{currentPlan?.plan === plan.plan
? "Current plan"
Expand All @@ -79,7 +89,7 @@ const PricingCard = ({plan, currentPlan, onOptionClick, isLoading}: PricingCardP
</Typography.Text>
</div>

<ul className="-ml-5">
<ul className="-ml-5 overflow-auto">
{plan.features?.map((point, idx) => {
return (
<li className="text-[#586673]" key={idx}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {getEnv} from "@/oss/lib/helpers/dynamicEnv"
import {Plan} from "@/oss/lib/Types"
import {
checkoutNewSubscription,
switchSubscription,
usePricingPlans,
useSubscriptionData,
useUsageData,
Expand Down Expand Up @@ -35,13 +36,15 @@ const PricingModalContent = ({onCancelSubscription, onCloseModal}: PricingModalC
if (plan.plan === Plan.Hobby && subscription?.plan !== Plan.Hobby) {
onCancelSubscription()
return
} else {
} else if (!subscription || subscription?.plan === Plan.Hobby) {
const data = await checkoutNewSubscription({
plan: plan.plan,
success_url: `${getEnv("NEXT_PUBLIC_AGENTA_WEB_URL")}${projectURL || ""}/settings?tab=billing`,
})

window.open(data.data.checkout_url, "_blank")
} else {
await switchSubscription({plan: plan.plan})
}

setTimeout(() => {
Expand All @@ -60,6 +63,7 @@ const PricingModalContent = ({onCancelSubscription, onCloseModal}: PricingModalC
[
onCancelSubscription,
checkoutNewSubscription,
switchSubscription,
mutateSubscription,
mutateUsage,
projectURL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const PricingModal = ({onCancelSubscription, ...props}: PricingModalProps) => {
return (
<EnhancedModal
className={clsx("[&_.ant-modal-close]:top-[19px]", props.className)}
width={900}
width={1200}
title={<PricingModalTitle />}
footer={null}
{...props}
Expand Down
5 changes: 2 additions & 3 deletions web/ee/src/components/pages/settings/Billing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,14 @@ const Billing = () => {
</Typography.Text>
)}

{subscription?.plan === Plan.Enterprise ||
subscription?.plan === Plan.Business ? (
{subscription?.plan === Plan.Enterprise ? (
<Typography.Text className="text-[#586673]">
For queries regarding your plan,{" "}
<a href="https://cal.com/mahmoud-mabrouk-ogzgey/demo" target="_blank">
click here to contact us
</a>
</Typography.Text>
) : subscription?.plan === Plan.Pro ? (
) : subscription?.plan === Plan.Pro || subscription?.plan === Plan.Business ? (
<div className="flex items-center gap-2">
<Button type="primary" onClick={() => setIsOpenPricingModal(true)}>
Upgrade plan
Expand Down
2 changes: 1 addition & 1 deletion web/oss/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agenta/oss",
"version": "0.59.2",
"version": "0.59.3",
"private": true,
"engines": {
"node": ">=18"
Expand Down
Loading