memora-orbis 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ # ORBIS BY MEMORA — COMMERCIAL & COMMUNITY EVALUATION LICENSE (v1.0)
2
+ Copyright (c) 2026 Memora Company (https://memora.company). All rights reserved.
3
+
4
+ ## 1. Permitted Uses (Community & Evaluation)
5
+ Subject to the terms and conditions of this License, Memora Company grants you a limited, non-exclusive, non-transferable license to:
6
+ - Download, install, and execute Orbis by Memora for personal development, learning, testing, and evaluation purposes.
7
+ - Integrate Orbis with local autonomous AI agents (e.g. LangChain, Browser-Use, CrewAI, Stagehand) in non-production, evaluation environments.
8
+
9
+ ## 2. Commercial & Production Use Restriction
10
+ - Commercial, business, or production deployment requires a commercial enterprise subscription or written license agreement from Memora Company.
11
+ - If your organization generates commercial revenue or uses Orbis in a production environment, you must obtain a commercial license at:
12
+ https://orbis.memora.company or by contacting enterprise@memora.company.
13
+
14
+ ## 3. General Prohibitions
15
+ You may NOT:
16
+ - Reverse-engineer, decompile, disassemble, or attempt to derive source code from any distributed binary files or obfuscated JavaScript.
17
+ - Resell, sublicense, rent, lease, or host Orbis as a competing multi-tenant commercial cloud service without explicit written authorization from Memora Company.
18
+ - Alter, remove, or obscure any copyright notices, trademarks, or proprietary markings.
19
+
20
+ ## 4. Disclaimer of Warranty
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MEMORA COMPANY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES.
@@ -0,0 +1,91 @@
1
+ Metadata-Version: 2.4
2
+ Name: memora-orbis
3
+ Version: 0.1.0
4
+ Summary: Orbis by Memora — Official Python SDK for Agentic Browser (Browser-Use, LangChain, CrewAI)
5
+ Author-email: Memora <support@memora.company>
6
+ License: Commercial / Proprietary - see LICENSE.md
7
+ Project-URL: Homepage, https://orbis.memora.company
8
+ Project-URL: Company, https://memora.company
9
+ Project-URL: Repository, https://github.com/yadavmandeep/memora-browser
10
+ Keywords: headless-browser,orbis,memora,cdp,ai-agents,browser-use,langchain,web-automation
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
14
+ Requires-Python: >=3.9
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE.md
17
+ Dynamic: license-file
18
+
19
+ # 🪐 Orbis by Memora — Python SDK
20
+ > **The Agentic Browser. Built for Autonomous Intelligence.**
21
+ > 🌐 **Website:** [orbis.memora.company](https://orbis.memora.company) • **Company:** [memora.company](https://memora.company)
22
+ > ⚡ **Core Engine:** Memora Browser Engine (MBE)
23
+
24
+ Official Python SDK for **Orbis by Memora**, the agent-native, ultra-lightweight headless browser engine.
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ pip install memora-orbis
30
+ ```
31
+
32
+ ## Quick Start
33
+
34
+ ```python
35
+ from orbis import OrbisAgent # or: from memora import MemoraAgent
36
+
37
+ # Connect to running Orbis daemon (started via `npx memora-orbis --port 9222`)
38
+ agent = OrbisAgent.connect("http://localhost:9222")
39
+
40
+ # Navigate and get compact LLM action map (<1000 tokens)
41
+ snap = agent.goto("https://example.com")
42
+ print(f"Title: {snap.title} | Tokens: ~{snap.token_estimate}")
43
+ print(snap.action_map_text)
44
+
45
+ # Direct interaction via @actionId, Playwright label, or CSS
46
+ agent.act("@1")
47
+ agent.act("label:Email Address", "agent@memora.company")
48
+ agent.act("text=Sign In")
49
+
50
+ # Check state changes between turns
51
+ diff = agent.diff()
52
+ print(diff["diff"]["summary"])
53
+
54
+ # Autonomous self-healing form fill (supports labels, placeholders, @ids, #ids)
55
+ agent.fill_form({"label:Username": "agent_007", "placeholder:Password": "secret"}, submit="text=Sign In")
56
+ ```
57
+
58
+ ## Integration with Browser-Use
59
+
60
+ ```python
61
+ from orbis import OrbisAgent
62
+ from browser_use import Agent
63
+ from langchain_openai import ChatOpenAI
64
+
65
+ agent = OrbisAgent.connect("http://localhost:9222")
66
+
67
+ # Browser-Use automatically connects over Orbis's ultra-lightweight CDP
68
+ browser_agent = Agent(
69
+ task="Search news for AI agent announcements",
70
+ llm=ChatOpenAI(model="gpt-4o"),
71
+ browser_context_kwargs=agent.to_browser_use()
72
+ )
73
+ ```
74
+
75
+ ## Integration with LangChain
76
+
77
+ ```python
78
+ from orbis import OrbisAgent
79
+
80
+ agent = OrbisAgent.connect("http://localhost:9222")
81
+ tools = agent.to_langchain_tools()
82
+ # Exported LangChain tools: memora_navigate, memora_act, memora_diff
83
+ ```
84
+
85
+ ## 🏢 About Memora
86
+
87
+ **[Memora](https://memora.company/)** is an AI organizational memory and knowledge management platform. It connects conversations, code, tickets, documents, and meetings into a shared, verifiable intelligence layer.
88
+
89
+ Orbis is Memora's official agentic browser engine, giving AI workflows and multi-agent fleets reliable, token-condensed, and stealth-native web execution.
90
+
91
+ Visit **[memora.company](https://memora.company/)** to learn more.
@@ -0,0 +1,73 @@
1
+ # 🪐 Orbis by Memora — Python SDK
2
+ > **The Agentic Browser. Built for Autonomous Intelligence.**
3
+ > 🌐 **Website:** [orbis.memora.company](https://orbis.memora.company) • **Company:** [memora.company](https://memora.company)
4
+ > ⚡ **Core Engine:** Memora Browser Engine (MBE)
5
+
6
+ Official Python SDK for **Orbis by Memora**, the agent-native, ultra-lightweight headless browser engine.
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ pip install memora-orbis
12
+ ```
13
+
14
+ ## Quick Start
15
+
16
+ ```python
17
+ from orbis import OrbisAgent # or: from memora import MemoraAgent
18
+
19
+ # Connect to running Orbis daemon (started via `npx memora-orbis --port 9222`)
20
+ agent = OrbisAgent.connect("http://localhost:9222")
21
+
22
+ # Navigate and get compact LLM action map (<1000 tokens)
23
+ snap = agent.goto("https://example.com")
24
+ print(f"Title: {snap.title} | Tokens: ~{snap.token_estimate}")
25
+ print(snap.action_map_text)
26
+
27
+ # Direct interaction via @actionId, Playwright label, or CSS
28
+ agent.act("@1")
29
+ agent.act("label:Email Address", "agent@memora.company")
30
+ agent.act("text=Sign In")
31
+
32
+ # Check state changes between turns
33
+ diff = agent.diff()
34
+ print(diff["diff"]["summary"])
35
+
36
+ # Autonomous self-healing form fill (supports labels, placeholders, @ids, #ids)
37
+ agent.fill_form({"label:Username": "agent_007", "placeholder:Password": "secret"}, submit="text=Sign In")
38
+ ```
39
+
40
+ ## Integration with Browser-Use
41
+
42
+ ```python
43
+ from orbis import OrbisAgent
44
+ from browser_use import Agent
45
+ from langchain_openai import ChatOpenAI
46
+
47
+ agent = OrbisAgent.connect("http://localhost:9222")
48
+
49
+ # Browser-Use automatically connects over Orbis's ultra-lightweight CDP
50
+ browser_agent = Agent(
51
+ task="Search news for AI agent announcements",
52
+ llm=ChatOpenAI(model="gpt-4o"),
53
+ browser_context_kwargs=agent.to_browser_use()
54
+ )
55
+ ```
56
+
57
+ ## Integration with LangChain
58
+
59
+ ```python
60
+ from orbis import OrbisAgent
61
+
62
+ agent = OrbisAgent.connect("http://localhost:9222")
63
+ tools = agent.to_langchain_tools()
64
+ # Exported LangChain tools: memora_navigate, memora_act, memora_diff
65
+ ```
66
+
67
+ ## 🏢 About Memora
68
+
69
+ **[Memora](https://memora.company/)** is an AI organizational memory and knowledge management platform. It connects conversations, code, tickets, documents, and meetings into a shared, verifiable intelligence layer.
70
+
71
+ Orbis is Memora's official agentic browser engine, giving AI workflows and multi-agent fleets reliable, token-condensed, and stealth-native web execution.
72
+
73
+ Visit **[memora.company](https://memora.company/)** to learn more.
@@ -0,0 +1,3 @@
1
+ from .agent import OrbisAgent, OrbisSnapshot, MemoraAgent, MemoraSnapshot
2
+
3
+ __all__ = ["OrbisAgent", "OrbisSnapshot", "MemoraAgent", "MemoraSnapshot"]
@@ -0,0 +1,166 @@
1
+ import os
2
+ import json
3
+ import urllib.request
4
+ import urllib.parse
5
+ from typing import Dict, Any, Optional, List
6
+
7
+ class OrbisSnapshot:
8
+ def __init__(self, data: Dict[str, Any]):
9
+ self.raw = data
10
+ self.url = data.get("url", "")
11
+ self.title = data.get("title", "")
12
+ self.markdown = data.get("markdown", "")
13
+ self.action_map_text = data.get("actionMapText", "")
14
+ self.actions = data.get("actions", [])
15
+ self.token_estimate = data.get("tokenEstimate", 0)
16
+ self.interactive_count = data.get("interactiveCount", 0)
17
+
18
+ def __repr__(self) -> str:
19
+ return f"<OrbisSnapshot '{self.title}' actions={self.interactive_count} tokens={self.token_estimate}>"
20
+
21
+ class OrbisAgent:
22
+ """
23
+ 🪐 OrbisAgent — Official Python Agent SDK for Orbis by Memora (https://orbis.memora.company).
24
+ Provides 1-line connection and high-velocity agentic browsing for Browser-Use,
25
+ LangChain, CrewAI, AutoGen, and independent LLM agents.
26
+ """
27
+
28
+ def __init__(self, base_url: str = "http://localhost:9222", api_key: Optional[str] = None):
29
+ self.base_url = base_url.rstrip("/")
30
+ self.api_key = api_key or os.environ.get("ORBIS_API_KEY") or os.environ.get("MEMORA_API_KEY")
31
+
32
+ @classmethod
33
+ def connect(cls, base_url: str = "http://localhost:9222", api_key: Optional[str] = None) -> "OrbisAgent":
34
+ """Connect to a running Orbis Browser daemon."""
35
+ agent = cls(base_url, api_key=api_key)
36
+ # Verify connectivity
37
+ headers = {}
38
+ if agent.api_key:
39
+ headers["x-api-key"] = agent.api_key
40
+ headers["Authorization"] = f"Bearer {agent.api_key}"
41
+ req = urllib.request.Request(f"{agent.base_url}/json/version", headers=headers)
42
+ with urllib.request.urlopen(req, timeout=5) as res:
43
+ if res.status != 200:
44
+ raise ConnectionError(f"Orbis Browser did not respond on {base_url} (HTTP {res.status})")
45
+ return agent
46
+
47
+ def _make_headers(self, extra: Optional[Dict[str, str]] = None) -> Dict[str, str]:
48
+ headers = extra or {}
49
+ if self.api_key:
50
+ headers["x-api-key"] = self.api_key
51
+ headers["Authorization"] = f"Bearer {self.api_key}"
52
+ return headers
53
+
54
+ def _get(self, path: str, params: Optional[Dict[str, str]] = None) -> Dict[str, Any]:
55
+ url = f"{self.base_url}{path}"
56
+ if params:
57
+ url += f"?{urllib.parse.urlencode(params)}"
58
+ req = urllib.request.Request(url, headers=self._make_headers())
59
+ with urllib.request.urlopen(req, timeout=15) as res:
60
+ return json.loads(res.read().decode("utf-8"))
61
+
62
+ def _post(self, path: str, data: Dict[str, Any], params: Optional[Dict[str, str]] = None) -> Dict[str, Any]:
63
+ url = f"{self.base_url}{path}"
64
+ if params:
65
+ url += f"?{urllib.parse.urlencode(params)}"
66
+ payload = json.dumps(data).encode("utf-8")
67
+ headers = self._make_headers({"Content-Type": "application/json"})
68
+ req = urllib.request.Request(
69
+ url,
70
+ data=payload,
71
+ headers=headers,
72
+ method="POST"
73
+ )
74
+ with urllib.request.urlopen(req, timeout=15) as res:
75
+ return json.loads(res.read().decode("utf-8"))
76
+
77
+ def goto(self, url: str) -> OrbisSnapshot:
78
+ """Navigate to target URL and return distilled semantic snapshot."""
79
+ data = self._get("/orbis/goto", {"url": url})
80
+ return OrbisSnapshot(data.get("snapshot", data))
81
+
82
+ def snapshot(self, focus_selector: Optional[str] = None, exclude_selectors: Optional[List[str]] = None) -> OrbisSnapshot:
83
+ """Fetch current semantic snapshot with numbered action IDs (@1, @2, ...)."""
84
+ params = {}
85
+ if focus_selector:
86
+ params["focus"] = focus_selector
87
+ if exclude_selectors:
88
+ params["exclude"] = ",".join(exclude_selectors)
89
+ data = self._get("/orbis/snapshot", params)
90
+ return OrbisSnapshot(data)
91
+
92
+ def markdown(self) -> str:
93
+ """Return clean, distilled Markdown representation."""
94
+ url = f"{self.base_url}/orbis/snapshot?format=markdown"
95
+ req = urllib.request.Request(url, headers=self._make_headers())
96
+ with urllib.request.urlopen(req, timeout=10) as res:
97
+ return res.read().decode("utf-8")
98
+
99
+ def diff(self) -> Dict[str, Any]:
100
+ """Compute state difference from the previous action (added, removed, mutated interactives)."""
101
+ return self._get("/orbis/diff")
102
+
103
+ def act(self, action_id: str, text: Optional[str] = None) -> Dict[str, Any]:
104
+ """Click or type into an element using its @actionId (e.g. '@1', '@2') or selector."""
105
+ payload: Dict[str, Any] = {"actionId": action_id}
106
+ if text is not None:
107
+ payload["type"] = "type"
108
+ payload["text"] = text
109
+ else:
110
+ payload["type"] = "click"
111
+ return self._post("/orbis/act", payload)
112
+
113
+ def select_option(self, target: str, value_or_text: str) -> Dict[str, Any]:
114
+ """Select a dropdown option by value or visible text using any locator format."""
115
+ return self._post("/orbis/select-option", {"target": target, "value": value_or_text})
116
+
117
+ def fill_form(self, fields: Dict[str, str], submit: bool = True) -> Dict[str, Any]:
118
+ """Fill multiple fields in one atomic turn and optionally submit."""
119
+ return self._post("/orbis/fill-form", {"fields": fields, "submit": submit})
120
+
121
+ def save_session(self, file_path: str) -> Dict[str, Any]:
122
+ """Save cookies, localStorage, and sessionStorage to a file."""
123
+ return self._post("/orbis/session/save", {"filePath": file_path})
124
+
125
+ def load_session(self, file_path: str) -> Dict[str, Any]:
126
+ """Load session from a file."""
127
+ return self._post("/orbis/session", {"filePath": file_path})
128
+
129
+ def to_browser_use(self) -> Dict[str, Any]:
130
+ """Return configuration dictionary for Browser-Use in Python."""
131
+ return {
132
+ "cdp_url": self.base_url,
133
+ "disable_security": True
134
+ }
135
+
136
+ def to_langchain_tools(self) -> List[Any]:
137
+ """Return LangChain StructuredTool definitions."""
138
+ try:
139
+ from langchain.tools import tool
140
+
141
+ @tool
142
+ def orbis_navigate(url: str) -> str:
143
+ """Navigate to a URL and return distilled snapshot and action map."""
144
+ snap = self.goto(url)
145
+ return f"{snap.action_map_text}\n\n=== CONTENT ===\n{snap.markdown[:4000]}"
146
+
147
+ @tool
148
+ def orbis_act(action_id: str, text: Optional[str] = None) -> str:
149
+ """Click or type into an element by its action ID (@1, @2)."""
150
+ res = self.act(action_id, text)
151
+ diff = self.diff()
152
+ return f"Action {action_id} result: {res.get('success')}\nDiff summary:\n{diff.get('diff', {}).get('summary', '')}"
153
+
154
+ @tool
155
+ def orbis_diff() -> str:
156
+ """Check what changed on the page after the last action."""
157
+ d = self.diff().get("diff", {})
158
+ return d.get("summary", "No changes detected.")
159
+
160
+ return [orbis_navigate, orbis_act, orbis_diff]
161
+ except ImportError:
162
+ raise ImportError("LangChain is not installed. Install via `pip install langchain` to use to_langchain_tools().")
163
+
164
+ # Backward Compatibility Aliases
165
+ MemoraSnapshot = OrbisSnapshot
166
+ MemoraAgent = OrbisAgent
@@ -0,0 +1,91 @@
1
+ Metadata-Version: 2.4
2
+ Name: memora-orbis
3
+ Version: 0.1.0
4
+ Summary: Orbis by Memora — Official Python SDK for Agentic Browser (Browser-Use, LangChain, CrewAI)
5
+ Author-email: Memora <support@memora.company>
6
+ License: Commercial / Proprietary - see LICENSE.md
7
+ Project-URL: Homepage, https://orbis.memora.company
8
+ Project-URL: Company, https://memora.company
9
+ Project-URL: Repository, https://github.com/yadavmandeep/memora-browser
10
+ Keywords: headless-browser,orbis,memora,cdp,ai-agents,browser-use,langchain,web-automation
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
14
+ Requires-Python: >=3.9
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE.md
17
+ Dynamic: license-file
18
+
19
+ # 🪐 Orbis by Memora — Python SDK
20
+ > **The Agentic Browser. Built for Autonomous Intelligence.**
21
+ > 🌐 **Website:** [orbis.memora.company](https://orbis.memora.company) • **Company:** [memora.company](https://memora.company)
22
+ > ⚡ **Core Engine:** Memora Browser Engine (MBE)
23
+
24
+ Official Python SDK for **Orbis by Memora**, the agent-native, ultra-lightweight headless browser engine.
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ pip install memora-orbis
30
+ ```
31
+
32
+ ## Quick Start
33
+
34
+ ```python
35
+ from orbis import OrbisAgent # or: from memora import MemoraAgent
36
+
37
+ # Connect to running Orbis daemon (started via `npx memora-orbis --port 9222`)
38
+ agent = OrbisAgent.connect("http://localhost:9222")
39
+
40
+ # Navigate and get compact LLM action map (<1000 tokens)
41
+ snap = agent.goto("https://example.com")
42
+ print(f"Title: {snap.title} | Tokens: ~{snap.token_estimate}")
43
+ print(snap.action_map_text)
44
+
45
+ # Direct interaction via @actionId, Playwright label, or CSS
46
+ agent.act("@1")
47
+ agent.act("label:Email Address", "agent@memora.company")
48
+ agent.act("text=Sign In")
49
+
50
+ # Check state changes between turns
51
+ diff = agent.diff()
52
+ print(diff["diff"]["summary"])
53
+
54
+ # Autonomous self-healing form fill (supports labels, placeholders, @ids, #ids)
55
+ agent.fill_form({"label:Username": "agent_007", "placeholder:Password": "secret"}, submit="text=Sign In")
56
+ ```
57
+
58
+ ## Integration with Browser-Use
59
+
60
+ ```python
61
+ from orbis import OrbisAgent
62
+ from browser_use import Agent
63
+ from langchain_openai import ChatOpenAI
64
+
65
+ agent = OrbisAgent.connect("http://localhost:9222")
66
+
67
+ # Browser-Use automatically connects over Orbis's ultra-lightweight CDP
68
+ browser_agent = Agent(
69
+ task="Search news for AI agent announcements",
70
+ llm=ChatOpenAI(model="gpt-4o"),
71
+ browser_context_kwargs=agent.to_browser_use()
72
+ )
73
+ ```
74
+
75
+ ## Integration with LangChain
76
+
77
+ ```python
78
+ from orbis import OrbisAgent
79
+
80
+ agent = OrbisAgent.connect("http://localhost:9222")
81
+ tools = agent.to_langchain_tools()
82
+ # Exported LangChain tools: memora_navigate, memora_act, memora_diff
83
+ ```
84
+
85
+ ## 🏢 About Memora
86
+
87
+ **[Memora](https://memora.company/)** is an AI organizational memory and knowledge management platform. It connects conversations, code, tickets, documents, and meetings into a shared, verifiable intelligence layer.
88
+
89
+ Orbis is Memora's official agentic browser engine, giving AI workflows and multi-agent fleets reliable, token-condensed, and stealth-native web execution.
90
+
91
+ Visit **[memora.company](https://memora.company/)** to learn more.
@@ -0,0 +1,10 @@
1
+ LICENSE.md
2
+ README.md
3
+ pyproject.toml
4
+ memora/__init__.py
5
+ memora/agent.py
6
+ memora_orbis.egg-info/PKG-INFO
7
+ memora_orbis.egg-info/SOURCES.txt
8
+ memora_orbis.egg-info/dependency_links.txt
9
+ memora_orbis.egg-info/top_level.txt
10
+ orbis/__init__.py
@@ -0,0 +1,2 @@
1
+ memora
2
+ orbis
@@ -0,0 +1,3 @@
1
+ from memora.agent import OrbisAgent, OrbisSnapshot, MemoraAgent, MemoraSnapshot
2
+
3
+ __all__ = ["OrbisAgent", "OrbisSnapshot", "MemoraAgent", "MemoraSnapshot"]
@@ -0,0 +1,29 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "memora-orbis"
7
+ version = "0.1.0"
8
+ description = "Orbis by Memora — Official Python SDK for Agentic Browser (Browser-Use, LangChain, CrewAI)"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "Commercial / Proprietary - see LICENSE.md" }
12
+ authors = [
13
+ { name = "Memora", email = "support@memora.company" }
14
+ ]
15
+ keywords = ["headless-browser", "orbis", "memora", "cdp", "ai-agents", "browser-use", "langchain", "web-automation"]
16
+ classifiers = [
17
+ "Programming Language :: Python :: 3",
18
+ "Operating System :: OS Independent",
19
+ "Topic :: Internet :: WWW/HTTP :: Browsers",
20
+ ]
21
+
22
+ [project.urls]
23
+ Homepage = "https://orbis.memora.company"
24
+ Company = "https://memora.company"
25
+ Repository = "https://github.com/yadavmandeep/memora-browser"
26
+
27
+ [tool.setuptools.packages.find]
28
+ where = ["."]
29
+ include = ["memora*", "orbis*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+