-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.ts
More file actions
37 lines (32 loc) · 1.05 KB
/
main.ts
File metadata and controls
37 lines (32 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Framework-agnostic agent orchestration - TypeScript example.
*
* Submit a document processing task. Any agent - LangGraph, CrewAI,
* AutoGen, or raw code - can handle it. No framework lock-in.
*
* Usage:
* npm install @axme/axme
* export AXME_API_KEY="your-key"
* npx tsx main.ts
*/
import { AxmeClient } from "@axme/axme";
async function main() {
const client = new AxmeClient({ apiKey: process.env.AXME_API_KEY! });
const intentId = await client.sendIntent({
intentType: "intent.orchestration.generic_task.v1",
toAgent: "agent://myorg/production/generic-processor",
payload: {
taskId: "ORCH-2026-0015",
taskType: "document_processing",
input: {
documentUrl: "s3://docs/contract-v3.pdf",
actions: ["extract_clauses", "check_compliance", "generate_summary"],
},
requestedBy: "legal-pipeline",
},
});
console.log(`Intent submitted: ${intentId}`);
const result = await client.waitFor(intentId);
console.log(`Final status: ${result.status}`);
}
main().catch(console.error);