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
174 changes: 150 additions & 24 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1240,15 +1240,17 @@
"302": {
"description": "Redirect to a presigned URL for a session-owned resource."
},
"422": {
"description": "Validation Error",
"200": {
"description": "Resource bytes. The API redirects to a presigned S3 URL; SDK clients follow the redirect and receive the raw object (e.g. screenshot image bytes).",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
"application/octet-stream": {}
}
},
"404": {
"description": "Session or resource not found."
},
"4XX": {
"description": "Client error."
}
}
}
Expand Down Expand Up @@ -3296,6 +3298,43 @@
}
}
}
},
"/api/v2/quota/tokens": {
"get": {
"tags": [
"quota"
],
"summary": "Get Token Quota",
"description": "Return the current org's token-quota snapshot for the FE meter.",
"operationId": "get_token_quota_api_v2_quota_tokens_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TokenQuotaStatus"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"HTTPBearer": []
}
]
}
}
},
"components": {
Expand Down Expand Up @@ -3778,12 +3817,6 @@
"title": "Kind",
"default": "web"
},
"headless": {
"type": "boolean",
"title": "Headless",
"description": "Run without a visible window.",
"default": false
},
"width": {
"type": "integer",
"exclusiveMinimum": 0.0,
Expand Down Expand Up @@ -3847,6 +3880,17 @@
],
"title": "Browser Profile Id",
"description": "Id of a browser profile to load into this browser, restoring saved cookies and storage state from a prior session. The profile must belong to the caller's organization. Omit to run with a fresh profile."
},
"network": {
"anyOf": [
{
"$ref": "#/components/schemas/BrowserNetwork"
},
{
"type": "null"
}
],
"description": "Optional network configuration for the remote browser session. Applied only when a new runner session is provisioned (not when session_id is set)."
}
},
"type": "object",
Expand All @@ -3856,6 +3900,25 @@
"title": "Browser",
"description": "A web browser the agent navigates and acts on."
},
"BrowserNetwork": {
"properties": {
"proxy_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Proxy Url",
"description": "Optional bring-your-own HTTP/HTTPS/SOCKS proxy URL for browser egress (e.g. http://user:pass@proxy.example.com:8080). Applied when provisioning a new remote browser session. Only supported for headful chromium-based runners. Ignored when session_id attaches to an existing session."
}
},
"type": "object",
"title": "BrowserNetwork",
"description": "Network egress settings for a remote browser session."
},
"BrowserProfileCreate": {
"properties": {
"name": {
Expand Down Expand Up @@ -5014,17 +5077,6 @@
},
"PatchEnvironment": {
"properties": {
"headless": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Headless"
},
"width": {
"anyOf": [
{
Expand Down Expand Up @@ -5123,6 +5175,16 @@
],
"title": "Browser Profile Id"
},
"network": {
"anyOf": [
{
"$ref": "#/components/schemas/BrowserNetwork"
},
{
"type": "null"
}
]
},
"pip_packages": {
"anyOf": [
{
Expand Down Expand Up @@ -5935,6 +5997,70 @@
"title": "Skill",
"description": "A named, reusable instruction an agent can draw on during a session."
},
"TokenQuotaStatus": {
"properties": {
"limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Limit"
},
"used": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Used"
},
"remaining": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Remaining"
},
"window_start": {
"type": "string",
"format": "date-time",
"title": "Window Start"
},
"window_end": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Window End"
}
},
"type": "object",
"required": [
"limit",
"used",
"remaining",
"window_start",
"window_end"
],
"title": "TokenQuotaStatus",
"description": "Current per-org token usage snapshot."
},
"ToolDefinition": {
"properties": {
"name": {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "hai-agents"
version = "0.1.12"
version = "1.0.0"
Comment thread
abonneth marked this conversation as resolved.
description = "Python SDK for H Company's Computer-Use Agents: autonomous agents powered by Holo."
requires-python = ">=3.10"
readme = "README.md"
Expand Down
14 changes: 12 additions & 2 deletions src/hai_agents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
Browser,
BrowserKind,
BrowserMode,
BrowserNetwork,
BrowserProfileList,
BrowserProfileRead,
Environment,
Expand Down Expand Up @@ -100,6 +101,7 @@
SessionSummary,
ShareLink,
Skill,
TokenQuotaStatus,
ToolDefinition,
ToolRequest,
ToolResultBatch,
Expand All @@ -122,8 +124,8 @@
WebhookRecord,
WebhookWithSecret,
)
from .errors import UnprocessableEntityError
from . import agents, browser_profiles, environments, sessions, skills, vaults, webhooks
from .errors import NotFoundError, UnprocessableEntityError
from . import agents, browser_profiles, environments, quota, sessions, skills, vaults, webhooks
from ._default_clients import DefaultAioHttpClient, DefaultAsyncHttpxClient
from .agents import (
ListAgentsRequestSortItem,
Expand Down Expand Up @@ -200,6 +202,7 @@
"Browser": ".types",
"BrowserKind": ".types",
"BrowserMode": ".types",
"BrowserNetwork": ".types",
"BrowserProfileList": ".types",
"BrowserProfileRead": ".types",
"Client": ".client",
Expand Down Expand Up @@ -237,6 +240,7 @@
"MetricsUpdateEvent": ".types",
"ModelCost": ".types",
"ModelUsage": ".types",
"NotFoundError": ".errors",
"ObservationEvent": ".types",
"OnePasswordConfig": ".types",
"OnePasswordConfigProvider": ".types",
Expand Down Expand Up @@ -286,6 +290,7 @@
"ShareLink": ".types",
"Skill": ".types",
"TERMINAL_SESSION_STATUSES": ".polling",
"TokenQuotaStatus": ".types",
"Tool": ".tools",
"ToolDefinition": ".types",
"ToolRequest": ".types",
Expand Down Expand Up @@ -322,6 +327,7 @@
"environments": ".environments",
"is_settled_session_status": ".polling",
"is_terminal_session_status": ".polling",
"quota": ".quota",
"run_session": ".polling",
"sessions": ".sessions",
"skills": ".skills",
Expand Down Expand Up @@ -390,6 +396,7 @@ def __dir__():
"Browser",
"BrowserKind",
"BrowserMode",
"BrowserNetwork",
"BrowserProfileList",
"BrowserProfileRead",
"Client",
Expand Down Expand Up @@ -427,6 +434,7 @@ def __dir__():
"MetricsUpdateEvent",
"ModelCost",
"ModelUsage",
"NotFoundError",
"ObservationEvent",
"OnePasswordConfig",
"OnePasswordConfigProvider",
Expand Down Expand Up @@ -476,6 +484,7 @@ def __dir__():
"ShareLink",
"Skill",
"TERMINAL_SESSION_STATUSES",
"TokenQuotaStatus",
"Tool",
"ToolDefinition",
"ToolRequest",
Expand Down Expand Up @@ -512,6 +521,7 @@ def __dir__():
"environments",
"is_settled_session_status",
"is_terminal_session_status",
"quota",
"run_session",
"sessions",
"skills",
Expand Down
Loading