Skip to main content

From tools to scope Breaking change

Agentica’s REPL use suggests a different model to traditional tool-based frameworks and as such the parameter name tools has been renamed to scope to reflect this; rather than a static toolbox, agents have a scopea dynamic collection of objects with which an agent can interact, one that evolves naturally as code is executed in the REPL.
result = await agent("Do something", **tools)
To reaffirm Agentica’s commitment to agents as its core primitive, the class MagicAgent has also been renamed to Agent. In addition to this, the Agent.__call__() method is now deprecated and replaced in name only with Agent.call().
from agentica.magic import MagicAgent

Agentica now available for TypeScript Feature

The Agentica SDK is now available for TypeScript, supporting a first set of language primitives. The two core perimitives in the Python Agentica SDK are available in TypeScript as magic<T>() for AI-implemented functions and the Agent class for stateful agentic workflows. All of our core concepts and guides include TypeScript examples, and the full API reference can be found here. The support for scope in TypeScript includes:
  • Primitive types including literal types (string, number, boolean)
  • Tuples
  • Objects (including index signatures, interfaces, classes, etc.)
  • Union and intersection types
  • Optional parameters and default values
  • Rest arguments / spread operator (...args)
  • Conditional types, type parameters, indexed access
  • Symbol, BigInt, template literals
  • Exceptions

Agents can now raise custom exceptions Feature

Both magic functions and agents can now raise user-defined custom exceptions in both Python and TypeScript. Simply pass in the exception class viathe scope argument. This makes exception handling and retries significantly easier. See here for more information on how to get the most out of custom exceptions for more information.

Custom system prompts Feature

Agentica now allows users to pass in custom system prompts with system instead of premise for both Python and TypeScript to improve the accuracy and reliability of agents in fufilling specific tasks. If system is provided, then the task provided on calling an agent will be treated as a raw user prompt. This gives developers the opportunity to use Agentica at a low level with fine-grained control. See here for more information on how and when to write effective custom system prompts in Agentica. A templating system has been added to help write custom system prompts given the specific REPL that agents have access to in Agentica. See here for more information.

Simplified streaming for Python Breaking change

Existing streaming functionality has been consolidated under listeners and loggers; .echo() method replaced with StreamLogger context manager.
result, stream = agent.echo(...)

Improvements Improvement

General

  1. The implementation of agents with a str or string return type in Python and TypeScript now facilitates a return to users on text-only responses. This decision was made to improve the models ability to use the REPL in a chat-style interface with users, allowing them to interact with the user without using the REPL if they so choose. The default return type for both Python and TypeScript is now str and string respectively.
  2. Prompting for Anthropic models has also changed to reduce hallucinations in response to code execution and improve their efficacy in using the REPL.
  3. Support for Anthropic Claude Sonnet 4.5 and OpenAI GPT-3.5 Turbo has been added with the slugs anthropic:claude-sonnet-4.5 and openai:gpt-3.5-turbo respectively.

Python

  1. A new CaptionLogger is implemented and ready to use for multi-agent output visualization. This logger spawns one captioning agent per agent that summarizes the actions of the agent during inference using streaming. The CaptionLogger context manager displays the summaries in the terminal during inference.
  2. Advanced iterators (generators, custom iterators) and range objects (range(1, 10)) are now supported for the scope parameter for both magic functions and agents.