You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+83-33Lines changed: 83 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,13 +22,15 @@
22
22
Loom is an embeddable Agent SDK that helps developers build agent platform capabilities similar to [Hermes](https://github.com/nousresearch/hermes-agent) and [OpenClaw](https://github.com/openclaw/openclaw) with less overhead. It is not a gateway product, cron service, dashboard, or skill marketplace. The kernel gives application developers a stable language for building agent runtimes:
The `0.8.0` line stabilizes this runtime kernel. The `0.8.1` line completes the subsystem shortcuts for orchestration, knowledge, cron, and the new `MemorySource` API. Legacy 0.x compatibility imports remain available through `0.8.x` and are scheduled for removal in `0.9.0`.
33
+
The `0.8.x` line centers the public SDK on this runtime kernel and its subsystem shortcuts for orchestration, knowledge, cron, and `MemorySource`.
32
34
33
35
## Search Keywords
34
36
@@ -70,23 +72,36 @@ Teams that need an embeddable Python agent SDK with modular orchestration, memor
70
72
71
73
## Runtime Kernel And Subsystems
72
74
73
-
The runtime kernel is the shared execution boundary for Loom subsystems. Each subsystem is configured from the user-side `Agent(...)` API, normalized into `Runtime` and `Capability` objects, and then executed through the same run/session loop:
75
+
The runtime kernel is the shared execution boundary for Loom subsystems. Loom keeps a strict three-layer shape:
Each subsystem is configured from the user-side `Agent(...)` API, normalized into `Runtime`, `Capability`, and source objects, and then executed through the same run/session loop:
| Tool Use |`Capability`, tool registry, `GovernancePolicy`| Exposes Python tools, shell, files, web, MCP, and builtin tools behind permission, read-only, rate-limit, and veto checks. |
88
-
| Memory |`ContextProtocol`, memory partition, session restore, `MemorySource` lifecycle | Recalls durable application memory at run start and writes extracted memories at run end, separate from session history. |
89
-
| Skills |`Capability.skill(...)`, ecosystem loader, tool registry | Loads task-specific instructions and tools progressively without making every skill part of the base prompt. |
103
+
| Memory |`ContextPolicy`, memory partition, session restore, `MemorySource` lifecycle | Recalls durable application memory at run start and writes extracted memories at run end, separate from session history. |
104
+
| Skills |`Skill`, ecosystem loader, tool registry | Loads task-specific instructions and tools progressively without making every skill part of the base prompt. |
90
105
| Harness |`Runtime.harness`, `HarnessRequest`, `HarnessOutcome`, `QualityGate`| Controls how a run is attempted: single pass, generator/evaluator loops, custom candidate generation, human gates, or external workflows. |
91
106
| Gateway / Orchestration |`RuntimeSignal`, `AttentionPolicy`, `DelegationPolicy`, coordinator | Normalizes external events and subtask delegation into the same signal and runtime decision path. |
92
107
| Knowledge |`KnowledgeSource`, `KnowledgeResolver`, `C_working.knowledge_surface`| Injects run-scoped evidence, active questions, citations, and on-demand retrieval without polluting long-term memory. |
@@ -103,6 +118,14 @@ At run time these subsystems cooperate through the same loop:
103
118
104
119
This keeps integrations modular: new gateways, schedulers, retrievers, memory stores, or skills do not bypass the kernel; they adapt into the kernel contracts.
105
120
121
+
The governed capability path is intentionally explicit:
`tools` are precise Python function tools. `capabilities` are higher-level declarations such as files, web, shell, MCP, skills, or plugins. Both compile into the same governed tool path.
`Capability` is the user-side language for what an agent can do. Built-in capabilities compile into the same governed tool path as explicit function tools.
362
+
Use direct capability entries for common ability surfaces. They compile into the
363
+
same governed tool path as explicit function tools.
content="# Review\nCheck diffs, risks, and test results.",
341
378
when_to_use="review,diff",
@@ -347,6 +384,20 @@ agent = Agent(
347
384
348
385
Capability use is checked by `GovernancePolicy`, including permission, veto, rate-limit, read-only, and destructive-operation boundaries.
349
386
387
+
Use `tools=` when you already have a concrete Python callable to register. Use `capabilities=` when you want to grant a class of abilities that Loom compiles into tools at runtime.
388
+
389
+
| Input | User intent | Runtime result |
390
+
|---|---|---|
391
+
|`tools=[fn]`| Add one exact function tool |`ToolSpec -> ToolRegistry`|
392
+
|`Files(read_only=True)`| Grant file access | Built-in file toolset |
393
+
|`Web.enabled()`| Grant web research | Built-in web toolset |
394
+
|`Shell.approval_required()`| Grant shell execution | Shell toolset with approval policy |
`Capability` remains available from `loom.runtime` for advanced architecture-level
399
+
declarations, but the documented user path uses the direct domain names above.
400
+
350
401
## Runtime Signals
351
402
352
403
Gateway events, cron jobs, heartbeat alerts, webhooks, and application callbacks should all enter the kernel as `RuntimeSignal`. The runtime does not distinguish producers; `AttentionPolicy` decides whether a signal is observed, queued for a run, or treated as an interrupt.
@@ -521,7 +572,7 @@ agent = Agent(
521
572
)
522
573
```
523
574
524
-
At run start, each `MemorySource` retrieves records and injects them into the memory partition. At run end, its extractor can produce records and write them through the store. `MemoryProvider` remains available as a legacy compatibility bridge in `0.8.x`; new code should use `MemorySource`.
575
+
At run start, each `MemorySource` retrieves records and injects them into the memory partition. At run end, its extractor can produce records and write them through the store. `MemorySource` is the single public extension point for durable memory integrations.
525
576
526
577
## Hooks And Events
527
578
@@ -629,8 +680,8 @@ result = await agent.run(
629
680
## Architecture
630
681
631
682
```text
632
-
loom/agent.py public Agent API and compatibility factory
633
-
loom/config.py public config facade and 0.8 aliases
Compatibility imports such as `AgentConfig`, `ModelRef`, `GenerationConfig`, and `create_agent()` remain available through `0.8.x`, but new code should prefer `Agent(...)`.
36
+
Application code should use `Agent(...)`; lower-level configuration objects remain under `loom.config`.
37
37
38
38
## Package Structure
39
39
40
-
-`agent.py` - public Agent API and compatibility factory
41
-
-`config.py` - public config facade and 0.8 aliases
0 commit comments