Skip to content
Closed
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
142 changes: 72 additions & 70 deletions openapi.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"openapi": "3.1.0",
"info": {
"title": "Agent API",
"title": "Computer-Use Agents",
"version": "1.0.0"
},
"servers": [
Expand Down Expand Up @@ -3817,43 +3817,30 @@
"title": "Kind",
"default": "web"
},
"width": {
"type": "integer",
"exclusiveMinimum": 0.0,
"title": "Width",
"description": "Viewport width in pixels.",
"default": 1200
},
"height": {
"type": "integer",
"exclusiveMinimum": 0.0,
"title": "Height",
"description": "Viewport height in pixels.",
"default": 1200
},
"start_url": {
"type": "string",
"title": "Start Url",
"description": "Initial URL to open.",
"default": "https://www.bing.com"
},
"mode": {
"type": "string",
"enum": [
"visual",
"text",
"multimodal"
"oneOf": [
{
"$ref": "#/components/schemas/BrowserVisualMode"
},
{
"$ref": "#/components/schemas/BrowserTextMode"
}
],
"title": "Mode",
"description": "How the agent perceives and drives the browser. 'visual': act on screenshots by viewport coordinates. 'multimodal': the same, with the page also included as markdown text alongside each screenshot. 'text': read-only markdown with URL navigation, no screenshots.",
"default": "visual"
},
"page_chars": {
"type": "integer",
"exclusiveMinimum": 0.0,
"title": "Page Chars",
"description": "Characters of page text shown per page in 'text' mode.",
"default": 20000
"description": "How the agent perceives and drives the browser.",
"discriminator": {
"propertyName": "type",
"mapping": {
"text": "#/components/schemas/BrowserTextMode",
"visual": "#/components/schemas/BrowserVisualMode"
}
}
},
"vault_id": {
"anyOf": [
Expand Down Expand Up @@ -4120,6 +4107,59 @@
"title": "BrowserProfileRead",
"description": "Response model for a browser profile."
},
"BrowserTextMode": {
"properties": {
"type": {
"type": "string",
"const": "text",
"title": "Type",
"default": "text"
},
"chunk_size": {
"type": "integer",
"exclusiveMinimum": 0.0,
"title": "Chunk Size",
"description": "Characters of page text shown per page.",
"default": 20000
}
},
"type": "object",
"title": "BrowserTextMode",
"description": "Read-only markdown with URL navigation, no screenshots."
},
"BrowserVisualMode": {
"properties": {
"type": {
"type": "string",
"const": "visual",
"title": "Type",
"default": "visual"
},
"width": {
"type": "integer",
"exclusiveMinimum": 0.0,
"title": "Width",
"description": "Viewport width in pixels.",
"default": 1200
},
"height": {
"type": "integer",
"exclusiveMinimum": 0.0,
"title": "Height",
"description": "Viewport height in pixels.",
"default": 1200
},
"markdown": {
"type": "boolean",
"title": "Markdown",
"description": "Also include the viewport's text as markdown alongside each screenshot.",
"default": false
}
},
"type": "object",
"title": "BrowserVisualMode",
"description": "Act on screenshots by viewport coordinates."
},
"CreateWebhook": {
"properties": {
"url": {
Expand Down Expand Up @@ -5077,30 +5117,6 @@
},
"PatchEnvironment": {
"properties": {
"width": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0.0
},
{
"type": "null"
}
],
"title": "Width"
},
"height": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0.0
},
{
"type": "null"
}
],
"title": "Height"
},
"start_url": {
"anyOf": [
{
Expand All @@ -5126,30 +5142,16 @@
"mode": {
"anyOf": [
{
"type": "string",
"enum": [
"visual",
"text",
"multimodal"
]
"$ref": "#/components/schemas/BrowserVisualMode"
},
{
"type": "null"
}
],
"title": "Mode"
},
"page_chars": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0.0
"$ref": "#/components/schemas/BrowserTextMode"
},
{
"type": "null"
}
],
"title": "Page Chars"
"title": "Mode"
},
"vault_id": {
"anyOf": [
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 = "1.0.0"
version = "1.0.1"
description = "Python SDK for H Company's Computer-Use Agents: autonomous agents powered by Holo."
requires-python = ">=3.10"
readme = "README.md"
Expand Down
18 changes: 18 additions & 0 deletions src/hai_agents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,15 @@
Browser,
BrowserKind,
BrowserMode,
BrowserMode_Text,
BrowserMode_Visual,
BrowserNetwork,
BrowserProfileList,
BrowserProfileRead,
BrowserTextMode,
BrowserTextModeType,
BrowserVisualMode,
BrowserVisualModeType,
Environment,
EnvironmentKind,
EnvironmentPage,
Expand Down Expand Up @@ -202,9 +208,15 @@
"Browser": ".types",
"BrowserKind": ".types",
"BrowserMode": ".types",
"BrowserMode_Text": ".types",
"BrowserMode_Visual": ".types",
"BrowserNetwork": ".types",
"BrowserProfileList": ".types",
"BrowserProfileRead": ".types",
"BrowserTextMode": ".types",
"BrowserTextModeType": ".types",
"BrowserVisualMode": ".types",
"BrowserVisualModeType": ".types",
"Client": ".client",
"DefaultAioHttpClient": "._default_clients",
"DefaultAsyncHttpxClient": "._default_clients",
Expand Down Expand Up @@ -396,9 +408,15 @@ def __dir__():
"Browser",
"BrowserKind",
"BrowserMode",
"BrowserMode_Text",
"BrowserMode_Visual",
"BrowserNetwork",
"BrowserProfileList",
"BrowserProfileRead",
"BrowserTextMode",
"BrowserTextModeType",
"BrowserVisualMode",
"BrowserVisualModeType",
"Client",
"DefaultAioHttpClient",
"DefaultAsyncHttpxClient",
Expand Down
4 changes: 2 additions & 2 deletions src/hai_agents/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ def get_headers(self) -> typing.Dict[str, str]:
import platform

headers: typing.Dict[str, str] = {
"User-Agent": "hai_agents/1.0.0",
"User-Agent": "hai_agents/1.0.1",
"X-HCompany-Client-Name": "hai_agents",
"X-HCompany-Client-Version": "1.0.0",
"X-HCompany-Client-Version": "1.0.1",
"X-HCompany-Client-Type": "sdk",
"X-HCompany-Language": "Python",
"X-HCompany-Runtime": f"python/{platform.python_version()}",
Expand Down
Loading