@axonpush/wizard 0.0.4 → 0.0.6
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 +30 -11
- package/dist/bin.js +22653 -292
- package/package.json +50 -11
- package/skills/anthropic/SKILL.md +6 -2
- package/skills/crewai/SKILL.md +6 -2
- package/skills/{core → custom}/SKILL.md +10 -6
- package/skills/deepagents/SKILL.md +61 -0
- package/skills/langchain/SKILL.md +6 -2
- package/skills/openai-agents/SKILL.md +6 -2
- package/skills/otel-python/SKILL.md +96 -0
- package/skills/otel-ts/SKILL.md +89 -0
- package/skills/ts-anthropic/SKILL.md +51 -0
- package/skills/ts-custom/SKILL.md +46 -0
- package/skills/ts-google-adk/SKILL.md +52 -0
- package/skills/ts-langchain/SKILL.md +50 -0
- package/skills/ts-langgraph/SKILL.md +46 -0
- package/skills/ts-llamaindex/SKILL.md +52 -0
- package/skills/ts-mastra/SKILL.md +51 -0
- package/skills/ts-openai-agents/SKILL.md +45 -0
- package/skills/ts-vercel-ai/SKILL.md +52 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ts-langgraph
|
|
3
|
+
description: Integrate AxonPush tracing into a TypeScript LangGraph project
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AxonPush + LangGraph (TypeScript) Integration
|
|
7
|
+
|
|
8
|
+
Integrate AxonPush tracing into a TypeScript LangGraph project.
|
|
9
|
+
|
|
10
|
+
## What gets added
|
|
11
|
+
|
|
12
|
+
- `AxonPushLangGraphHandler` that extends `AxonPushCallbackHandler` with graph node-level tracing
|
|
13
|
+
- Events: `chain.start`, `chain.end`, `graph.node.start`, `graph.node.end`, `llm.start`, `llm.end`, `tool.*.start`, `tool.end`
|
|
14
|
+
|
|
15
|
+
## Reference Code
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { AxonPush } from "@axonpush/sdk";
|
|
19
|
+
import { AxonPushLangGraphHandler } from "@axonpush/sdk/integrations/langgraph";
|
|
20
|
+
|
|
21
|
+
const axonpush = new AxonPush({
|
|
22
|
+
apiKey: process.env.AXONPUSH_API_KEY!,
|
|
23
|
+
tenantId: process.env.AXONPUSH_TENANT_ID!,
|
|
24
|
+
baseUrl: process.env.AXONPUSH_BASE_URL,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const handler = new AxonPushLangGraphHandler({
|
|
28
|
+
client: axonpush,
|
|
29
|
+
channelId: Number(process.env.AXONPUSH_CHANNEL_ID),
|
|
30
|
+
agentId: "langgraph-agent",
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// const result = await graph.invoke(input, { callbacks: [handler] });
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Steps
|
|
37
|
+
|
|
38
|
+
1. Install `@axonpush/sdk` using the project's package manager
|
|
39
|
+
2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL, AXONPUSH_CHANNEL_ID to .env
|
|
40
|
+
3. Find the main file where the LangGraph graph is invoked
|
|
41
|
+
4. Add the imports and client initialization (as module-level code)
|
|
42
|
+
5. Add `{ callbacks: [handler] }` to `.invoke()` calls
|
|
43
|
+
|
|
44
|
+
## Fail-Open
|
|
45
|
+
|
|
46
|
+
The SDK is fail-open by default (`failOpen: true`). If AxonPush is unreachable, tracing callbacks are silently suppressed.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ts-llamaindex
|
|
3
|
+
description: Integrate AxonPush tracing into a TypeScript LlamaIndex project
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AxonPush + LlamaIndex (TypeScript) Integration
|
|
7
|
+
|
|
8
|
+
Integrate AxonPush tracing into a TypeScript LlamaIndex project.
|
|
9
|
+
|
|
10
|
+
## What gets added
|
|
11
|
+
|
|
12
|
+
- `AxonPushLlamaIndexHandler` with LLM, embedding, retriever, and query lifecycle methods
|
|
13
|
+
- Events: `llm.start`, `llm.end`, `llm.token`, `embedding.start`, `embedding.end`, `retriever.query`, `retriever.result`, `query.start`, `query.end`
|
|
14
|
+
|
|
15
|
+
## Reference Code
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { AxonPush } from "@axonpush/sdk";
|
|
19
|
+
import { AxonPushLlamaIndexHandler } from "@axonpush/sdk/integrations/llamaindex";
|
|
20
|
+
|
|
21
|
+
const axonpush = new AxonPush({
|
|
22
|
+
apiKey: process.env.AXONPUSH_API_KEY!,
|
|
23
|
+
tenantId: process.env.AXONPUSH_TENANT_ID!,
|
|
24
|
+
baseUrl: process.env.AXONPUSH_BASE_URL,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const handler = new AxonPushLlamaIndexHandler({
|
|
28
|
+
client: axonpush,
|
|
29
|
+
channelId: Number(process.env.AXONPUSH_CHANNEL_ID),
|
|
30
|
+
agentId: "llamaindex",
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// Call handler methods at the appropriate points:
|
|
34
|
+
// handler.onQueryStart("What is...");
|
|
35
|
+
// handler.onLLMStart("gpt-4", 1);
|
|
36
|
+
// handler.onLLMEnd(output);
|
|
37
|
+
// handler.onRetrieverStart("What is...");
|
|
38
|
+
// handler.onRetrieverEnd(5);
|
|
39
|
+
// handler.onQueryEnd(response);
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Steps
|
|
43
|
+
|
|
44
|
+
1. Install `@axonpush/sdk` using the project's package manager
|
|
45
|
+
2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL, AXONPUSH_CHANNEL_ID to .env
|
|
46
|
+
3. Find the main query engine or retrieval pipeline
|
|
47
|
+
4. Add imports and create the handler
|
|
48
|
+
5. Call the appropriate handler methods at each lifecycle point
|
|
49
|
+
|
|
50
|
+
## Fail-Open
|
|
51
|
+
|
|
52
|
+
The SDK is fail-open by default (`failOpen: true`). If AxonPush is unreachable, handler calls are silently suppressed.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ts-mastra
|
|
3
|
+
description: Integrate AxonPush tracing into a Mastra project
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AxonPush + Mastra Integration
|
|
7
|
+
|
|
8
|
+
Integrate AxonPush tracing into a project using Mastra.
|
|
9
|
+
|
|
10
|
+
## What gets added
|
|
11
|
+
|
|
12
|
+
- `AxonPushMastraHooks` with tool and workflow lifecycle methods
|
|
13
|
+
- Events: `tool.*.start`, `tool.*.end`, `workflow.start`, `workflow.end`, `workflow.error`
|
|
14
|
+
|
|
15
|
+
## Reference Code
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { AxonPush } from "@axonpush/sdk";
|
|
19
|
+
import { AxonPushMastraHooks } from "@axonpush/sdk/integrations/mastra";
|
|
20
|
+
|
|
21
|
+
const axonpush = new AxonPush({
|
|
22
|
+
apiKey: process.env.AXONPUSH_API_KEY!,
|
|
23
|
+
tenantId: process.env.AXONPUSH_TENANT_ID!,
|
|
24
|
+
baseUrl: process.env.AXONPUSH_BASE_URL,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const hooks = new AxonPushMastraHooks({
|
|
28
|
+
client: axonpush,
|
|
29
|
+
channelId: Number(process.env.AXONPUSH_CHANNEL_ID),
|
|
30
|
+
agentId: "mastra",
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// In your workflow or agent:
|
|
34
|
+
// hooks.onWorkflowStart("my-workflow", input);
|
|
35
|
+
// hooks.beforeToolUse("tool-name", input);
|
|
36
|
+
// hooks.afterToolUse("tool-name", output);
|
|
37
|
+
// hooks.onWorkflowEnd("my-workflow", output);
|
|
38
|
+
// hooks.onWorkflowError("my-workflow", error);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Steps
|
|
42
|
+
|
|
43
|
+
1. Install `@axonpush/sdk` using the project's package manager
|
|
44
|
+
2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL, AXONPUSH_CHANNEL_ID to .env
|
|
45
|
+
3. Find the main workflow or agent entry point
|
|
46
|
+
4. Add imports and create the hooks instance
|
|
47
|
+
5. Call the appropriate hook methods at workflow/tool lifecycle points
|
|
48
|
+
|
|
49
|
+
## Fail-Open
|
|
50
|
+
|
|
51
|
+
The SDK is fail-open by default (`failOpen: true`). If AxonPush is unreachable, hook calls are silently suppressed.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ts-openai-agents
|
|
3
|
+
description: Integrate AxonPush tracing into a TypeScript OpenAI Agents SDK project
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AxonPush + OpenAI Agents SDK (TypeScript) Integration
|
|
7
|
+
|
|
8
|
+
Integrate AxonPush tracing into a TypeScript project using the OpenAI Agents SDK.
|
|
9
|
+
|
|
10
|
+
## What gets added
|
|
11
|
+
|
|
12
|
+
- `AxonPushRunHooks` that traces agent runs, tool calls, and handoffs
|
|
13
|
+
- Events: `agent.run.start`, `agent.run.end`, `tool.*.start`, `tool.*.end`, `agent.handoff`
|
|
14
|
+
|
|
15
|
+
## Reference Code
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { AxonPush } from "@axonpush/sdk";
|
|
19
|
+
import { AxonPushRunHooks } from "@axonpush/sdk/integrations/openai-agents";
|
|
20
|
+
|
|
21
|
+
const axonpush = new AxonPush({
|
|
22
|
+
apiKey: process.env.AXONPUSH_API_KEY!,
|
|
23
|
+
tenantId: process.env.AXONPUSH_TENANT_ID!,
|
|
24
|
+
baseUrl: process.env.AXONPUSH_BASE_URL,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const hooks = new AxonPushRunHooks({
|
|
28
|
+
client: axonpush,
|
|
29
|
+
channelId: Number(process.env.AXONPUSH_CHANNEL_ID),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// const result = await Runner.run(agent, input, { hooks });
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Steps
|
|
36
|
+
|
|
37
|
+
1. Install `@axonpush/sdk` using the project's package manager
|
|
38
|
+
2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL, AXONPUSH_CHANNEL_ID to .env
|
|
39
|
+
3. Find the main file where Runner.run() is called
|
|
40
|
+
4. Add the imports and AxonPush client initialization
|
|
41
|
+
5. Pass `hooks` to `Runner.run()`
|
|
42
|
+
|
|
43
|
+
## Fail-Open
|
|
44
|
+
|
|
45
|
+
The SDK is fail-open by default (`failOpen: true`). If AxonPush is unreachable, tracing hooks are silently suppressed.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ts-vercel-ai
|
|
3
|
+
description: Integrate AxonPush tracing into a Vercel AI SDK project
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AxonPush + Vercel AI SDK Integration
|
|
7
|
+
|
|
8
|
+
Integrate AxonPush tracing into a project using the Vercel AI SDK.
|
|
9
|
+
|
|
10
|
+
## What gets added
|
|
11
|
+
|
|
12
|
+
- `axonPushMiddleware` that wraps generateText/streamText with tracing
|
|
13
|
+
- Events: `llm.start`, `llm.end`, `llm.token` (streaming)
|
|
14
|
+
|
|
15
|
+
## Reference Code
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { AxonPush } from "@axonpush/sdk";
|
|
19
|
+
import { axonPushMiddleware } from "@axonpush/sdk/integrations/vercel-ai";
|
|
20
|
+
import { generateText, streamText, wrapLanguageModel } from "ai";
|
|
21
|
+
|
|
22
|
+
const axonpush = new AxonPush({
|
|
23
|
+
apiKey: process.env.AXONPUSH_API_KEY!,
|
|
24
|
+
tenantId: process.env.AXONPUSH_TENANT_ID!,
|
|
25
|
+
baseUrl: process.env.AXONPUSH_BASE_URL,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const middleware = axonPushMiddleware({
|
|
29
|
+
client: axonpush,
|
|
30
|
+
channelId: Number(process.env.AXONPUSH_CHANNEL_ID),
|
|
31
|
+
agentId: "vercel-ai",
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// Option A: wrap the model
|
|
35
|
+
// const tracedModel = wrapLanguageModel({ model: openai("gpt-4o"), middleware });
|
|
36
|
+
// const result = await generateText({ model: tracedModel, prompt: "..." });
|
|
37
|
+
|
|
38
|
+
// Option B: pass middleware directly (if supported)
|
|
39
|
+
// const result = await generateText({ model, prompt: "...", experimental_telemetry: { middleware } });
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Steps
|
|
43
|
+
|
|
44
|
+
1. Install `@axonpush/sdk` using the project's package manager
|
|
45
|
+
2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL, AXONPUSH_CHANNEL_ID to .env
|
|
46
|
+
3. Find files that call `generateText()` or `streamText()`
|
|
47
|
+
4. Add imports and create the middleware
|
|
48
|
+
5. Wrap the language model using `wrapLanguageModel({ model, middleware })`
|
|
49
|
+
|
|
50
|
+
## Fail-Open
|
|
51
|
+
|
|
52
|
+
The SDK is fail-open by default (`failOpen: true`). If AxonPush is unreachable, the middleware passes through without tracing.
|