@llmnative/agentico 0.22.1 → 0.24.0

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 CHANGED
@@ -70,6 +70,49 @@ const settings = useMemo<AgenticoSettingsConfig>(() => ({
70
70
  `useAgenticoSettings()` gives the values in effect. A reasoning set by the agent (`executor.catalogReasoning`) wins over
71
71
  the one of the settings.
72
72
 
73
+ ## Server, connections, runners and memory (CR-025, CR-026)
74
+
75
+ The same in every host: the models, the runners and the memory are in the settings of Agentico. The host mounts the
76
+ server of Agentico (`@llmnative/agentico/server`, pure Node) and gives three things: who asks (from its own sign-in),
77
+ where it keeps documents, where it keeps secrets. Keys never reach the browser.
78
+
79
+ ```ts
80
+ // Server (Hono, a Cloud Function…): one handle(Request).
81
+ import { createAgenticoServer, fileStores } from '@llmnative/agentico/server';
82
+
83
+ const agentico = createAgenticoServer({
84
+ ...fileStores('.data/agentico'), // or the host's database and secret manager
85
+ platformName: 'My app',
86
+ basePath: '/api/agentico',
87
+ sessionHeaders: ['x-session'], // never forwarded to the AI providers
88
+ identity: async (request) => { // null: not signed in
89
+ const person = await sessionOf(request);
90
+ return person && { user: { id: person.id }, role: person.role, project: 'crm', tenant: person.tenant };
91
+ },
92
+ });
93
+ app.all('/api/agentico/*', (c) => agentico.handle(c.req.raw));
94
+ ```
95
+
96
+ ```tsx
97
+ // Browser: the settings get the tabs Connections, Memory and Projects.
98
+ const backend = useMemo(() => createAgenticoBackend({ baseUrl: '/api/agentico', headers: () => ({ 'x-session': token }) }), [token]);
99
+ <AgenticoProvider settings={{ backend }}>…</AgenticoProvider>
100
+ ```
101
+
102
+ - **Namespace** `<project>` or `<project>-<tenant>`: the tenant on the runner and the container of the memory.
103
+ - **Roles**: `platform` (runners, memories, which runner and memory each namespace uses), `admin` (the cloud keys of
104
+ their namespace), `member` (uses them; their own subscriptions on the runner).
105
+ - **Connections**: boxes that open a modal — *Cloud* (`AIConnections`: the providers of `@llmnative/react` with their
106
+ keys, checked before kept), one per runner (state, default, draining, the accounts of the namespace: subscriptions and
107
+ API keys run on the runner), *Add a runner* (installed over SSH or by hand, or connected by approving the request on
108
+ the runner: the platform key owns only the namespaces of the project, runner 1.2).
109
+ - **Memory**: supermemory (API address, MCP server, key); each namespace reads and writes `/ns/<namespace>`.
110
+ - **Projects**: each namespace of the project, its runner and its memory.
111
+ - The AI adapters of the browser use the proxy of the framework on `<basePath>/ai/proxy` (`providers.proxy.route`,
112
+ placeholders `llmnative-server-credential:<namespace>:<provider>`); a server answers with `<basePath>/ai/complete`.
113
+ - Without a harness of the host, the runner of the namespace is the harness (CR-024): the subscriptions of the person
114
+ next to the API models.
115
+
73
116
  ## Concepts
74
117
 
75
118
  | Concept | API |
@@ -89,6 +132,7 @@ the one of the settings.
89
132
  | **Saved chats** — one chat per saved entity, resumable, known by when it started, kept by the host too (`backend`, `syncEntityChats`, CR-013) | `configureEntityChatStore`, `getEntityChat`, `listEntityChats`, `chatStartedAt` (CR-010); titles written by the model and renamed by the person: `autoTitle`, `chatTitle`, `renameEntityChat`, `onEntityChatsChange` (CR-011) |
90
133
  | **Approval of tools** — a tool that stops work, spends or cannot be undone runs only after the person approves it, on a question docked at the bottom of the chat (Approve / Reject with a reason) | `AgentTool.needsApproval`, `describeApproval` |
91
134
  | **Conversational subagents** — a chat with the model and its tools, nothing to apply at the end: each reply a message of the chat, no result preview or destinations | `AgentDefinition.conversational` |
135
+ | **The harness of the host** — models that run their own loop of tools (e.g. Claude Code with the person's subscription on a runner of the host), next to the AI catalog for every agent without an executor, orchestrator included, with the agent's prompts, tools (approvals, steps, cards) and parsing; tabs of the host in the settings | `<AgenticoProvider harness>` (`AgenticoHarness`), `runHostTool`, `settings.tabs` (CR-024) |
92
136
  | **Remote subagents** — turns answered by the host (a remote agent with its own memory, e.g. an opencode session), streamed with its steps; its own models in the composer, no fallback | `AgentDefinition.executor` (`AgentExecutor`, `models`, `defaultModel`) |
93
137
  | **Executor alongside the AI catalog** — one subagent, its tools on the AI catalog and the turns of the executor's models answered by the host (e.g. a harness on a server); both in one picker, grouped with badges | `executor.alongside`, `executor.catalogGroup`, `groupBadge` (CR-009); `executor.catalogProviders(params)` limits the catalog of a chat (CR-010); `executor.catalogReasoning(params, provider)` sets how much it reasons there (CR-012) |
94
138
  | **Message parts** — a remote reply in parts, as in the Vercel AI SDK / AG-UI: Markdown text (tables, lists, code; repaired while it streams), the reasoning of the model (closed, "Reasoned for 12 s"), the steps grouped and collapsible, questions answered with a click. Answers go back structured: to the waiting turn (`onQuestions` resolves) or as a new turn with `answers`. Parts are saved with the chat; chats saved with text only still load | `AgentExecutorTurn.onText(text, { id?, done? })`, `onReasoning(text, { id?, done?, duration? })`, `onStep`, `onQuestions(questions, { id? })`, `AgentExecutorTurn.answers`, `AgentMessagePart`, `useAgent().answerQuestions` |