Skip to content

Commit 596a54b

Browse files
committed
Update version to 0.3.4 and enhance README and documentation to reflect new tabbed chat feature, allowing up to 10 parallel sessions per project. Include details on session management and cost tracking improvements.
1 parent 13ba4ad commit 596a54b

7 files changed

Lines changed: 1863 additions & 1238 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ It is built for scientists, analysts, and curious people who want a powerful AI
1515
## What can it do?
1616

1717
- **Answer questions and take on tasks.** Chat with Kady like any AI assistant. For bigger work, Kady delegates to a specialist "expert" agent that runs with a full Python environment and scientific tools.
18+
- **Run up to 10 chats in parallel.** Open a new tab for each thread of work — every tab keeps its own message history, model, attached files, and cost meter, but all tabs share the project's sandbox so files written in one tab are immediately available in the others. Tabs keep streaming in the background while you switch between them.
1819
- **Pick any AI model, any time.** Choose from 30+ models across 10 providers (OpenAI, Anthropic, Google, xAI, Qwen, and more) with a simple dropdown. Switch models message to message. You can also use free local models through [Ollama](./docs/local-models-ollama.md).
1920
- **170+ scientific skills, pre-installed.** Covers genomics, proteomics, drug discovery, materials science, and more. Kady passes the right skills to the expert automatically for each task.
2021
- **326 ready-to-run workflow templates.** Browse a built-in library across 22 disciplines - genomics, drug discovery, finance, astrophysics, and more. Pick one, fill in the blanks, and launch.
@@ -59,7 +60,6 @@ The file also has sections for other optional keys (Parallel for web search, Mod
5960
### Step 3 - Start the app
6061

6162
```bash
62-
chmod +x start.sh
6363
./start.sh
6464
```
6565

@@ -74,9 +74,10 @@ Press **Ctrl+C** in the terminal.
7474
## Using the app day to day
7575

7676
- **Send a message.** Type a question or task and hit enter. Kady will either answer directly or hand off to an expert for bigger work.
77-
- **Switch models.** Use the model dropdown in the input bar - any message can use any model.
77+
- **Open multiple chats.** Click `+` in the chat tab strip to start a new chat in the same project (up to 10). Double-click a tab title or use the pencil icon to rename it. Closing a tab cancels any turn it had running. The cost pill in the header shows both the active tab's session cost (`sess`) and the project total across every tab (`proj`).
78+
- **Switch models.** Use the model dropdown in the input bar - any message can use any model. Each tab keeps its own model selection.
7879
- **Upload files.** Drag files into the file browser or directly onto the input bar. Use `@filename` in your message to reference files.
79-
- **Launch a workflow.** Open the workflows panel, pick one, fill in the blanks, and click Launch.
80+
- **Launch a workflow.** Open the workflows panel, pick one, fill in the blanks, and click Launch. Workflows run in whichever chat tab is currently active.
8081
- **Open Settings** (the gear icon in the top-right) for API keys, MCP servers, browser automation, and appearance.
8182
- **Copy as Methods.** When you're done, export a publication-ready Methods paragraph summarising the session.
8283

@@ -100,7 +101,7 @@ These guides live in the [`docs/`](./docs) folder:
100101
- AutoResearch integration
101102
- And much more
102103

103-
Recently completed: Ollama local model support, MCP server configuration in the UI, and choosing the expert's model from the main dropdown.
104+
Recently completed: tabbed chats (up to 10 parallel sessions per project, sharing the same sandbox), Ollama local model support, MCP server configuration in the UI, and choosing the expert's model from the main dropdown.
104105

105106
## Want more?
106107

docs/architecture.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,43 @@ The `start.sh` script launches three local services that work together:
1616

1717
When you send a message:
1818

19-
1. The frontend passes it to the backend.
19+
1. The frontend passes it to the backend, tagged with the project id and the chat tab's session id.
2020
2. Kady (on the backend) decides whether to answer directly or delegate to an expert agent.
2121
3. Any AI calls go through the LiteLLM proxy to the correct provider.
2222
4. Responses stream back to your browser in real time.
2323

24+
## Chat tabs and sessions
25+
26+
Every chat tab in the UI is backed by its own backend **session**. A session
27+
is a single conversation: an id, an ordered list of messages, and a cost
28+
ledger. You can open up to 10 tabs in a project; the list of tabs lives only
29+
in the browser, but each tab's session is persistent on disk under that
30+
project.
31+
32+
What a tab owns (per-tab):
33+
34+
- Message history (one session row in `projects/<project>/sessions.db`).
35+
- Selected orchestrator and expert models.
36+
- Attached files for the next message and the queued-message buffer.
37+
- Cost ledger (`projects/<project>/sandbox/.kady/runs/<sessionId>/costs.jsonl`).
38+
- The streaming connection — closing a tab aborts the in-flight turn for
39+
that session only.
40+
41+
What every tab in a project shares:
42+
43+
- The sandbox (`projects/<project>/sandbox/`) — files written by one tab are
44+
immediately visible to the others.
45+
- Project settings: budget cap, custom MCP servers (`custom_mcps.json`),
46+
browser-automation toggle, and the project-level cost total shown in the
47+
header pill.
48+
- API keys and global preferences from `kady_agent/.env`.
49+
50+
Switching tabs in the UI is purely client-side; the backend doesn't need to
51+
know which tab is "active" because each request already carries its own
52+
session id. Inactive tabs stay mounted in the DOM (hidden with CSS) so a
53+
streaming turn keeps producing output even when you're looking at another
54+
tab.
55+
2456
## First-run setup
2557

2658
The first time you run `./start.sh`, it will automatically:
@@ -52,8 +84,10 @@ k-dense-byok/
5284
└── default/ ← The "Default" project
5385
├── project.json ← Project metadata
5486
├── sandbox/ ← Workspace for files and expert tasks
87+
│ └── .kady/
88+
│ └── runs/<sessionId>/ ← Per-tab cost ledger and turn artifacts
5589
├── custom_mcps.json ← Per-project custom MCP servers
56-
└── sessions.db ← Chat history (SQLite, per project)
90+
└── sessions.db ← Chat history (SQLite, one session per chat tab)
5791
```
5892

5993
## A note on the expert model

docs/limitations.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,18 @@ Local models served through Ollama are supported end-to-end, but they amplify th
2626
- Skills that rely on multi-tool choreography (browsing, running scripts, structured output) are the most fragile.
2727

2828
If a delegation loops or ignores its skill, try a **larger local model** (or temporarily switch back to an OpenRouter-hosted model) before assuming the workflow is broken. See [Local models with Ollama](./local-models-ollama.md).
29+
30+
## Tabbed chats
31+
32+
- **Hard cap of 10 tabs per project.** This keeps the browser snappy and
33+
bounds the number of parallel SSE streams to the backend. Close an
34+
existing tab before opening a new one once you hit the limit.
35+
- **Tab list isn't persisted across reloads.** Refreshing the page resets
36+
you to a single new chat tab. The underlying sessions and their message
37+
history are still on disk under the project — you just can't currently
38+
reopen them all at once into tabs from the UI. Re-opening a session by
39+
id from the UI is on the roadmap.
40+
- **Workflows launch into the active tab.** If you have a long-running
41+
turn streaming in tab A and click Launch on a workflow while tab B is
42+
active, the workflow runs in tab B. Switch to the tab you want to
43+
receive the workflow before launching.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "kady"
3-
version = "0.3.3"
3+
version = "0.3.4"
44
description = "Kady — K-Dense BYOK Agent"
55
readme = "README.md"
66
requires-python = ">=3.13"

0 commit comments

Comments
 (0)