Documentation
¶
Overview ¶
本示例演示 omnix 的 Agent Turn/Step 双循环用法(进程内集成)。
流程:NewAgent 装配(SessionLog + SystemPrompt + 工具流水线 + LLM 适配器)→
Run(input) 提交一个 turn → Agent 走 turn/start → step/start → 组装 prompt → LLM 流式 chunk → 若有 tool_call 则执行工具(step 续步)→ step/end → turn/end。
运行方式(仓库根目录):
go run ./examples/agent_loop
说明:示例使用一个脚本化假 LLM 适配器【不发起真实网络】;接入真实模型时 换用 provider_deepseek.NewDeepSeek(store)(见 examples/usage)即可。
Click to show internal directories.
Click to hide internal directories.