open-agent-fleet 1.0.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,115 @@
1
+ Metadata-Version: 2.4
2
+ Name: open-agent-fleet
3
+ Version: 1.0.0
4
+ Summary: Official Python SDK and fleetctl CLI for AgentFleet — self-hosted autonomous computer-use agents, each with its own Linux desktop
5
+ Author-email: Bryant VanOrden <supermanismebvo123@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/BryantVanOrden/OpenAgentFleet
8
+ Project-URL: Repository, https://github.com/BryantVanOrden/OpenAgentFleet
9
+ Project-URL: Documentation, https://github.com/BryantVanOrden/OpenAgentFleet/tree/main/docs
10
+ Project-URL: Changelog, https://github.com/BryantVanOrden/OpenAgentFleet/blob/main/CHANGELOG.md
11
+ Project-URL: Issues, https://github.com/BryantVanOrden/OpenAgentFleet/issues
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ Requires-Dist: urllib3>=2.0.0
22
+
23
+ # AgentFleet Python SDK & `fleetctl` CLI
24
+
25
+ Official Python SDK and command-line management client for
26
+ [**AgentFleet**](https://github.com/BryantVanOrden/OpenAgentFleet) — the
27
+ self-hosted platform for autonomous computer-use agents, where every agent
28
+ gets its own disposable Linux desktop that streams live into your browser.
29
+
30
+ ---
31
+
32
+ ## 📦 Installation
33
+
34
+ ```bash
35
+ pip install open-agent-fleet
36
+ ```
37
+
38
+ That gives you the `agentfleet` package and the `fleetctl` CLI. To work from
39
+ source instead:
40
+
41
+ ```bash
42
+ git clone https://github.com/BryantVanOrden/OpenAgentFleet.git
43
+ pip install -e OpenAgentFleet/sdk/python
44
+ ```
45
+
46
+ The SDK is a client — it talks to an AgentFleet orchestrator. To run one,
47
+ see the [main README](https://github.com/BryantVanOrden/OpenAgentFleet#readme)
48
+ (`make up` is the whole quickstart).
49
+
50
+ ---
51
+
52
+ ## ⚡ Quickstart (Python SDK)
53
+
54
+ ```python
55
+ from agentfleet import FleetClient
56
+
57
+ # Connect to your local or remote orchestrator
58
+ fleet = FleetClient("http://localhost:8080", token="your-api-token")
59
+
60
+ # 1. Deploy a specialized bot archetype
61
+ bot = fleet.deploy_bot("cyber_ops", name="security-auditor")
62
+ print(f"Spawned {bot.name} (ID: {bot.id})")
63
+
64
+ # 2. Run an autonomous goal
65
+ task = bot.run("Run SAST vulnerability scan and compile CVSS briefing", wait=True)
66
+ print(f"Task status: {task.state}")
67
+ print(f"Result: {task.result}")
68
+
69
+ # 3. Launch a collaborative multi-agent swarm
70
+ swarm = fleet.launch_swarm(
71
+ name="Fintech Mobile Audit",
72
+ mission="Full-Stack Dev + QA Tester + CyberSec PenTester collaborative sweep",
73
+ )
74
+
75
+ # 4. Pocket TTS Voice Co-Pilot
76
+ fleet.speak("All tasks completed successfully, operator.", voice="shadow")
77
+ ```
78
+
79
+ ---
80
+
81
+ ## 🛠️ Command-Line Interface (`fleetctl`)
82
+
83
+ The `fleetctl` command-line utility provides full administrative control, live telemetry, and system diagnostics:
84
+
85
+ ```bash
86
+ # 1. Configuration & Authentication
87
+ fleetctl config set-url http://localhost:8080
88
+ fleetctl login admin@example.com
89
+
90
+ # 2. Comprehensive Diagnostics & Health Check
91
+ fleetctl diagnostics
92
+
93
+ # 3. List and Inspect Instances
94
+ fleetctl list
95
+ fleetctl inspect <instance_id>
96
+
97
+ # 4. Deploy Bots
98
+ fleetctl deploy --archetype cyber_ops --name "nightly-scanner"
99
+
100
+ # 5. Execute Tasks & Stream Live Execution
101
+ fleetctl run <instance_id> "Refactor backend authentication and run unit tests" --wait
102
+
103
+ # 6. Multi-Agent Swarm Mission Control
104
+ fleetctl swarm list
105
+ fleetctl swarm launch --name "Security Sweep" --mission "Penetration test staging endpoints"
106
+ fleetctl swarm watch <swarm_id>
107
+
108
+ # 7. Real-Time Pocket TTS Voice
109
+ fleetctl voice list
110
+ fleetctl voice speak "System operational and standing by." --voice shadow
111
+
112
+ # 8. Webhook & Autopilot Sinks
113
+ fleetctl webhooks list
114
+ fleetctl webhooks trigger github-pr-sync --data '{"pr": 42}'
115
+ ```
@@ -0,0 +1,93 @@
1
+ # AgentFleet Python SDK & `fleetctl` CLI
2
+
3
+ Official Python SDK and command-line management client for
4
+ [**AgentFleet**](https://github.com/BryantVanOrden/OpenAgentFleet) — the
5
+ self-hosted platform for autonomous computer-use agents, where every agent
6
+ gets its own disposable Linux desktop that streams live into your browser.
7
+
8
+ ---
9
+
10
+ ## 📦 Installation
11
+
12
+ ```bash
13
+ pip install open-agent-fleet
14
+ ```
15
+
16
+ That gives you the `agentfleet` package and the `fleetctl` CLI. To work from
17
+ source instead:
18
+
19
+ ```bash
20
+ git clone https://github.com/BryantVanOrden/OpenAgentFleet.git
21
+ pip install -e OpenAgentFleet/sdk/python
22
+ ```
23
+
24
+ The SDK is a client — it talks to an AgentFleet orchestrator. To run one,
25
+ see the [main README](https://github.com/BryantVanOrden/OpenAgentFleet#readme)
26
+ (`make up` is the whole quickstart).
27
+
28
+ ---
29
+
30
+ ## ⚡ Quickstart (Python SDK)
31
+
32
+ ```python
33
+ from agentfleet import FleetClient
34
+
35
+ # Connect to your local or remote orchestrator
36
+ fleet = FleetClient("http://localhost:8080", token="your-api-token")
37
+
38
+ # 1. Deploy a specialized bot archetype
39
+ bot = fleet.deploy_bot("cyber_ops", name="security-auditor")
40
+ print(f"Spawned {bot.name} (ID: {bot.id})")
41
+
42
+ # 2. Run an autonomous goal
43
+ task = bot.run("Run SAST vulnerability scan and compile CVSS briefing", wait=True)
44
+ print(f"Task status: {task.state}")
45
+ print(f"Result: {task.result}")
46
+
47
+ # 3. Launch a collaborative multi-agent swarm
48
+ swarm = fleet.launch_swarm(
49
+ name="Fintech Mobile Audit",
50
+ mission="Full-Stack Dev + QA Tester + CyberSec PenTester collaborative sweep",
51
+ )
52
+
53
+ # 4. Pocket TTS Voice Co-Pilot
54
+ fleet.speak("All tasks completed successfully, operator.", voice="shadow")
55
+ ```
56
+
57
+ ---
58
+
59
+ ## 🛠️ Command-Line Interface (`fleetctl`)
60
+
61
+ The `fleetctl` command-line utility provides full administrative control, live telemetry, and system diagnostics:
62
+
63
+ ```bash
64
+ # 1. Configuration & Authentication
65
+ fleetctl config set-url http://localhost:8080
66
+ fleetctl login admin@example.com
67
+
68
+ # 2. Comprehensive Diagnostics & Health Check
69
+ fleetctl diagnostics
70
+
71
+ # 3. List and Inspect Instances
72
+ fleetctl list
73
+ fleetctl inspect <instance_id>
74
+
75
+ # 4. Deploy Bots
76
+ fleetctl deploy --archetype cyber_ops --name "nightly-scanner"
77
+
78
+ # 5. Execute Tasks & Stream Live Execution
79
+ fleetctl run <instance_id> "Refactor backend authentication and run unit tests" --wait
80
+
81
+ # 6. Multi-Agent Swarm Mission Control
82
+ fleetctl swarm list
83
+ fleetctl swarm launch --name "Security Sweep" --mission "Penetration test staging endpoints"
84
+ fleetctl swarm watch <swarm_id>
85
+
86
+ # 7. Real-Time Pocket TTS Voice
87
+ fleetctl voice list
88
+ fleetctl voice speak "System operational and standing by." --voice shadow
89
+
90
+ # 8. Webhook & Autopilot Sinks
91
+ fleetctl webhooks list
92
+ fleetctl webhooks trigger github-pr-sync --data '{"pr": 42}'
93
+ ```
@@ -0,0 +1,30 @@
1
+ """AgentFleet Python SDK."""
2
+
3
+ from agentfleet.bot import Bot
4
+ from agentfleet.client import FleetClient
5
+ from agentfleet.exceptions import (
6
+ FleetApiError,
7
+ FleetAuthError,
8
+ FleetError,
9
+ FleetNotFoundError,
10
+ FleetTimeoutError,
11
+ )
12
+ from agentfleet.models import InstanceInfo, SwarmTeamInfo, TaskInfo
13
+ from agentfleet.swarm import Swarm
14
+ from agentfleet.task import Task
15
+
16
+ __version__ = "1.0.0"
17
+ __all__ = [
18
+ "FleetClient",
19
+ "Bot",
20
+ "Task",
21
+ "Swarm",
22
+ "InstanceInfo",
23
+ "TaskInfo",
24
+ "SwarmTeamInfo",
25
+ "FleetError",
26
+ "FleetApiError",
27
+ "FleetAuthError",
28
+ "FleetNotFoundError",
29
+ "FleetTimeoutError",
30
+ ]
@@ -0,0 +1,88 @@
1
+ """Bot instance abstraction."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import TYPE_CHECKING, Any, Optional
6
+
7
+ from agentfleet.models import InstanceInfo, TaskInfo
8
+ from agentfleet.task import Task
9
+
10
+ if TYPE_CHECKING:
11
+ from agentfleet.client import FleetClient
12
+
13
+
14
+ class Bot:
15
+ """Represents a provisioned sandbox bot instance."""
16
+
17
+ def __init__(self, client: FleetClient, info: InstanceInfo) -> None:
18
+ self._client = client
19
+ self.info = info
20
+
21
+ @property
22
+ def id(self) -> str:
23
+ return self.info.id
24
+
25
+ @property
26
+ def name(self) -> str:
27
+ return self.info.name
28
+
29
+ @property
30
+ def archetype_id(self) -> Optional[str]:
31
+ return self.info.archetype_id
32
+
33
+ @property
34
+ def state(self) -> str:
35
+ return self.info.state
36
+
37
+ @property
38
+ def tier(self) -> str:
39
+ return self.info.tier
40
+
41
+ def refresh(self) -> Bot:
42
+ """Fetches the latest state from the orchestrator."""
43
+ data = self._client._get(f"/api/instances/{self.id}")
44
+ self.info = InstanceInfo.from_dict(data)
45
+ return self
46
+
47
+ def start(self) -> Bot:
48
+ """Starts the sandbox container."""
49
+ self._client._post(f"/api/instances/{self.id}/start")
50
+ return self.refresh()
51
+
52
+ def stop(self) -> Bot:
53
+ """Stops the sandbox container."""
54
+ self._client._post(f"/api/instances/{self.id}/stop")
55
+ return self.refresh()
56
+
57
+ def delete(self) -> None:
58
+ """Destroys and removes the sandbox container."""
59
+ self._client._delete(f"/api/instances/{self.id}")
60
+
61
+ def run(
62
+ self,
63
+ goal: str,
64
+ max_steps: int = 60,
65
+ auto_refine: bool = True,
66
+ wait: bool = False,
67
+ timeout: float = 600.0,
68
+ ) -> Task:
69
+ """Dispatches an autonomous goal to this bot."""
70
+ payload = {
71
+ "instance_id": self.id,
72
+ "goal": goal,
73
+ "max_steps": max_steps,
74
+ "auto_refine": auto_refine,
75
+ }
76
+ res = self._client._post("/api/tasks", payload)
77
+ task = Task(self._client, TaskInfo.from_dict(res))
78
+ if wait:
79
+ task.wait(timeout=timeout)
80
+ return task
81
+
82
+ def observe(self) -> dict[str, Any]:
83
+ """Captures a live visual frame and active window telemetry."""
84
+ return self._client._get(f"/api/instances/{self.id}/observe")
85
+
86
+ def stats(self) -> dict[str, Any]:
87
+ """Gets CPU, RAM, and network I/O statistics."""
88
+ return self._client._get(f"/api/instances/{self.id}/stats")