Skip to content

V0.9.0

Choose a tag to compare

@JohnRichard4096 JohnRichard4096 released this 24 May 03:11
· 113 commits to main since this release
f73684c

AmritaCore 0.9.0 Release Summary

Major Changes

🏛️ License Change

  • License switched from MIT to Apache 2.0. All past and future versions are now released under the Apache 2.0 License.

🧱 Foundation on AmritaSense

  • AmritaCore now builds upon AmritaSense (≥0.2.1), a shared infrastructure package providing:
    • Workflow engine (WorkflowInterpreter, Node, control flow)
    • Event system (MatcherFactory, EventRegistry)
    • Streaming & suspend/resume (SuspendObjectStream)
    • Logging and weak cache utilities
  • Migration: Old import paths (amrita_core.streaming, amrita_core.logging, amrita_core.hook.*, amrita_core.weakcache) are deprecated and will emit warnings. Use amrita_sense equivalents.

🔄 Workflow-Driven ChatObject

  • ChatObject execution is now a composable node chain (train render → memory limit → pre‑runner → strategy → LLM call → post‑runner → archived nodes).
  • New parameters:
    • middleware: async function wrapping the entire workflow.
    • archived_nodes: append custom nodes after the standard pipeline.
  • New suspend tags (SuspendEnum.ENTRY_POINT, TRAIN_RENDER, MESSAGES_PREPARED, STRATEGY_START, LLM_CALL, FINALIZE).

🧠 Stateful Agent Strategies (StrategyLikedObject)

  • New base class for stateful strategies. Pass a pre‑initialised instance to ChatObject instead of a class.
  • The same instance lives for the whole conversation, carrying internal state, pre‑loaded resources, and custom logic.
  • ChatObject.agent_strategy now accepts both type[AgentStrategy] and StrategyLikedObject.

🔌 Adapter & Tokenizer Overhaul

  • Adapters moved to amrita_core.adapters with auto‑discovery.
  • Anthropic adapter now optional (amrita_core[anthropic]).
  • New tokenizer framework: BaseTokenizer, TokenizerManager.
    • SimpleTokenizer (default) – regex‑based, no external deps.
    • JiebaTokenizer (optional, amrita_core[jieba]) – better Chinese tokenization.
  • FunctionConfig.tokenizer_used selects which tokenizer to use.

🗑️ Deprecations & Removals

  • init() is deprecated and now a no‑op. Remove all calls to it. Use load_amrita() for async initialisation (e.g., MCP client).
  • Project structure section removed from CONTRIBUTING.md.
  • amrita_core.protocol – moved to amrita_core.base.adapter + amrita_core.contents (deprecated re‑exports).
  • amrita_core.builtins.adapter – replaced by amrita_core.adapters.

📦 Other Improvements

  • ChatManager and ChatObjectMeta are now properly exposed and documented.
  • MemoryLimiter moved to its own module with improved token counting.
  • get_tokens() now respects tokenizer_used.
  • Preset testing now uses real token usage from adapter responses.
  • Documentation fully restructured under docs/docs/ and updated for all new features.

Upgrade Guide

  1. Update dependencies – pip install -U amrita_core (auto‑installs amrita-sense).
  2. Remove all calls to amrita_core.init().
  3. If you use Anthropic adapter, install extra: pip install amrita_core[anthropic] (or [all]).
  4. If you use Jieba tokenizer, install extra: pip install amrita_core[jieba].
  5. Update imports for logging, streaming, hooks, and weakcache to use amrita_sense (or keep old deprecated imports until next release).
  6. Check custom adapters – import from amrita_core.base.adapter instead of amrita_core.protocol.
  7. Review license – Apache 2.0 applies from this version onward.

Report issues on GitHub. Full documentation is available at core.amritabot.com and sense.amritabot.com.

Full Changelog: 0.8.6.1...0.9.0