Comprehensive guide to using the @tarko/agent SDK for building production-ready agents.
Based on the actual interface from multimodal/tarko/agent-interface/src/agent-options.ts:
run() - Execute AgentBasic Usage:
With Options:
Streaming:
Tools are defined using the Tool class and passed to the Agent constructor:
Based on the actual Tool class from multimodal/tarko/agent-interface/src/tool.ts:
Location Tool:
Weather Tool:
Based on multimodal/tarko/agent-interface/src/agent-event-stream.ts, the Agent uses an internal event stream system. Events are emitted during agent execution and can be accessed through streaming responses.
Based on the actual examples in multimodal/tarko/agent/examples/: