Skip to content

feat: port all 17 examples to TypeScript, Go, Java, .NET#22

Merged
George-iam merged 6 commits intomainfrom
feat/multi-lang-examples-20260318
Mar 18, 2026
Merged

feat: port all 17 examples to TypeScript, Go, Java, .NET#22
George-iam merged 6 commits intomainfrom
feat/multi-lang-examples-20260318

Conversation

@George-iam
Copy link
Contributor

Summary

  • Port all 17 Python agent/initiator examples to 4 additional SDK languages
  • TypeScript (17 files): agent.ts / initiator.ts alongside Python, using @axme/axme npm package
  • Go (17 files): agent.go / initiator.go alongside Python, using github.com/AxmeAI/axme-sdk-go
  • Java (18 files): Maven project in examples/java/ with shared SseHelper for SSE polling
  • .NET (18 files): .NET project in examples/dotnet/ with shared SseHelper for SSE polling
  • Total: 76 new files, 4805 lines
  • All examples preserve identical business logic, patterns, and behavior from Python originals
  • Go vet passes on all 17 Go examples

File layout

  • TS/Go: examples/<category>/<name>/agent.ts + agent.go (alongside agent.py)
  • Java: examples/java/src/main/java/ai/axme/examples/<category>/<Name>.java
  • .NET: examples/dotnet/<Category>/<Name>.cs

Notes

  • Java/NET SDKs lack built-in listen() — SSE helper implements inline agent stream polling
  • Go SDK Listen() was added after v0.1.1 tag — uses local replace directive (needs SDK release or pseudo-version before merge)

Test plan

  • TypeScript: npx tsx examples/delivery/stream/agent.ts compiles and connects to staging
  • Go: go run examples/delivery/stream/agent.go compiles and connects to staging
  • Java: Maven build passes
  • .NET: dotnet build passes
  • Verify at least one example per language against staging

🤖 Generated with Claude Code

George-iam and others added 6 commits March 18, 2026 09:59
Port all Python agent/initiator examples (17 files) to 4 additional languages:
- TypeScript (17 files): agent.ts / initiator.ts alongside Python files
- Go (17 files): agent.go / initiator.go alongside Python files
- Java (18 files): Maven project in examples/java/ with shared SseHelper
- .NET (18 files): .NET project in examples/dotnet/ with shared SseHelper

All examples preserve identical business logic, patterns, and behavior:
- delivery: stream, poll, http, inbox
- human: cli, email, form
- internal: delay, notification, escalation
- durability: retry-failure, timeout, reminder-escalation
- full: multi-agent
- model-a: simple-request, fire-and-forget, manual-multi-step

Java/NET use inline SSE polling (SDKs lack built-in listen method).
Go uses local replace directive (Listen added after v0.1.1 tag).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Go SDK's CreateIntent doesn't auto-generate correlation_id like
Python's send_intent. Added newUUID() helper to all 3 initiators.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Same fix as Go — createIntent requires correlation_id field.
Java uses UUID.randomUUID(), .NET uses Guid.NewGuid().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Convert all 17 .cs files from top-level statements to proper classes
  (C# only allows one top-level statement file per project)
- Add System.Net using for HttpListener in HttpAgent.cs
- Use $(ExampleClass) MSBuild property for StartupObject selection

Run: dotnet build -p:ExampleClass=AxmeExamples.Delivery.StreamAgent

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Major restructuring of the examples repository:

Layout change: each example now has language-specific subdirectories:
  examples/<category>/<name>/
    ├── scenario.json       (shared, language-agnostic)
    ├── README.md
    ├── python/agent.py
    ├── typescript/agent.ts
    ├── go/agent.go
    ├── java/Agent.java
    └── dotnet/Agent.cs

Build configs moved to lang/:
  lang/typescript/  (package.json, tsconfig.json)
  lang/go/          (go.mod)
  lang/java/        (pom.xml, SseHelper.java)
  lang/dotnet/      (AxmeExamples.csproj, SseHelper.cs)

Deleted:
  - cloud/              (duplicate symlinks to examples/)
  - snippets/           (superseded by full multi-lang examples)
  - approval-workflow/  (pattern documented in SDK READMEs instead)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@George-iam George-iam merged commit 6dc9071 into main Mar 18, 2026
1 check passed
@George-iam George-iam deleted the feat/multi-lang-examples-20260318 branch March 18, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant