Monday, October 26, 2026
HomeGolangSuggestions needed: retaining an embeddable agent core freed from app dependencies in...

Suggestions needed: retaining an embeddable agent core freed from app dependencies in Go – Technical Dialogue


Hello all,

I keep suga, a coding agent written in Go (MIT, nonetheless v0). A lot of the work has gone into lengthy classes, however the half I would love Go suggestions on is how the core is cut up out so different Go applications can embed it.

pkg/agentcore holds the mannequin/device loop, suppliers, the device registry and approval. It should not import something beneath inner/. As an alternative of counting on overview, a check walks the package deal imports and checks them towards an allowlist, so a brand new dependency or an unregistered package deal fails go check. The smallest working setup is:

runtime := agentcore.New(agentcore.Config{
    Supplier: mock.NewProvider(mock.Ultimate("good day")),
})
end result, err := runtime.Run(ctx, agentcore.RunInput{
    AgentID:     "example-agent",
    Instruction: "say good day",
})

Wrapping the registry in instruments.NewApproval with no approver denies each name, so the default is closed relatively than open.

Two issues I’m not sure about:

  • Is an import allowlist check an inexpensive approach to preserve a layer boundary, or would you cut up the core into its personal module?
  • The in-process SDK (pkg/sugasdk) remains to be marked experimental. For embedding an agent loop, would you relatively get a callback-style API or a channel of occasions?

Disclosure: I’m the creator, and I take advantage of AI instruments closely on this challenge, together with for drafting this submit.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments