Packages 包
@downcity/agent
单 Agent 运行时、AgentWorkspace、Session、Plugin SDK 与 RemoteAgent。
@downcity/agent 提供单 Agent 执行面,拥有 Agent、AgentWorkspace、Session、Plugin SDK 和
RemoteAgent。Workspace 资源由 @downcity/workspace 提供;本包不拥有多 Agent 宿主或网络 Server。
const city = new City({ workspaces: [workspace] });
const agent = new Agent({ id: "assistant" });
city.agents.add(agent);
const session = await agent.sessions.create({ workspace });
const turn = await session.prompt({ query: "你好" });
const result = await turn.finished;CLI、Desktop 或 Node 进程需要持有多个 Agent、根据本地配置装配实例或暴露 HTTP/RPC 时,使用
@downcity/agent。