@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axonpush/wizard",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "AI-powered wizard to integrate AxonPush into your AI agent project",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,22 +12,61 @@
12
12
  "skills"
13
13
  ],
14
14
  "scripts": {
15
- "build": "tsup",
16
- "dev": "tsx src/bin.ts",
17
- "start": "node dist/bin.js"
15
+ "build": "bun run scripts/build.ts",
16
+ "dev": "bun src/bin.ts",
17
+ "start": "bun dist/bin.js",
18
+ "typecheck": "tsc --noEmit"
18
19
  },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "https://github.com/axonpush/wizard"
23
+ },
24
+ "keywords": [
25
+ "axonpush",
26
+ "observability",
27
+ "tracing",
28
+ "opentelemetry",
29
+ "otel",
30
+ "ai",
31
+ "agents",
32
+ "ai-agents",
33
+ "llm",
34
+ "sdk",
35
+ "wizard",
36
+ "cli",
37
+ "langchain",
38
+ "langgraph",
39
+ "openai",
40
+ "openai-agents",
41
+ "anthropic",
42
+ "claude",
43
+ "vercel-ai",
44
+ "mastra",
45
+ "crewai",
46
+ "llamaindex",
47
+ "google-adk",
48
+ "logging",
49
+ "pino",
50
+ "winston",
51
+ "loguru",
52
+ "structlog",
53
+ "typescript",
54
+ "python"
55
+ ],
19
56
  "dependencies": {
20
- "@anthropic-ai/claude-code": "^0.2.20",
21
- "chalk": "^5.4.1",
22
- "ora": "^8.2.0",
23
- "prompts": "^2.4.2",
57
+ "@anthropic-ai/claude-agent-sdk": "^0.2.87",
58
+ "ink": "^6.8.0",
59
+ "ink-select-input": "^6.2.0",
60
+ "ink-spinner": "^5.0.0",
61
+ "ink-text-input": "^6.0.0",
62
+ "js-toml": "^1.0.3",
63
+ "react": "^19.2.4",
24
64
  "yargs": "^17.7.2"
25
65
  },
26
66
  "devDependencies": {
27
- "@types/prompts": "^2.4.9",
67
+ "@types/bun": "latest",
68
+ "@types/react": "^19.2.14",
28
69
  "@types/yargs": "^17.0.33",
29
- "tsup": "^8.4.0",
30
- "tsx": "^4.19.0",
31
70
  "typescript": "^5.7.0"
32
71
  }
33
72
  }
@@ -27,7 +27,7 @@ axonpush_client = AxonPush(
27
27
 
28
28
  tracer = AxonPushAnthropicTracer(
29
29
  client=axonpush_client,
30
- channel_id=1, # Replace with your channel ID
30
+ channel_id=int(os.environ["AXONPUSH_CHANNEL_ID"]),
31
31
  agent_id="claude-agent",
32
32
  )
33
33
 
@@ -45,8 +45,12 @@ tracer = AxonPushAnthropicTracer(
45
45
  ## Steps
46
46
 
47
47
  1. Install `axonpush[anthropic]` using the project's package manager
48
- 2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL to .env
48
+ 2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL, AXONPUSH_CHANNEL_ID to .env
49
49
  3. Find files that call `client.messages.create()` (the Anthropic API)
50
50
  4. Add imports and create the tracer
51
51
  5. Replace `anthropic_client.messages.create(...)` with `tracer.create_message(anthropic_client, ...)`
52
52
  6. For tool results, add `tracer.send_tool_result(tool_use_id, result)` calls
53
+
54
+ ## Fail-Open
55
+
56
+ The SDK is fail-open by default (`fail_open=True`). If AxonPush is unreachable, tracing calls are silently suppressed — the Anthropic integration will never crash or block the user's application.
@@ -27,7 +27,7 @@ axonpush_client = AxonPush(
27
27
 
28
28
  axonpush_callbacks = AxonPushCrewCallbacks(
29
29
  client=axonpush_client,
30
- channel_id=1, # Replace with your channel ID
30
+ channel_id=int(os.environ["AXONPUSH_CHANNEL_ID"]),
31
31
  agent_id="crewai",
32
32
  )
33
33
 
@@ -46,9 +46,13 @@ axonpush_callbacks = AxonPushCrewCallbacks(
46
46
  ## Steps
47
47
 
48
48
  1. Install `axonpush[crewai]` using the project's package manager
49
- 2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL to .env
49
+ 2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL, AXONPUSH_CHANNEL_ID to .env
50
50
  3. Find the file where `Crew(...)` is instantiated
51
51
  4. Add imports and create the callbacks object
52
52
  5. Add `step_callback=axonpush_callbacks.on_step` and `task_callback=axonpush_callbacks.on_task_complete` to `Crew()`
53
53
  6. Add `axonpush_callbacks.on_crew_start()` before `crew.kickoff()`
54
54
  7. Add `axonpush_callbacks.on_crew_end(result)` after
55
+
56
+ ## Fail-Open
57
+
58
+ The SDK is fail-open by default (`fail_open=True`). If AxonPush is unreachable, tracing callbacks are silently suppressed — the CrewAI integration will never crash or block the user's application.
@@ -1,11 +1,11 @@
1
1
  ---
2
- name: core
3
- description: Integrate AxonPush event publishing directly without framework-specific callbacks
2
+ name: custom
3
+ description: Integrate AxonPush event publishing directly for custom or unsupported frameworks
4
4
  ---
5
5
 
6
- # AxonPush Core SDK Integration
6
+ # AxonPush Custom Framework Integration
7
7
 
8
- Integrate AxonPush event publishing directly (no framework-specific callbacks).
8
+ Integrate AxonPush event publishing directly for custom or unsupported frameworks.
9
9
 
10
10
  ## What gets added
11
11
 
@@ -28,7 +28,7 @@ axonpush_client = AxonPush(
28
28
  # axonpush_client.events.publish(
29
29
  # identifier="my.event",
30
30
  # payload={"key": "value"},
31
- # channel_id=1,
31
+ # channel_id=int(os.environ["AXONPUSH_CHANNEL_ID"]),
32
32
  # agent_id="my-agent",
33
33
  # event_type=EventType.CUSTOM,
34
34
  # )
@@ -37,7 +37,11 @@ axonpush_client = AxonPush(
37
37
  ## Steps
38
38
 
39
39
  1. Install `axonpush` using the project's package manager
40
- 2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL to .env
40
+ 2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL, AXONPUSH_CHANNEL_ID to .env
41
41
  3. Find the main entry point of the project
42
42
  4. Add imports and create the client as a module-level singleton
43
43
  5. Add example publish calls at key points (e.g., start, end, error handling)
44
+
45
+ ## Fail-Open
46
+
47
+ The SDK is fail-open by default (`fail_open=True`). If AxonPush is unreachable, publish calls return `None` instead of raising — the SDK will never crash or block the user's application.
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: deepagents
3
+ description: Integrate AxonPush tracing into a LangChain Deep Agents project
4
+ ---
5
+
6
+ # AxonPush + Deep Agents Integration
7
+
8
+ Integrate AxonPush tracing into a project using LangChain Deep Agents (`deepagents` package).
9
+
10
+ ## What gets added
11
+
12
+ - `AxonPushDeepAgentHandler` that auto-traces chain/LLM/tool lifecycle events with Deep Agent-specific awareness
13
+ - Planning events: `planning.update`, `planning.complete` (when `write_todos` is called)
14
+ - Subagent events: `subagent.spawn`, `subagent.complete` (when `task` tool delegates work)
15
+ - Filesystem events: `filesystem.read`, `filesystem.write` (for `read_file`, `write_file`, `edit_file`, `ls`, `glob`, `grep`)
16
+ - Sandbox events: `sandbox.execute` (for `execute` tool)
17
+ - Standard events: `chain.start/end`, `llm.start/end`, `tool.*.start`, `tool.end`
18
+
19
+ ## Reference Code
20
+
21
+ ```python
22
+ import os
23
+ from deepagents import create_deep_agent
24
+ from axonpush import AxonPush
25
+ from axonpush.integrations.deepagents import AxonPushDeepAgentHandler
26
+
27
+ axonpush_client = AxonPush(
28
+ api_key=os.environ["AXONPUSH_API_KEY"],
29
+ tenant_id=os.environ["AXONPUSH_TENANT_ID"],
30
+ base_url=os.environ.get("AXONPUSH_BASE_URL", "https://api.axonpush.xyz"),
31
+ )
32
+
33
+ axonpush_handler = AxonPushDeepAgentHandler(
34
+ client=axonpush_client,
35
+ channel_id=int(os.environ["AXONPUSH_CHANNEL_ID"]),
36
+ agent_id="deep-agent",
37
+ )
38
+
39
+ agent = create_deep_agent(
40
+ tools=[],
41
+ system_prompt="You are a helpful assistant.",
42
+ )
43
+
44
+ # Run with AxonPush tracing
45
+ result = agent.invoke(
46
+ {"messages": [{"role": "user", "content": "Research AI frameworks"}]},
47
+ config={"callbacks": [axonpush_handler]},
48
+ )
49
+ ```
50
+
51
+ ## Steps
52
+
53
+ 1. Install `axonpush[deepagents]` using the project's package manager
54
+ 2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL, AXONPUSH_CHANNEL_ID to .env
55
+ 3. Find the main file where `create_deep_agent()` or `agent.invoke()` is called
56
+ 4. Add the imports and client initialization (as module-level code)
57
+ 5. Add `config={"callbacks": [axonpush_handler]}` to `.invoke()` calls
58
+
59
+ ## Fail-Open
60
+
61
+ The SDK is fail-open by default (`fail_open=True`). If AxonPush is unreachable, tracing callbacks are silently suppressed — the Deep Agents integration will never crash or block the user's application.
@@ -27,7 +27,7 @@ axonpush_client = AxonPush(
27
27
 
28
28
  axonpush_handler = AxonPushCallbackHandler(
29
29
  client=axonpush_client,
30
- channel_id=1, # Replace with your channel ID
30
+ channel_id=int(os.environ["AXONPUSH_CHANNEL_ID"]),
31
31
  agent_id="my-agent",
32
32
  )
33
33
 
@@ -41,7 +41,11 @@ axonpush_handler = AxonPushCallbackHandler(
41
41
  ## Steps
42
42
 
43
43
  1. Install `axonpush[langchain]` using the project's package manager
44
- 2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL to .env
44
+ 2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL, AXONPUSH_CHANNEL_ID to .env
45
45
  3. Find the main file where chains/agents are invoked
46
46
  4. Add the imports and client initialization (as module-level code)
47
47
  5. Add `config={"callbacks": [axonpush_handler]}` to `.invoke()` calls
48
+
49
+ ## Fail-Open
50
+
51
+ The SDK is fail-open by default (`fail_open=True`). If AxonPush is unreachable, tracing callbacks are silently suppressed — the LangChain integration will never crash or block the user's application.
@@ -27,7 +27,7 @@ axonpush_client = AsyncAxonPush(
27
27
 
28
28
  axonpush_hooks = AxonPushRunHooks(
29
29
  client=axonpush_client,
30
- channel_id=1, # Replace with your channel ID
30
+ channel_id=int(os.environ["AXONPUSH_CHANNEL_ID"]),
31
31
  )
32
32
 
33
33
  # Usage:
@@ -37,7 +37,7 @@ axonpush_hooks = AxonPushRunHooks(
37
37
  ## Steps
38
38
 
39
39
  1. Install `axonpush[openai-agents]` using the project's package manager
40
- 2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL to .env
40
+ 2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL, AXONPUSH_CHANNEL_ID to .env
41
41
  3. Find the main file where Runner.run() is called
42
42
  4. Add the imports and AsyncAxonPush client (this SDK is async-only)
43
43
  5. Pass `hooks=axonpush_hooks` to `Runner.run()`
@@ -47,3 +47,7 @@ axonpush_hooks = AxonPushRunHooks(
47
47
  - OpenAI Agents SDK is **async-only**, so use `AsyncAxonPush` (not `AxonPush`)
48
48
  - Make sure to close the client when done: `await axonpush_client.close()`
49
49
  - Or use `async with AsyncAxonPush(...) as client:` context manager
50
+
51
+ ## Fail-Open
52
+
53
+ The SDK is fail-open by default (`fail_open=True`). If AxonPush is unreachable, tracing hooks are silently suppressed — the OpenAI Agents integration will never crash or block the user's application.
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: otel-python
3
+ description: Wire AxonPushSpanExporter into a Python project's OpenTelemetry TracerProvider
4
+ ---
5
+
6
+ # AxonPush + OpenTelemetry (Python) Integration
7
+
8
+ Forward OpenTelemetry spans from a Python service into AxonPush via `AxonPushSpanExporter`.
9
+
10
+ ## What gets added
11
+
12
+ - `AxonPushSpanExporter` attached to the project's `TracerProvider` through a `BatchSpanProcessor`
13
+ - Every OTel span is re-emitted as an `app.span` event with full trace_id, span_id, attributes, events, and links preserved
14
+
15
+ ## Install
16
+
17
+ Requires the `otel` extra:
18
+
19
+ ```bash
20
+ pip install "axonpush[otel]"
21
+ # or: uv add "axonpush[otel]"
22
+ # or: poetry add "axonpush[otel]"
23
+ ```
24
+
25
+ ## Reference Code — New Provider
26
+
27
+ Use this path when the project does **not** already have a `TracerProvider`.
28
+
29
+ ```python
30
+ import os
31
+ from opentelemetry import trace
32
+ from opentelemetry.sdk.resources import Resource
33
+ from opentelemetry.sdk.trace import TracerProvider
34
+ from opentelemetry.sdk.trace.export import BatchSpanProcessor
35
+
36
+ from axonpush import AxonPush
37
+ from axonpush.integrations.otel import AxonPushSpanExporter
38
+
39
+ axonpush_client = AxonPush(
40
+ api_key=os.environ["AXONPUSH_API_KEY"],
41
+ tenant_id=os.environ["AXONPUSH_TENANT_ID"],
42
+ base_url=os.environ.get("AXONPUSH_BASE_URL", "https://api.axonpush.xyz"),
43
+ )
44
+
45
+ provider = TracerProvider(resource=Resource.create({"service.name": "my-service"}))
46
+ provider.add_span_processor(
47
+ BatchSpanProcessor(
48
+ AxonPushSpanExporter(
49
+ client=axonpush_client,
50
+ channel_id=int(os.environ["AXONPUSH_CHANNEL_ID"]),
51
+ service_name="my-service",
52
+ )
53
+ )
54
+ )
55
+ trace.set_tracer_provider(provider)
56
+
57
+ tracer = trace.get_tracer(__name__)
58
+ ```
59
+
60
+ ## Reference Code — Existing Provider
61
+
62
+ Use this path when the project already calls `trace.set_tracer_provider(...)` or uses an auto-instrumentation entrypoint. Never register a second global provider — attach to the existing one.
63
+
64
+ ```python
65
+ from opentelemetry import trace
66
+ from opentelemetry.sdk.trace import TracerProvider
67
+ from opentelemetry.sdk.trace.export import BatchSpanProcessor
68
+
69
+ from axonpush import AxonPush
70
+ from axonpush.integrations.otel import AxonPushSpanExporter
71
+
72
+ provider = trace.get_tracer_provider()
73
+ if isinstance(provider, TracerProvider):
74
+ provider.add_span_processor(
75
+ BatchSpanProcessor(
76
+ AxonPushSpanExporter(
77
+ client=AxonPush(api_key=os.environ["AXONPUSH_API_KEY"], tenant_id=os.environ["AXONPUSH_TENANT_ID"]),
78
+ channel_id=int(os.environ["AXONPUSH_CHANNEL_ID"]),
79
+ service_name="my-service",
80
+ )
81
+ )
82
+ )
83
+ ```
84
+
85
+ ## Steps
86
+
87
+ 1. Install `axonpush[otel]` using the project's package manager
88
+ 2. Add `AXONPUSH_API_KEY`, `AXONPUSH_TENANT_ID`, `AXONPUSH_BASE_URL`, `AXONPUSH_CHANNEL_ID` to `.env`
89
+ 3. Detect whether a `TracerProvider` already exists in the project (search for `set_tracer_provider`, `TracerProvider(`, or auto-instrumentation setup in the main module)
90
+ 4. If one exists, attach `AxonPushSpanExporter` to it via `BatchSpanProcessor`
91
+ 5. If none exists, create one (see "New Provider") using the project name as `service.name`
92
+ 6. Use `BatchSpanProcessor`, never `SimpleSpanProcessor`, in production
93
+
94
+ ## Fail-Open
95
+
96
+ `AxonPush(fail_open=True)` is the default. If AxonPush is unreachable the exporter silently drops spans — no application impact.
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: otel-ts
3
+ description: Wire AxonPushSpanExporter into a TypeScript/Node project's OpenTelemetry TracerProvider
4
+ ---
5
+
6
+ # AxonPush + OpenTelemetry (TypeScript) Integration
7
+
8
+ Forward OpenTelemetry spans from a Node.js service into AxonPush via `AxonPushSpanExporter`.
9
+
10
+ ## What gets added
11
+
12
+ - `AxonPushSpanExporter` attached to the project's `TracerProvider` through a `BatchSpanProcessor`
13
+ - Every OTel span is re-emitted as an `app.span` event with full traceId, spanId, attributes, events, and links preserved
14
+
15
+ ## Install
16
+
17
+ `@opentelemetry/api` and `@opentelemetry/sdk-trace-base` are optional peer dependencies. Install them alongside `@axonpush/sdk`:
18
+
19
+ ```bash
20
+ bun add @axonpush/sdk @opentelemetry/api @opentelemetry/sdk-trace-base @opentelemetry/sdk-trace-node
21
+ # or pnpm / yarn / npm equivalents
22
+ ```
23
+
24
+ ## Reference Code — New Provider
25
+
26
+ ```typescript
27
+ import { AxonPush } from "@axonpush/sdk";
28
+ import { AxonPushSpanExporter } from "@axonpush/sdk/integrations/otel";
29
+ import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
30
+ import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-base";
31
+ import { Resource } from "@opentelemetry/resources";
32
+ import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
33
+
34
+ const axonpush = new AxonPush({
35
+ apiKey: process.env.AXONPUSH_API_KEY!,
36
+ tenantId: process.env.AXONPUSH_TENANT_ID!,
37
+ baseUrl: process.env.AXONPUSH_BASE_URL,
38
+ });
39
+
40
+ const provider = new NodeTracerProvider({
41
+ resource: new Resource({ [SemanticResourceAttributes.SERVICE_NAME]: "my-service" }),
42
+ });
43
+
44
+ provider.addSpanProcessor(
45
+ new BatchSpanProcessor(
46
+ new AxonPushSpanExporter({
47
+ client: axonpush,
48
+ channelId: Number(process.env.AXONPUSH_CHANNEL_ID),
49
+ serviceName: "my-service",
50
+ }),
51
+ ),
52
+ );
53
+
54
+ provider.register();
55
+ ```
56
+
57
+ ## Reference Code — Existing Provider
58
+
59
+ Use this path when the project already registers a `TracerProvider` (e.g. via `provider.register()` or `@opentelemetry/sdk-node`). Attach to the existing provider rather than creating a second one.
60
+
61
+ ```typescript
62
+ import { trace } from "@opentelemetry/api";
63
+ import { BatchSpanProcessor, BasicTracerProvider } from "@opentelemetry/sdk-trace-base";
64
+ import { AxonPushSpanExporter } from "@axonpush/sdk/integrations/otel";
65
+
66
+ const provider = trace.getTracerProvider() as unknown as BasicTracerProvider;
67
+ provider.addSpanProcessor(
68
+ new BatchSpanProcessor(
69
+ new AxonPushSpanExporter({
70
+ client: axonpush,
71
+ channelId: Number(process.env.AXONPUSH_CHANNEL_ID),
72
+ serviceName: "my-service",
73
+ }),
74
+ ),
75
+ );
76
+ ```
77
+
78
+ ## Steps
79
+
80
+ 1. Install `@axonpush/sdk @opentelemetry/api @opentelemetry/sdk-trace-base @opentelemetry/sdk-trace-node` using the project's package manager
81
+ 2. Add `AXONPUSH_API_KEY`, `AXONPUSH_TENANT_ID`, `AXONPUSH_BASE_URL`, `AXONPUSH_CHANNEL_ID` to `.env`
82
+ 3. Detect whether a `TracerProvider` already exists in the project (search for `provider.register()`, `NodeTracerProvider(`, `NodeSDK(`, or auto-instrumentation setup)
83
+ 4. If one exists, attach `AxonPushSpanExporter` to it via `BatchSpanProcessor`
84
+ 5. If none exists, create one (see "New Provider") using the project name as `service.name`
85
+ 6. Use `BatchSpanProcessor`, never `SimpleSpanProcessor`, in production
86
+
87
+ ## Fail-Open
88
+
89
+ `new AxonPush({ failOpen: true })` is the default. If AxonPush is unreachable the exporter silently drops spans — no application impact.
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: ts-anthropic
3
+ description: Integrate AxonPush tracing into a TypeScript Anthropic SDK project
4
+ ---
5
+
6
+ # AxonPush + Anthropic/Claude (TypeScript) Integration
7
+
8
+ Integrate AxonPush tracing into a TypeScript project using the Anthropic SDK.
9
+
10
+ ## What gets added
11
+
12
+ - `AxonPushAnthropicTracer` that wraps `messages.create()` to trace conversations, tool use, and responses
13
+ - Events: `conversation.turn`, `tool.*.start`, `agent.response`, `tool.result`
14
+
15
+ ## Reference Code
16
+
17
+ ```typescript
18
+ import { AxonPush } from "@axonpush/sdk";
19
+ import { AxonPushAnthropicTracer } from "@axonpush/sdk/integrations/anthropic";
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 tracer = new AxonPushAnthropicTracer({
28
+ client: axonpush,
29
+ channelId: Number(process.env.AXONPUSH_CHANNEL_ID),
30
+ agentId: "claude-agent",
31
+ });
32
+
33
+ // Instead of: const response = await anthropic.messages.create(params)
34
+ // Use: const response = await tracer.createMessage(anthropic, params)
35
+
36
+ // For tool results:
37
+ // tracer.sendToolResult(toolUseId, result)
38
+ ```
39
+
40
+ ## Steps
41
+
42
+ 1. Install `@axonpush/sdk` using the project's package manager
43
+ 2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL, AXONPUSH_CHANNEL_ID to .env
44
+ 3. Find files that call `client.messages.create()` (the Anthropic API)
45
+ 4. Add imports and create the tracer
46
+ 5. Replace `anthropic.messages.create(params)` with `tracer.createMessage(anthropic, params)`
47
+ 6. For tool results, add `tracer.sendToolResult(toolUseId, result)` calls
48
+
49
+ ## Fail-Open
50
+
51
+ The SDK is fail-open by default (`failOpen: true`). If AxonPush is unreachable, tracing calls are silently suppressed.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: ts-custom
3
+ description: Integrate AxonPush event publishing directly for custom TypeScript frameworks
4
+ ---
5
+
6
+ # AxonPush Custom Framework Integration (TypeScript)
7
+
8
+ Integrate AxonPush event publishing directly for custom or unsupported TypeScript frameworks.
9
+
10
+ ## What gets added
11
+
12
+ - `AxonPush` client for publishing custom events
13
+ - Use `client.events.publish()` to send events from anywhere in your code
14
+
15
+ ## Reference Code
16
+
17
+ ```typescript
18
+ import { AxonPush } from "@axonpush/sdk";
19
+
20
+ const axonpush = new AxonPush({
21
+ apiKey: process.env.AXONPUSH_API_KEY!,
22
+ tenantId: process.env.AXONPUSH_TENANT_ID!,
23
+ baseUrl: process.env.AXONPUSH_BASE_URL,
24
+ });
25
+
26
+ // Publish events from your code:
27
+ // await axonpush.events.publish({
28
+ // identifier: "my.event",
29
+ // payload: { key: "value" },
30
+ // channelId: Number(process.env.AXONPUSH_CHANNEL_ID),
31
+ // agentId: "my-agent",
32
+ // eventType: "custom",
33
+ // });
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 entry point of the project
41
+ 4. Add imports and create the client as a module-level singleton
42
+ 5. Add example publish calls at key points (e.g., start, end, error handling)
43
+
44
+ ## Fail-Open
45
+
46
+ The SDK is fail-open by default (`failOpen: true`). If AxonPush is unreachable, publish calls are silently suppressed.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: ts-google-adk
3
+ description: Integrate AxonPush tracing into a Google ADK project
4
+ ---
5
+
6
+ # AxonPush + Google ADK Integration
7
+
8
+ Integrate AxonPush tracing into a project using the Google AI Development Kit.
9
+
10
+ ## What gets added
11
+
12
+ - `axonPushADKCallbacks` with agent, model, and tool lifecycle callbacks
13
+ - Events: `agent.start`, `agent.end`, `llm.start`, `llm.end`, `tool.*.start`, `tool.*.end`
14
+
15
+ ## Reference Code
16
+
17
+ ```typescript
18
+ import { AxonPush } from "@axonpush/sdk";
19
+ import { axonPushADKCallbacks } from "@axonpush/sdk/integrations/google-adk";
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 callbacks = axonPushADKCallbacks({
28
+ client: axonpush,
29
+ channelId: Number(process.env.AXONPUSH_CHANNEL_ID),
30
+ agentId: "google-adk",
31
+ });
32
+
33
+ // Register callbacks on your ADK agent:
34
+ // callbacks.beforeAgent(agent);
35
+ // callbacks.afterAgent(agent, output);
36
+ // callbacks.beforeModel(model, params);
37
+ // callbacks.afterModel(model, response);
38
+ // callbacks.beforeTool(tool, input);
39
+ // callbacks.afterTool(tool, output);
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 file where the ADK agent is configured
47
+ 4. Add imports and create the callbacks
48
+ 5. Register the callbacks at the appropriate lifecycle points
49
+
50
+ ## Fail-Open
51
+
52
+ The SDK is fail-open by default (`failOpen: true`). If AxonPush is unreachable, callbacks are silently suppressed.
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: ts-langchain
3
+ description: Integrate AxonPush tracing into a TypeScript LangChain project
4
+ ---
5
+
6
+ # AxonPush + LangChain (TypeScript) Integration
7
+
8
+ Integrate AxonPush tracing into a TypeScript LangChain project.
9
+
10
+ ## What gets added
11
+
12
+ - `AxonPushCallbackHandler` that auto-traces chain/LLM/tool lifecycle events
13
+ - Events: `chain.start`, `chain.end`, `llm.start`, `llm.end`, `tool.*.start`, `tool.end`
14
+
15
+ ## Reference Code
16
+
17
+ ```typescript
18
+ import { AxonPush } from "@axonpush/sdk";
19
+ import { AxonPushCallbackHandler } from "@axonpush/sdk/integrations/langchain";
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 AxonPushCallbackHandler({
28
+ client: axonpush,
29
+ channelId: Number(process.env.AXONPUSH_CHANNEL_ID),
30
+ agentId: "my-agent",
31
+ });
32
+
33
+ // For any chain:
34
+ // const result = await chain.invoke(input, { callbacks: [handler] });
35
+
36
+ // For an agent executor:
37
+ // const result = await agentExecutor.invoke(input, { callbacks: [handler] });
38
+ ```
39
+
40
+ ## Steps
41
+
42
+ 1. Install `@axonpush/sdk` using the project's package manager
43
+ 2. Add AXONPUSH_API_KEY, AXONPUSH_TENANT_ID, AXONPUSH_BASE_URL, AXONPUSH_CHANNEL_ID to .env
44
+ 3. Find the main file where chains/agents are invoked
45
+ 4. Add the imports and client initialization (as module-level code)
46
+ 5. Add `{ callbacks: [handler] }` to `.invoke()` calls
47
+
48
+ ## Fail-Open
49
+
50
+ The SDK is fail-open by default (`failOpen: true`). If AxonPush is unreachable, tracing callbacks are silently suppressed.