Gwenlake 实验室
团队打造、可在浏览器中试用的原型,以及我们以开源形式发布的成果:支撑我们智能体系统的框架和几个更小的库。
智能体 AI 框架 · Python
Gwenflow
Gwenflow 用于运行 AI 智能体:给智能体一个目标、一组工具、一份记忆和一个模型,它就会推理、行动、观察,然后再来一轮,直到目标达成。我们构建的每一套智能体系统都在用它。我们自己动手写,是为了掌握智能体运行的每一行代码,好让任何基于客户数据做出的决策都能被打开、被解释、被修改。
from gwenflow import Agent, ChatMistralfrom gwenflow.tools import Tool def accounts_at_risk(period: str, min_drop: int = 10) -> list[dict]: """Accounts whose usage fell by at least `min_drop` percent.""" return crm.query(period=period, trend="down", min_drop=min_drop) agent = Agent( name="Account review", instructions="Rank the accounts at risk, with the figures.", llm=ChatMistral(), tools=[Tool(accounts_at_risk)],) response = agent.run("Which accounts are at risk this quarter?")