UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

31 lines (26 loc) • 2.23 kB
# Third-party design & content attribution `@sema-agent/core` is licensed under the Business Source License 1.1 (BUSL-1.1; Change License: Apache-2.0, Change Date: 2030-07-13 — see LICENSE). Versions ≤1.277.1 were published under MIT. It incorporates design and (where noted) prompt content adapted from the following MIT-licensed projects. All are reused under the MIT License. ## openclaw — https://github.com/openclaw/openclaw (MIT) Vendored source: the reusable agent core (`@openclaw/agent-core`) and `@openclaw/llm-core` live under `src/vendor/` with minimal modifications; that tree has since been fully rewritten into first-party code (design/118 de-vendoring, 2026-07-02). See `docs/vendor-history.md` for the baseline commit and the complete modification history. ## CodeWhale (formerly DeepSeek CLI) — https://github.com/Hmbown/CodeWhale (MIT) Copyright (c) 2024-2025 DeepSeek CLI Contributors. Design adapted (re-implemented in TypeScript, not copied verbatim): - `src/core/memory.ts` — the user-memory pattern (persistent notes, a `remember` tool, the `<user_memory>` system-prompt block, size truncation, timestamped bullets) is adapted from CodeWhale's `crates/tui/src/memory.rs`. - `src/prompts/default.ts` — the default system prompt distills the *universal* agent disciplines from CodeWhale's `prompts/base.md` "Constitution" (truth, duty of action, verification, tool-use enforcement, hierarchy of authority) and `prompts/memory_guidance.md` (memory = declarative facts). CodeWhale's project branding and coding-/DeepSeek-specific content are not used; the text here is a domain-neutral rewrite. - `test/prompt-cache.test.ts` — the offline byte-prefix-cache simulation (multi-turn hit-rate guard) is ported from CodeWhale's `crates/tui/tests/cache_guard.rs`. - `src/brain/openai.ts` — parsing prefix-cache-hit tokens from the response usage (`prompt_tokens_details.cached_tokens` / `prompt_cache_hit_tokens`) follows CodeWhale's `client.rs`. ## Anthropic engineering guidance (referenced, not code) Context-engineering and memory-tool design follow Anthropic's public engineering writing (context engineering, memory tool + context editing, managed agents, multi-agent systems).