open-agents-ai 0.185.88 → 0.185.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -0
- package/dist/index.js +17 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -610,6 +610,12 @@ curl -X DELETE -H "Authorization: Bearer $ADMIN_KEY" \
|
|
|
610
610
|
| GET | `/v1/models` | read | List models (OpenAI format) |
|
|
611
611
|
| POST | `/v1/chat/completions` | run | Chat inference (stream + sync) |
|
|
612
612
|
| POST | `/v1/embeddings` | run | Generate embeddings |
|
|
613
|
+
| POST | `/v1/chat` | run | Stateful chat with full tool access (sessions, context, memory) |
|
|
614
|
+
| GET | `/v1/chat/sessions` | read | List active chat sessions |
|
|
615
|
+
| GET | `/v1/system` | none | GPU/RAM/CPU info + model recommendations |
|
|
616
|
+
| GET | `/v1/audit` | read | Query audit log (since, user, limit filters) |
|
|
617
|
+
| GET | `/openapi.json` | none | OpenAPI 3.0 specification |
|
|
618
|
+
| GET | `/docs` | none | Swagger UI (interactive API docs) |
|
|
613
619
|
| POST | `/v1/run` | run | Submit agentic task |
|
|
614
620
|
| GET | `/v1/runs` | read | List all runs |
|
|
615
621
|
| GET | `/v1/runs/:id` | read | Run status |
|
|
@@ -627,6 +633,55 @@ curl -X DELETE -H "Authorization: Bearer $ADMIN_KEY" \
|
|
|
627
633
|
| POST | `/v1/profiles` | admin | Create/update profile (password field for encryption) |
|
|
628
634
|
| DELETE | `/v1/profiles/:name` | admin | Delete custom profile |
|
|
629
635
|
|
|
636
|
+
#### Stateful Chat — `/v1/chat`
|
|
637
|
+
|
|
638
|
+
Unlike `/v1/chat/completions` (raw Ollama proxy), `/v1/chat` spawns the full OA agent with all 61 tools for each message. The agent can search the web, read files, run shell commands, and use memory — exactly like the TUI.
|
|
639
|
+
|
|
640
|
+
```bash
|
|
641
|
+
# Send a chat message (full tool access)
|
|
642
|
+
curl -s http://localhost:11435/v1/chat \
|
|
643
|
+
-H "Content-Type: application/json" \
|
|
644
|
+
-d '{"message": "What is happening in the world today?", "model": "qwen3.5:9b", "stream": false}'
|
|
645
|
+
|
|
646
|
+
# Response: {"session_id": "abc123", "message": {"role": "assistant", "content": "..."}}
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
**Session management:** Each chat message returns a `session_id`. Send it back to maintain conversation context across turns:
|
|
650
|
+
|
|
651
|
+
```bash
|
|
652
|
+
curl -s http://localhost:11435/v1/chat \
|
|
653
|
+
-d '{"session_id": "abc123", "message": "Tell me more about that", "model": "qwen3.5:9b", "stream": false}'
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
Sessions expire after 30 minutes of inactivity. List active sessions: `GET /v1/chat/sessions`.
|
|
657
|
+
|
|
658
|
+
**Streaming:** Set `"stream": true` for Server-Sent Events with tool call visualization and incremental content.
|
|
659
|
+
|
|
660
|
+
#### Web Interface
|
|
661
|
+
|
|
662
|
+
Open `http://localhost:11435/` in a browser when `oa serve` is running. Zero external dependencies — single self-contained HTML page.
|
|
663
|
+
|
|
664
|
+
**Tabs:**
|
|
665
|
+
- **Chat** — Conversational interface using `/v1/chat` with full tool access, session persistence, streaming responses, and collapsible tool call dropdowns
|
|
666
|
+
- **Agent** — Submit agentic tasks via `/v1/run`, profile selection, live SSE event stream, abort button
|
|
667
|
+
- **Dashboard** — System health (GPU, RAM, uptime), per-provider token usage (persistent across restarts), active process monitor, job history with pagination
|
|
668
|
+
- **Config** — Server settings table, model switcher, endpoint manager (add/change inference providers), profile list
|
|
669
|
+
- **Activity** — Real-time audit log feed with color-coded status codes
|
|
670
|
+
|
|
671
|
+
**Design:** Dark theme (#1a1a1e background, #b2920a gold accent, SF Mono font) matching the TUI and /call voice interface. Mobile responsive with CSS media queries.
|
|
672
|
+
|
|
673
|
+
**Features:**
|
|
674
|
+
- Model picker populated from `/v1/models`
|
|
675
|
+
- API key support (stored in localStorage)
|
|
676
|
+
- System prompt (collapsible textarea)
|
|
677
|
+
- Markdown rendering with code block copy buttons
|
|
678
|
+
- Docker sandbox toggle (native vs container execution)
|
|
679
|
+
- Workspace sidebar (toggleable file tree)
|
|
680
|
+
- Token counter per conversation
|
|
681
|
+
- Conversation export (Markdown or JSON)
|
|
682
|
+
- GPU/VRAM detection with model compatibility recommendations
|
|
683
|
+
- Per-provider token tracking (persisted to `.oa/usage/token-usage.json`)
|
|
684
|
+
|
|
630
685
|
### Enterprise Licensing
|
|
631
686
|
|
|
632
687
|
Free for non-commercial use under CC-BY-NC-4.0. For enterprise/commercial licensing, contact [zoomerconsulting.com](https://zoomerconsulting.com).
|
package/dist/index.js
CHANGED
|
@@ -68133,22 +68133,26 @@ Respond conversationally. Call task_complete with your final response.`;
|
|
|
68133
68133
|
});
|
|
68134
68134
|
await new Promise((resolve36) => child.on("close", resolve36));
|
|
68135
68135
|
let content = "";
|
|
68136
|
-
|
|
68137
|
-
|
|
68138
|
-
|
|
68139
|
-
|
|
68140
|
-
|
|
68141
|
-
|
|
68142
|
-
|
|
68143
|
-
|
|
68144
|
-
|
|
68145
|
-
|
|
68136
|
+
try {
|
|
68137
|
+
const result = JSON.parse(output.trim());
|
|
68138
|
+
const summary = result.summary || "";
|
|
68139
|
+
const match = summary.match(/Tokens:\s*[\d,]+\s+([\s\S]*)/);
|
|
68140
|
+
content = match ? match[1].trim() : summary;
|
|
68141
|
+
} catch {
|
|
68142
|
+
for (const line of output.split("\n")) {
|
|
68143
|
+
if (!line.trim())
|
|
68144
|
+
continue;
|
|
68145
|
+
try {
|
|
68146
|
+
const evt = JSON.parse(line);
|
|
68147
|
+
if (evt.status === "completed") {
|
|
68148
|
+
const summary = evt.summary || "";
|
|
68149
|
+
const match = summary.match(/Tokens:\s*[\d,]+\s+([\s\S]*)/);
|
|
68150
|
+
content = match ? match[1].trim() : summary;
|
|
68151
|
+
}
|
|
68152
|
+
} catch {
|
|
68146
68153
|
}
|
|
68147
|
-
} catch {
|
|
68148
68154
|
}
|
|
68149
68155
|
}
|
|
68150
|
-
if (!content.trim())
|
|
68151
|
-
content = summaryContent;
|
|
68152
68156
|
addAssistantMessage(session, content.trim());
|
|
68153
68157
|
jsonResponse(res, 200, {
|
|
68154
68158
|
session_id: session.id,
|
package/package.json
CHANGED