@kanyun-ai-infra/agenthub 0.1.0

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.
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # @kanyun-ai-infra/agenthub
2
+
3
+ Typed SDK for the Pilot v2 Control Plane API.
4
+
5
+ ```ts
6
+ import { PilotPlatformClient } from "@kanyun-ai-infra/agenthub";
7
+
8
+ const pilot = new PilotPlatformClient({
9
+ controlPlaneUrl: "https://pilot-control-plane.example.com",
10
+ token: process.env.PILOT_TOKEN,
11
+ });
12
+
13
+ const project = await pilot.projects.create({
14
+ slug: "acme-project",
15
+ displayName: "Acme Project",
16
+ });
17
+
18
+ await pilot.workloads.create({
19
+ projectId: project.id,
20
+ slug: "acme-agent",
21
+ displayName: "Acme Agent",
22
+ kind: "managed_agent",
23
+ defaults: {
24
+ model: "claude-opus-4-7",
25
+ systemPrompt: "You are the Acme support agent.",
26
+ },
27
+ });
28
+
29
+ const revision = await pilot.workloads.publishRevision({
30
+ projectId: project.id,
31
+ workloadSlug: "acme-agent",
32
+ version: "v1",
33
+ workerContract: { kind: "managed_agent" },
34
+ });
35
+
36
+ const session = await pilot.sessions.create({
37
+ projectId: project.id,
38
+ workloadId: revision.workloadId,
39
+ });
40
+
41
+ await pilot.sessions.wait(session.sessionId);
42
+ ```
43
+
44
+ This package talks directly to `apps/control-plane`. The legacy
45
+ `@kanyun-ai-infra/pilot` package remains available for the portal/BFF
46
+ `agents` and `runs` workflows.