# 聊天 > 先决条件: 读取 deepvista-shared 以获取认证、配置文件和全局标志。聊天与 DeepVista AI 代理。代理可以搜索您的知识库、创建卡片、运行网页搜索和执行工具。## 命令### 会话``bash deepvista chat sessions [--limit N] [--offset N] [--search "查询"] `只读 — 列出聊天会话。### 获取`bash deepvista chat get `只读 — 返回会话元数据(id、summary、created_at、status)。不返回完整的消息历史。### 删除`bash deepvista chat delete `> [!警告] 析命令 — 执行前确认用户。### +send`bash deepvista chat +send "您的消息" [--chat-id ID] [--new] `> [!警告] > 这是一个 写 命令 — 创建/更新聊天会话,代理可能创建卡片、搜索网页和执行其他操作。执行前确认用户。| 标志 | 必需 | 默认 | 描述 | |------|----------|---------|-------------| | <消息> | 是 | — | 您发送给代理的消息 | | --chat-id | 否 | — | 继续现有的聊天会话 | | --new | 否 | false | 强制开始新对话 | 输出是 NDJSON — 每行一个 JSON 对象,作为代理响应时流式传输。## SSE 事件格式+send 流式传输事件采用以下结构。解析 page_delta 事件以获取代理的响应文本:`json {"type": "chat_session", "id": "abc123", ...} {"type": "page", "page": {"user_instruction": "...", ...}} {"type": "page_delta", "parts": [ {"type": "tool_result", "output": "部分响应文本...", "done": false} ], "page_index": 0} {"type": "page_delta", "parts": [ {"type": "tool_result", "output": "完整响应文本", "done": true, "options": ["后续 1", "后续 2"]} ]} `关键字段:- type: "chat_session" — 第一个事件;包含会话 id - type: "page_delta" — 携带流式响应 - parts[].type: "tool_result" — 代理的文本;output 是 累积文本 (不是增量 delta) - parts[].done: true — 最终块;options 可能包含建议的后续提示## 示例`bash # 发送消息(新对话) deepvista chat +send "我的开放任务是什么?" --new # 继续现有的对话 deepvista chat +send "告诉我更多关于第一个的信息" --chat-id abc123 # 请求代理创建一个笔记 deepvista chat +send "总结我们的 ML 策略讨论" # 列出最近的会话 deepvista chat sessions --limit 5 # 搜索会话摘要 deepvista chat sessions --search "路线图" ``## 参见 - deepvista-shared — 认证和全局标志 - deepvista-vistabase — 查看 Chat 积累的隐式上下文
PREREQUISITE: Read deepvista-shared for auth, profiles, and global flags.
Chat with the DeepVista AI agent. The agent can search your knowledge base, create cards, run web searches, and execute tools.
Commands
sessions
deepvista chat sessions [--limit N] [--offset N] [--search "query"]
Read-only — list chat sessions.
get
deepvista chat get
Read-only — returns session metadata (id, summary, created_at, status). Full message history is not returned by this endpoint.
delete
deepvista chat delete
[!CAUTION] Destructive command — confirm with user before executing.
+send
deepvista chat +send "your message" [--chat-id ID] [--new]
[!CAUTION]
This is a write command — creates/updates chat sessions and the agent may create cards, search the web, and take other actions. Confirm with the user before executing.
| Flag | Required | Default | Description |
|---|
| Yes | — | Your message to the agent |
--chat-id | No | — | Continue an existing chat session |
--new | No | false | Force start a new conversation |
Output is
NDJSON — one JSON object per line, streamed as the agent responds.
SSE Event Format
+send streams events in this structure. Parse page_delta events to get the agent's response text:
{"type": "chat_session", "id": "abc123", ...}
{"type": "page", "page": {"user_instruction": "...", ...}}
{"type": "page_delta", "parts": [
{"type": "tool_result", "output": "partial response text...", "done": false}
], "page_index": 0}
{"type": "page_delta", "parts": [
{"type": "tool_result", "output": "full response text", "done": true, "options": ["follow-up 1", "follow-up 2"]}
]}
Key fields:
type: "chat_session" — first event; contains the id of the session
type: "page_delta" — carries the streamed response
parts[].type: "tool_result" — the agent's text; output is the full accumulated text so far (not an incremental delta)
parts[].done: true — final chunk; options may contain suggested follow-up prompts
Examples
# Send a message (new conversation)
deepvista chat +send "What are my open tasks?" --new# Continue an existing conversation
deepvista chat +send "Tell me more about the first one" --chat-id abc123
# Ask the agent to create a note
deepvista chat +send "Create a note summarizing our ML strategy discussion"
# List recent sessions
deepvista chat sessions --limit 5
# Search sessions by summary
deepvista chat sessions --search "roadmap"
See Also