Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
166a692
feat: informer general framework and engine/discovery interface defin…
robocanic Sep 3, 2025
0b13d90
fix: ci problem; directory and dependency tidy (#1320)
robocanic Sep 6, 2025
5e5230d
ci(makefile): add makefile for ci (#1322)
marsevilspirit Sep 14, 2025
55e683a
delete unused ci (#1326)
marsevilspirit Sep 21, 2025
9729ec7
fix: refractor web handler and service to fix compile error; (#1325)
robocanic Sep 21, 2025
90fdfc2
feat: support memory type of store (#1332)
robocanic Oct 12, 2025
ca9fb03
feat: support kubernetes as a backend engine (#1340)
robocanic Nov 2, 2025
4aae206
feat: Defined a unified error (#1353)
robocanic Nov 9, 2025
1e55d30
Implment Counter in local cache (#1345)
WyRainBow Nov 10, 2025
0b8fa1f
fix: update response interceptor to handle success and error messages…
ikun-Lg Nov 15, 2025
42d4561
feat(UI): Support multiple registries (#1356)
Helltab Nov 16, 2025
1905190
feat: implement mysql and postgresql store for resources (#1360)
Nov 30, 2025
1ade640
feat: implements discovery backend by nacos (#1367)
robocanic Dec 13, 2025
ecd2bdb
fix counter bug (#1369)
WyRainBow Dec 20, 2025
cc7b273
fix: add indexer before init cause npe (#1372)
robocanic Dec 20, 2025
c8d6100
Fix: Redirect to login page when receiving 401 unauthorized response …
ikun-Lg Dec 21, 2025
f00b891
feat: implement discovery backend by zk (#1371)
robocanic Dec 21, 2025
8eea7ed
feat: support components to start in dependency order (#1370)
everfid-ever Dec 23, 2025
4330280
release changelog (#1376)
robocanic Dec 26, 2025
0ed6d1c
refactor: :art: Optimize UI styles and search functionality (#1379)
ikun-Lg Dec 28, 2025
0ef902f
feat(ui): Enhance service metrics display and optimize table UI style…
ikun-Lg Jan 4, 2026
ff429c0
feat: enhance error handling and data loading in various components (…
ikun-Lg Jan 9, 2026
f61071e
feat: fix console bugs and makes console functions effective (#1378)
robocanic Jan 10, 2026
2eb4409
feat: add deploy manifests and fix metric and trace dashboard bugs (#…
robocanic Jan 11, 2026
0402b2b
Fix: Address the admin issues before the release (#1391)
ikun-Lg Jan 12, 2026
b5da1d0
fix: add Apache License headers to YAML files in release/kubernetes (…
WyRainBow Jan 15, 2026
7af9308
feat: enhance UI components, improve error handling, and add routing …
ikun-Lg Jan 17, 2026
d4d7a8f
Fix/console (#1397)
robocanic Jan 18, 2026
3d33ecd
fix(ui): update footer copyright year to 2026 (#1396)
akshitvigg Jan 18, 2026
dc5eb0d
implement counter by key (#1390)
WyRainBow Feb 1, 2026
35cbd34
feat: kubernetes deployment manifests and docker file (#1410)
robocanic Feb 8, 2026
82e2512
rm: remove useless files (#1416)
robocanic Mar 1, 2026
5d2946d
feat: implement distributed lock by gorm (#1432)
everfid-ever Mar 15, 2026
9de1ee0
feat: add leader election for Discovery, Engine, Counter.(#1423)
thunguo Mar 29, 2026
5c94d18
Feat: Enhance service method retrieval and invocation features (#1429)
Similarityoung Mar 29, 2026
b809b14
feat: extend indexer with prefix matching and db persistence (#1422)
thunguo Mar 29, 2026
d9ebf33
feat: unify and enhance the lifecycle of an instance (#1440)
Saramanda9988 Apr 12, 2026
45211ac
feat(eventbus): support per-subscriber async dispatch with graceful d…
WyRainBow May 7, 2026
0cea048
feat(mcp): add Model Context Protocol (MCP) server with HTTP transpor…
larry-zy May 7, 2026
c761f6d
Merge remote-tracking branch 'origin/develop' into ai
larry-zy May 7, 2026
b4c6cbf
Service/Application Dependency Graph Implement (#1460)
ambiguous-pointer May 10, 2026
0b1cc73
Merge upstream/develop into ai
larry-zy May 10, 2026
1f4b76a
Merge branch 'mcp-to-ai' into ai
larry-zy May 10, 2026
a59dc63
Merge remote-tracking branch 'upstream/ai' into ai
larry-zy May 30, 2026
c22d1fd
Implement MCP client and refactor MCP module structure
larry-zy May 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 25 additions & 17 deletions ai/component/agent/react/react.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,26 +290,34 @@ func ActFlow(g *genkit.Genkit, actPrompt ai.Prompt) agent.NormalFlow {
runtime.GetLogger().Info("Act Done.", "output", out, "error", err)
}()

// Beacause the input is in the history, so don't need to use, just check the type
input, ok := in.(ActIn)
if !ok {
return nil, fmt.Errorf("input is not of type ActIn, got %T", in)
// Try to get input from orchestrator or parse from history
var input ActIn
var hasInput bool
if inTyped, ok := in.(ActIn); ok {
input = inTyped
hasInput = true
}
if input.Intent == schema.GeneralInquiry || len(input.SuggestedTools) == 0 {
actOuts := ActOut{
Outputs: []toolEngine.ToolOutput{
{
ToolName: "no_need_tool_call",
Summary: "no need tool call",
Result: map[string]any{
"reason": "general inquiry or no suggested tools",
// If no valid input from orchestrator, we'll skip the general inquiry check
// and let the LLM decide based on history
if !hasInput || (input.Intent == schema.GeneralInquiry || len(input.SuggestedTools) == 0) {
// Only skip if we actually have input and it indicates general inquiry
if hasInput && (input.Intent == schema.GeneralInquiry || len(input.SuggestedTools) == 0) {
actOuts := ActOut{
Outputs: []toolEngine.ToolOutput{
{
ToolName: "no_need_tool_call",
Summary: "no need tool call",
Result: map[string]any{
"reason": "general inquiry or no suggested tools",
},
},
},
},
UsageInfo: &ai.GenerationUsage{},
UsageInfo: &ai.GenerationUsage{},
}
schema.AccumulateUsage(actOuts.UsageInfo, in.Usage())
return actOuts, nil
}
schema.AccumulateUsage(actOuts.UsageInfo, in.Usage())
return actOuts, nil
// If no valid input, continue to let LLM decide from history
}

history, ok := ctx.Value(memory.ChatHistoryKey).(*memory.HistoryMemory)
Expand All @@ -333,7 +341,7 @@ func ActFlow(g *genkit.Genkit, actPrompt ai.Prompt) agent.NormalFlow {
}

// If the model returns no tool requests while suggested_tools is non-empty, surface the real cause.
if len(toolReqs.ToolRequests()) == 0 && input.SuggestedTools != nil && len(input.SuggestedTools) > 0 {
if hasInput && len(toolReqs.ToolRequests()) == 0 && input.SuggestedTools != nil && len(input.SuggestedTools) > 0 {
return nil, fmt.Errorf("model returned no tool calls for suggested_tools=%v", input.SuggestedTools)
}
runtime.GetLogger().Info("tool requests:", "req", toolReqs.ToolRequests())
Expand Down
11 changes: 7 additions & 4 deletions ai/component/tools/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ func (t *ToolsComponent) SetName(name string) {
}

func (t *ToolsComponent) Validate() error {
if t.config.EnableMCPTools && t.config.MCPHostName == "" {
return fmt.Errorf("mcp_host_name is required when mcp tools are enabled")
if t.config.EnableMCPTools && t.config.MCP.Host == "" {
return fmt.Errorf("mcp.host is required when mcp tools are enabled")
}
if t.config.MCP.Port <= 0 || t.config.MCP.Port > 65535 {
return fmt.Errorf("mcp.port must be between 1 and 65535")
}
if t.config.MCPTimeout <= 0 {
return fmt.Errorf("mcp_timeout must be greater than 0")
Expand Down Expand Up @@ -82,7 +85,7 @@ func (t *ToolsComponent) Init(rt *runtime.Runtime) error {
}

if t.config.EnableMCPTools {
mcpToolManager, err := engine.NewMCPToolManager(rt, t.config.MCPHostName)
mcpToolManager, err := engine.NewMCPToolManager(rt, t.config.MCP.Host, t.config.MCP.Port, t.config.MCP.APIKey, t.config.MCPMaxRetries)
if err != nil {
return fmt.Errorf("failed to create MCP tool manager: %w", err)
}
Expand All @@ -94,7 +97,7 @@ func (t *ToolsComponent) Init(rt *runtime.Runtime) error {
rt.GetLogger().Info("Tools component initialized",
"total_tools", len(t.toolRefs),
"total_managers", len(t.toolManagers),
"mcp_host", t.config.MCPHostName)
"mcp_endpoint", fmt.Sprintf("http://%s:%d/api/mcp", t.config.MCP.Host, t.config.MCP.Port))

return nil
}
Expand Down
17 changes: 9 additions & 8 deletions ai/component/tools/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ type ToolsConfig struct {

// ToolConfig defines the tool configuration
type ToolConfig struct {
EnableMockTools bool `yaml:"enable_mock_tools"`
EnableInternalTools bool `yaml:"enable_internal_tools"`
EnableMCPTools bool `yaml:"enable_mcp_tools"`
MCPHostName string `yaml:"mcp_host_name"`
MCPTimeout int `yaml:"mcp_timeout"`
MCPMaxRetries int `yaml:"mcp_max_retries"`
EnableMockTools bool `yaml:"enable_mock_tools"`
EnableInternalTools bool `yaml:"enable_internal_tools"`
EnableMCPTools bool `yaml:"enable_mcp_tools"`
MCP MCPConfig `yaml:"mcp"`
MCPTimeout int `yaml:"mcp_timeout"`
MCPMaxRetries int `yaml:"mcp_max_retries"`
}

// MemoryConfig defines the memory configuration
Expand All @@ -59,6 +59,7 @@ type MCPConfig struct {
Enabled bool `yaml:"enabled"`
Host string `yaml:"host"`
Port int `yaml:"port"`
APIKey string `yaml:"apiKey"`
}

// DefaultToolsConfig returns default tools configuration
Expand All @@ -67,7 +68,7 @@ func DefaultToolsConfig() ToolsConfig {
Memory: DefaultMemoryConfig(),
Mock: MockConfig{Enabled: true},
Internal: InternalConfig{Enabled: true},
MCP: MCPConfig{Enabled: true, Host: "mcp_host", Port: 8080},
MCP: MCPConfig{Enabled: true, Host: "localhost", Port: 8888, APIKey: ""},
}
}

Expand All @@ -77,7 +78,7 @@ func DefaultToolConfig() *ToolConfig {
EnableMockTools: true,
EnableInternalTools: true,
EnableMCPTools: true,
MCPHostName: "mcp_host",
MCP: MCPConfig{Enabled: true, Host: "localhost", Port: 8888},
MCPTimeout: 30,
MCPMaxRetries: 3,
}
Expand Down
Loading