Motivation
The eventmesh-agent module (mode-1 streaming agent) is currently closed for extension:
StreamingAgent hard-depends on the concrete OpenAiLlmClient — plugging a non-OpenAI-protocol LLM requires forking
ConversationStore has no interface — no persistence story (restart loses sessions; docs mark it TODO)
- No tool-calling capability at all — the agent cannot act on the mesh, only chat. This is the biggest gap vs. peer agent runtimes (Dify tool plugins, Solace Agent Mesh remote tools) and leaves the 23 shipped connector plugins unusable as agent capabilities
- No event-driven trigger path — an agent cannot be driven by topic subscriptions (order-changed events, CDC, alerts) without a human in the loop
- Port drift: agent/connector/examples still default to
http://localhost:8080 while the runtime's default has been 10105 since the port migration
Proposal
Open the agent module for extension, connector-first:
LlmClient SPI — token stream() + function-calling chat(); OpenAiLlmClient becomes the default implementation. Any chat backend can be injected via constructor.
ConversationMemory SPI — interface out of ConversationStore (in-memory sliding window stays the default) so Redis/RocksDB/DB-backed history can be dropped in.
AgentTool SPI + ToolRegistry — tools are name+schema+invoke; with tools registered, StreamingAgent runs a bounded function-calling loop (model may call tools, results are fed back, loop until final answer; ≤5 iterations).
ConnectorToolAdapter — any SinkConnector becomes a write tool (args → CloudEvent → put()+commit()), any SourceConnector becomes a read tool (poll() one batch → JSON array). The 23 shipped connector plugins turn into the agent tool library with zero plugin changes.
- Event-driven triggers —
agent.subscribe.topics + agent.trigger.output.topic: each consumed CloudEvent becomes a prompt, is answered (with tools), and the answer is published to the output topic where sink connectors deliver it. Trigger conversations are keyed trigger:<eventId> and never bleed into user sessions.
- Port drift fix — agent/connector-runtime/examples defaults
8080 → 10105.
- Docs — new
docs/feature/agent-tools.md (extension surface, connector-as-tools wire-up, trigger config, embedder API) + index entry.
Not in scope (follow-ups): remote tool execution over topics (tool call as CloudEvent RPC, Solace sam_remote_tool style), per-token streaming of tool-loop answers, persisted ConversationMemory implementations, SPI-file-based tool discovery.
Motivation
The
eventmesh-agentmodule (mode-1 streaming agent) is currently closed for extension:StreamingAgenthard-depends on the concreteOpenAiLlmClient— plugging a non-OpenAI-protocol LLM requires forkingConversationStorehas no interface — no persistence story (restart loses sessions; docs mark it TODO)http://localhost:8080while the runtime's default has been10105since the port migrationProposal
Open the agent module for extension, connector-first:
LlmClientSPI — tokenstream()+ function-callingchat();OpenAiLlmClientbecomes the default implementation. Any chat backend can be injected via constructor.ConversationMemorySPI — interface out ofConversationStore(in-memory sliding window stays the default) so Redis/RocksDB/DB-backed history can be dropped in.AgentToolSPI +ToolRegistry— tools are name+schema+invoke; with tools registered,StreamingAgentruns a bounded function-calling loop (model may call tools, results are fed back, loop until final answer; ≤5 iterations).ConnectorToolAdapter— anySinkConnectorbecomes a write tool (args → CloudEvent →put()+commit()), anySourceConnectorbecomes a read tool (poll()one batch → JSON array). The 23 shipped connector plugins turn into the agent tool library with zero plugin changes.agent.subscribe.topics+agent.trigger.output.topic: each consumed CloudEvent becomes a prompt, is answered (with tools), and the answer is published to the output topic where sink connectors deliver it. Trigger conversations are keyedtrigger:<eventId>and never bleed into user sessions.8080→10105.docs/feature/agent-tools.md(extension surface, connector-as-tools wire-up, trigger config, embedder API) + index entry.Not in scope (follow-ups): remote tool execution over topics (tool call as CloudEvent RPC, Solace
sam_remote_toolstyle), per-token streaming of tool-loop answers, persisted ConversationMemory implementations, SPI-file-based tool discovery.