Skip to content

Commit 7926117

Browse files
committed
add cli commands
1 parent 2e8096a commit 7926117

File tree

9 files changed

+785
-0
lines changed

9 files changed

+785
-0
lines changed

changelog.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@ title: "Changelog"
33
description: "Latest updates, improvements, and fixes to the Knowrithm platform."
44
---
55

6+
<Update label="2025-11-25" description="v2.0.0 - CLI 2.0 & Interactive Features">
7+
## CLI 2.0 & Interactive Features
8+
9+
A massive update to the Knowrithm CLI, bringing interactive workflows, beautiful formatting, and context management.
10+
11+
### Features
12+
- **Interactive Chat**: Chat with agents directly from the terminal with `knowrithm agent chat`.
13+
- **Context Management**: Set active agents and conversations to save typing.
14+
- **Name-Based Lookups**: Reference agents by name instead of UUIDs.
15+
- **Interactive Menus**: Guided selection for geographic data and other resources.
16+
- **Beautiful Output**: New table, tree, and JSON output formats.
17+
18+
### Improvements
19+
- **Agent Testing**: Enhanced `agent test` command with rich formatting and source citations.
20+
- **Error Handling**: Fuzzy matching for typos and helpful suggestions.
21+
</Update>
22+
623
<Update label="2025-11-20" description="v1.2.0 - Multi-agent Orchestration">
724
## Multi-agent Orchestration
825

cli/agent-testing.mdx

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
---
2+
title: "Agent Testing"
3+
description: "Test your agents with beautiful output and interactive options."
4+
---
5+
6+
# Agent Test Command
7+
8+
The `knowrithm agent test` command provides a beautiful, user-friendly testing experience with rich formatting and interactive chat capabilities.
9+
10+
## New Features
11+
12+
### 1. Beautiful Output Formatting
13+
14+
Instead of showing raw JSON in a table, the test results are now displayed in a clean, organized format:
15+
16+
```
17+
🧪 Testing agent 'Knowrithm Support'...
18+
19+
🤖 Agent: Knowrithm Support
20+
Model: google/gemini-2.5-flash
21+
22+
❓ Query:
23+
╭─────────────────────────────────────────────────────────╮
24+
│ Hello, can you introduce yourself? │
25+
╰─────────────────────────────────────────────────────────╯
26+
27+
💬 Response:
28+
╭─────────────────────────────────────────────────────────╮
29+
│ Hello! I'm Knowrithm Support, a professional AI │
30+
│ assistant designed to provide accurate and helpful │
31+
│ information. │
32+
│ │
33+
│ Knowrithm offers a platform where the same governance, │
34+
│ telemetry, and knowledge layer travel with you [Source │
35+
│ 1]... │
36+
╰─────────────────────────────────────────────────────────╯
37+
38+
📚 Sources (1):
39+
# Source Cited
40+
─────────────────────────────────────────────────────
41+
1 https://www.knowrithm.org/ ✓
42+
43+
ℹ️ Metadata:
44+
Total Sources 1
45+
Cited Sources 1
46+
47+
✅ Test completed successfully!
48+
```
49+
50+
### 2. Interactive Chat Session
51+
52+
New `--interactive` (or `-i`) flag allows you to start a chat session immediately after testing:
53+
54+
```bash
55+
# Test and automatically start chat
56+
knowrithm agent test --interactive
57+
58+
# Or with short flag
59+
knowrithm agent test -i
60+
```
61+
62+
After the test completes, you'll be prompted:
63+
```
64+
💬 Would you like to start an interactive chat session with this agent? (Y/n)
65+
```
66+
67+
If you select "Yes", it will:
68+
1. Create a new conversation
69+
2. Launch the interactive chat interface
70+
3. Allow you to continue chatting with the agent
71+
72+
### 3. Rich Spinner Animation
73+
74+
While the agent is processing, you'll see an animated spinner:
75+
```
76+
⠋ Agent is thinking...
77+
```
78+
79+
## Usage Examples
80+
81+
### Basic Test
82+
```bash
83+
# Test with default query
84+
knowrithm agent test
85+
86+
# Test with custom query
87+
knowrithm agent test --query "What are your pricing plans?"
88+
89+
# Test specific agent
90+
knowrithm agent test "Support Bot" --query "Hello"
91+
```
92+
93+
### Interactive Mode
94+
```bash
95+
# Test and start chat session
96+
knowrithm agent test --interactive
97+
98+
# Test with custom query and start chat
99+
knowrithm agent test -q "Hello" -i
100+
101+
# Test specific agent and start chat
102+
knowrithm agent test "Sales Bot" --interactive
103+
```
104+
105+
### Different Output Formats
106+
```bash
107+
# JSON format (raw data)
108+
knowrithm agent test --format json
109+
110+
# YAML format
111+
knowrithm agent test --format yaml
112+
113+
# Table format (default, with beautiful formatting)
114+
knowrithm agent test --format table
115+
```

0 commit comments

Comments
 (0)