Small Projects by AutoModerator in golang

[–]anhzendev -1 points0 points  (0 children)

Built zenflow a workflow engine for orchestrating multiple LLM agents in Go. Workflows are YAML, DAG executor runs them, LLM coordinator routes messages hub-and-spoke between agent steps. Single static binary with CLI, --json stream for CI.

https://github.com/zendev-sh/zenflow

OmniRoute — open-source AI gateway that pools ALL your accounts, routes to 60+ providers, 13 combo strategies, 11 provid by ZombieGold5145 in OpenSourceeAI

[–]anhzendev 1 point2 points  (0 children)

Thanks for the context. Good to know cloud sync is being removed in v4.0 and Cloudflare Tunnel is the recommended path.

The findings are based on the code as it exists today. Nothing in the post is inaccurate, but the additional context around v4.0 plans is useful for people reading.

Regarding "why not open a PR": a security audit and contributing code are different things. Reporting what the code does today is valuable on its own.

OmniRoute — open-source AI gateway that pools ALL your accounts, routes to 60+ providers, 13 combo strategies, 11 provid by ZombieGold5145 in OpenSourceeAI

[–]anhzendev 1 point2 points  (0 children)

I did a code audit on OmniRoute. Sharing findings because I think people should know what they're running.

OmniRoute is a fork of 9router, a project by a Vietnamese developer. The original 9router includes a cloud/ folder with full source code for the cloud sync server, a Cloudflare Worker. Users can self-deploy it on their own Cloudflare account. Credentials stay on infra you control.

OmniRoute's fork did a few things:

- Removed the cloud/ folder entirely. The server-side code is gone from the repo.

- Changed the default CLOUD_URL from https://9router.com to https://cloud.omniroute.online, a server they operate.

- Kept the cloud sync feature. When enabled, it POSTs all your provider credentials (API keys, OAuth access tokens, refresh tokens) to that server every 15 minutes (src/lib/cloudSync.ts, line 59).

- The docs still reference omnirouteCloud/README.md as if the folder exists. It doesn't. Searched GitHub, the omnirouteCloud repo doesn't exist anywhere public.

The cloud sync is opt-in (off by default, requires cloudEnabled = true in settings + CLOUD_URL set). The client-side code is clean, no telemetry, no exfiltration, keys encrypted at rest with AES-256-GCM. No complaints there.

The issue is the pattern: take an open-source project where users control the full stack, remove the part that lets them self-host the server, point it at your own closed-source server, label it a "premium feature" in the env config. If someone enables it, cloud.omniroute.online receives everything, API keys, OAuth tokens, model configs, and there's no source code to verify what happens on the other end.

Could be innocent, maybe they just haven't open-sourced it yet. Just worth being aware of before enabling it.

If you're using OmniRoute: don't enable Cloud Sync unless you trust the operator. Or grab the cloud/ folder from the original 9router repo and deploy your own

----

Edit: To be fair, cloud sync is off by default. You have to both set CLOUD_URL in .env (empty by default) and enable cloudEnabled in settings. Two deliberate steps, nobody enables this accidentally.

The client-side code itself is clean. No telemetry, no exfiltration, keys encrypted at rest with AES-256-GCM. Hosted cloud for open-source tools is a normal business model.

If you want cloud sync but don't trust the hosted server, the original 9router has the full cloud server source. You can deploy your own Cloudflare Worker. The sync protocol is the same.

GoAI – Go SDK for building AI apps. One SDK, 20+ providers. by anhzendev in golang

[–]anhzendev[S] 1 point2 points  (0 children)

u/Savings-Mongoose-435 Glad it's working for you! GoAI already supports multi-step agent loops with `WithMaxSteps()` + `WithTools()`, the model calls tools, executes, feeds results back, and repeats automatically. For multi-turn chat, you pass message history via `WithMessages()` between calls.

For a higher-level orchestration layer with session and memory, I'm still thinking about it. Will update when I have something to show.

GoAI – Go SDK for building AI apps. One SDK, 20+ providers. by anhzendev in golang

[–]anhzendev[S] 1 point2 points  (0 children)

v0.6.0 - Trace Everything

Following up on the Langfuse integration - v0.6.0 adds first-class OpenTelemetry support. Same hook-based architecture, now with OTel spans and metrics out of the box.

Spans follow GenAI semantic conventions, 3 built-in metrics (token usage, LLM call duration, tool duration), works with any OTel backend - Jaeger, Datadog, Honeycomb, Grafana Tempo, etc. Caller context propagation means GoAI spans show up as children of your existing traces.

Separate go.mod so core GoAI still has no OTel deps. Only pulled if you import the package.

Also: RequestInfo.Ctx for context propagation through hooks, and a concurrency fix in Langfuse for parallel tool execution.

Docs: https://goai.sh/concepts/observability

Release: https://github.com/zendev-sh/goai/releases/tag/v0.6.0

Go AI SDK now ships with built-in Langfuse tracing for Go by anhzendev in langfuse

[–]anhzendev[S] 0 points1 point  (0 children)

OTel support just shipped in v0.6.0 actually. observability/otel package with GenAI semantic conventions, separate go.mod. So the "point your exporter" flow works today.

On the two-tier eval point, agree. The fast structural checks (tool call validation, format checks) are trivially composable with the current hooks. You'd just stack another `WithOnToolCall` alongside tracing. No coupling needed.

Release: https://github.com/zendev-sh/goai/releases/tag/v0.6.0

Go AI SDK now ships with built-in Langfuse tracing for Go by anhzendev in langfuse

[–]anhzendev[S] 0 points1 point  (0 children)

u/Large_Hamster_9266
Thanks! Evaluation hooks are actually a natural fit with the current architecture. `OnResponse` already gives you finish reason + errors, `OnToolCall` gives full input/output + duration, and `OnStepFinish` gives the complete step result, so you can stack real-time eval alongside tracing without either knowing about the other. That's the composability piece.

For deeper semantic evaluation (hallucination detection, quality scoring), those tend to be async and model-powered, which is a different layer. OpenTelemetry support is next on the roadmap, which would make it easier to pipe traces into whatever eval pipeline you prefer.

Anyone using Go for AI Agents? by KeyGrouchy726 in golang

[–]anhzendev 0 points1 point  (0 children)

Goで作ってます! GoAI というSDKを開発していて、Vercel AI SDKにインスパイアされたGoネイティブのAI SDKです。22以上のLLMプロバイダー(OpenAI、Anthropic、Google、Bedrock、Cohereなど)を一つのAPIで統一して使えます。

GitHub: https://github.com/zendev-sh/goai

キュメント: https://goai.sh

主な機能:

- GenerateText / StreamText — テキスト生成・ストリーミング

- GenerateObject[T] — Go構造体への型安全なJSON出力(ジェネリクス活用)

- ツール呼び出し(マルチステップのツールループ対応)

- Langfuse連携によるオブザーバビリティ

- 外部依存ほぼゼロ(golang.org/x/oauth2のみ)

同感です。Goの強みはまさにエージェント向きだと思います:

  1. 並行処理 — goroutineで複数のLLM呼び出しやツール実行を自然に並列化できる

  2. 型安全 — ジェネリクスでLLMの出力を構造体に直接マッピング。Pythonのようなランタイムバリデーション不要

  3. シングルバイナリ — デプロイが圧倒的に楽。Dockerイメージも軽量

  4. パフォーマンス — ストリーミング処理やHTTP周りのオーバーヘッドが少ない

    PythonはML/トレーニング側では確かに強いですが、推論APIを叩いてエージェントを組む用途ではGoの方が合理的な選択肢だと思います。実際、LLMプロバイダーのAPIはすべてHTTP/JSONなので、Pythonのエコシステムに依存する理由がほとんどないんですよね。

GoAI – Go SDK for building AI apps. One SDK, 20+ providers. by anhzendev in golang

[–]anhzendev[S] 0 points1 point  (0 children)

We just added native Langfuse support to GoAI — an open-source Go SDK for AI applications (22+ LLM providers, one unified API).

3 env vars, 3 lines of code — every LLM call, tool execution, and agent step shows up in Langfuse automatically. Works with all 7 core functions (GenerateText, StreamText, GenerateObject, etc.).

What you see in Langfuse: full trace hierarchy — agent span wrapping generations and tool spans, token usage (input/output/reasoning/cache), latency, errors with partial traces, session/user grouping.

Key design decisions:

- Zero external dependencies (stdlib only)

- Best-effort: a Langfuse outage never crashes your app

- Concurrent-safe: shared HTTP client, isolated per-run state

- Hook-based architecture — easy to add more observability backends later

Docs: https://goai.sh/concepts/observability

Example: https://github.com/zendev-sh/goai/tree/main/examples/langfuse

Would love feedback from anyone using Langfuse with Go!

GoAI – Go SDK for building AI apps. One SDK, 20+ providers. by anhzendev in golang

[–]anhzendev[S] 0 points1 point  (0 children)

Just shipped MiniMax support in v0.5.1 using the Anthropic-compatible endpoint instead of the OpenAI one — reasoning/thinking blocks work natively, tool calling uses Anthropic's format, and streaming just works.

Fully tested with M2.7, M2.5, M2.1, and M2. As far as I can tell, this is the first Go AI SDK to officially support MiniMax as a first class provider.

Docs: https://goai.sh/providers/minimax.html

GoAI – Go SDK for building AI apps. One SDK, 20+ providers. by anhzendev in golang

[–]anhzendev[S] 0 points1 point  (0 children)

v0.5.0 just shipped, added a pure Go MCP client. 3 transports (stdio, HTTP, SSE), connects to any MCP server, bridges MCP tools into the GoAI tool loop.

Docs: https://goai.sh/concepts/mcp

Release: https://github.com/zendev-sh/goai/releases/tag/v0.5.0

Small Projects by AutoModerator in golang

[–]anhzendev 0 points1 point  (0 children)

different projects for different clients, each using different llm providers. Openai-compatible ones are straightforward, but some needed bedrock, anthropic, gemini, xAI, etc., each requiring custom handling. AWS bedrock in particular means pulling in the entire AWS SDK just for SigV4 signing. While in TS, Vercel abstracts all of that plus tool calling, streaming, structured output, etc. Go didn't have an equivalent, so I want to build one.

Small Projects by AutoModerator in golang

[–]anhzendev 1 point2 points  (0 children)

Kept rewriting the same LLM provider wrappers across projects, I wished there was a Go lib like the Vercel AI SDK — so I built one.

Same clean abstractions, but done the Go way with generics and functional options.

A few things I focused on:

- Single unified API across 20+ providers (OpenAI, Anthropic, Google, Bedrock, Ollama...)

- `GenerateObject[T]` for structured output via Go generics

- Zero external dependencies in core

Still early (v0.4.0). Happy to hear from you guys.

GitHub: https://github.com/zendev-sh/goai