agent_loop

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 9 Imported by: 0

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)即可。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL