agents_core
A Dart library for orchestrating multi-agent AI workflows with LM Studio integration. Create agents, manage conversations, execute Python in Docker, and coordinate multi-step pipelines.
What this package is like to depend on
Last release 4 months ago
20 Apr 2026
Too new to tell
only 2 release windows
Nearly every release is documented
notes for 13 of 13 stable releases
Nothing withdrawn
no release was ever pulled
5 months old
13 releases · first in 2026
13 releases in the last 12 months
see the full history below
Release timeline
13 releases · Mar 2026 to Apr 2026Releases
latest 13-
0.3.620 Apr 2026Release notes
Open source →- No new features, just a refactor in the whole package to apply SOLID and Clean Code best practices.
-
0.3.528 Mar 2026Release notes
Open source →Features
Terminal Tools
- New
terminalToolsparameter onReActAgent— aSet<String>of tool names that cause the ReAct loop to stop immediately after execution withstoppedReason: "terminal_tool". Useful for "submit_result" style tools where the tool call IS the final answer, eliminating unnecessary follow-up iterations.
- New
-
0.3.427 Mar 2026Release notes
Open source →Features
Global Log Control
- New
loggingEnabledparameter onAgentsCoreConfig— a single boolean switch to globally enable or disable all library-wide diagnostic logging. Defaults totrue(logging active). When set tofalse, theloggergetter transparently returns aSilentLoggerregardless of the configured logger instance, so calling code does not need to check the toggle explicitly. - New
AGENTS_LOGGING_ENABLEDenvironment variable — set to"false"or"0"(case-insensitive) to disable logging when usingAgentsCoreConfig.fromEnvironment(). An explicitloggingEnabledparameter takes precedence over the environment variable. copyWith(loggingEnabled: ...)support for toggling log state on existing configs.
- New
-
0.3.327 Mar 2026Release notes
Open source →Features
Smart Loop Detection
- New
LoopDetectionConfig— immutable configuration class controlling loop detection thresholds:maxConsecutiveIdenticalToolCalls(default 3),maxConsecutiveIdenticalOutputs(default 3), andsimilarityThreshold(default 0.85). Supportsconstconstruction, value equality, andtoString(). - New
LoopDetector— stateful detector that tracks consecutive identical tool-call sequences (via sorted fingerprints) and near-identical text outputs (via bigram Sørensen–Dice similarity). CallrecordToolCalls()/recordOutput()per iteration, thencheck()to get aLoopCheckResult. Includesreset()for reuse across tasks. - New
LoopCheckResult— result type withisLoopingflag and human-readablereason. Provides a staticLoopCheckResult.okconstant for the non-looping case. LoopDetector.bigramSimilarity()— static utility that computes the Sørensen–Dice coefficient over character bigrams for fuzzy string comparison.
ReActAgent Integration
ReActAgentnow accepts an optionalloopDetectionConfigparameter. When provided, aLoopDetectoris created perrun()invocation and checks for repetitive tool-call sequences or near-identical outputs after each iteration. Detected loops stop the agent withstoppedReason: "loop_detected".
AgentLoop Integration
AgentLoopnow accepts an optionalloopDetectionConfigparameter. When provided, producer outputs are tracked each iteration and the loop stops early withstoppedReason: "loop_detected"if repetitive patterns are found.AgentLoopResultgains astoppedReasonfield ("accepted","max_iterations", or"loop_detected") and two new convenience getters:loopDetectedand an updatedreachedMaxIterationsthat excludes loop-detection stops.
- New
-
0.3.227 Mar 2026Release notes
Open source →Examples
- New
bugfix_pipeline.dart— realistic 5-step end-to-end bugfix workflow demonstratingReActAgentwith file-context tools,AgentLoopStep.dynamicproduce-review loops,AgentStep.dynamicwith conditional execution, custombuildProducerPromptfor reviewer-feedback injection, andStepResultpattern matching for post-run inspection. Seven specialised agents collaborate across triage → root-cause analysis → fix → regression tests → PR summary, all orchestrated by a singleOrchestrator.run()call.
- New
-
0.3.126 Mar 2026Release notes
Open source →Bug Fixes
LM Studio Client
- Fixed HTTP request body encoding in
LmStudioHttpClient— replacedrequest.write()withrequest.add(utf8.encode(...))in bothpostStreamand the internal_sendRequesthelper. The previous implementation could corrupt non-ASCII characters (e.g. Unicode prompts) becausewrite()uses the platform default encoding, which is not guaranteed to be UTF-8.
- Fixed HTTP request body encoding in
-
0.3.026 Mar 2026Release notes
Open source →Previously, orchestrator pipelines only supported single-agent steps, forcing produce-review loops to be managed outside the pipeline. This release introduces a step hierarchy that lets you mix single-agent tasks and iterative review cycles in the same orchestrator, enabling end-to-end workflows like "research → develop → review" without glue code. Existing
AgentStepusage is fully backward-compatible.Migration Notes
OrchestratorResult.stepResultstype changestepResultschanged fromList<AgentResult>toList<StepResult>. Code that accessedAgentResultproperties directly needs to use the commonStepResultaccessors or unwrap via pattern matching:// Before (0.2.x) for (final agentResult in result.stepResults) { print(agentResult.output); print(agentResult.stoppedReason); } // After (0.3.0) — common accessors work on all subtypes for (final stepResult in result.stepResults) { print(stepResult.output); // available on all StepResult subtypes print(stepResult.tokensUsed); // available on all StepResult subtypes // Type-specific access via pattern matching if (stepResult is AgentStepResult) { print(stepResult.agentResult.stoppedReason); } else if (stepResult is AgentLoopStepResult) { print(stepResult.accepted); print(stepResult.iterationCount); } }Orchestrator.stepstype widenedstepschanged fromList<AgentStep>toList<OrchestratorStep>. Existing code that passes aList<AgentStep>continues to work without changes sinceAgentStepnow extendsOrchestratorStep.Features
Orchestrator Step Hierarchy
OrchestratorStep— abstract base class for all pipeline steps withtaskPromptand optionalconditionguard. Enables polymorphic step pipelines.AgentLoopStep— new step type that embeds a produce-review loop directly inside anOrchestratorpipeline. Supports static and dynamic (AgentLoopStep.dynamic) task prompts, custom prompt builders, and configurablemaxIterations.StepResult— abstract base for step results with uniformoutputandtokensUsedaccessors.AgentStepResult— wrapsAgentResultfrom a single-agent step.AgentLoopStepResult— wrapsAgentLoopResultfrom a produce-review loop step, withacceptedanditerationCountconvenience accessors.
Orchestrator Refactoring
Orchestrator.stepsnow acceptsList<OrchestratorStep>(wasList<AgentStep>), enabling mixed pipelines ofAgentStepandAgentLoopStep.OrchestratorResult.stepResultschanged fromList<AgentResult>toList<StepResult>— useis AgentStepResultoris AgentLoopStepResultfor type-specific access.AgentStepnow extendsOrchestratorStep(backward-compatible — existingAgentStepusage continues to work unchanged).
Examples
- New
orchestrator_with_agent_loop.dart— 3-step pipeline mixingAgentStepwithAgentLoopStep. - New
feature_development_pipeline.dart— realistic 5-stage software development pipeline withPersistingAgentdecorator, dynamic prompts, conditional steps, andAgentLoopStepwith custom prompt builders.
-
0.2.126 Mar 2026 -
0.2.026 Mar 2026Release notes
Open source →Features
Agent Loop
AgentLoop— producer/reviewer orchestration loop that iterates a producer agent and a reviewer agent until an approval pattern is matched ormaxIterationsis reached.AgentLoopIteration— immutable record of a single loop iteration capturingindex,producerResult, andreviewerResult.AgentLoopResult— aggregated result withiterations,approvedflag, totalduration, and combinederrors.- New
example/agent_loop.dartdemonstrating a developer + QA review loop.
Bug Fixes
File Context
- Fixed
FileContext._resolveto useUri.fileinstead ofUri.parseso that workspace paths containing spaces are handled correctly without percent-encoding artifacts.
-
0.1.225 Mar 2026Release notes
Open source →Improvements
LM Studio Client
LmStudioHttpClientnow correctly throwsLmStudioHttpExceptionfor 4xx client errors instead of misclassifying them — improves error handling for authentication failures, not-found, and rate-limit responses.- Retry logic refined to only retry on transient (5xx/network) errors, not client errors.
Bug Fixes
- Fixed flaky retry-related test expectations caused by timing sensitivity in exponential backoff verification.
-
0.1.125 Mar 2026Release notes
Open source →Add API_KEY to AgentsCoreConfig
Configuration
- Optional
apiKeyparameter onAgentsCoreConfig— sent as aBearertoken in theAuthorizationheader when the LM Studio server requires authentication. Readable fromAGENTS_API_KEYviafromEnvironment(). Masked intoString()output to prevent accidental credential leakage. AgentsCoreConfig.copyWith()supportsclearApiKeyto explicitly remove an API key.
- Optional
-
0.1.025 Mar 2026Release notes
Open source →First feature-complete release of
agents_core.Features
Agent Framework
Agentabstract base class withrun(String task, {FileContext? context})method.SimpleAgent— single-round chat completion agent.ReActAgent— multi-turn Reason + Act loop with tool calling, configurable
maxIterationsandmaxTotalTokensbudget.AgentResult— structured output withoutput,tokensUsed,
toolCallsMade,filesModified, andstoppedReason.
LM Studio Client
LmStudioClient— high-level typed API for LM Studio's OpenAI-compatible
endpoints (chatCompletion,chatCompletionStream,chatCompletionStreamText,
completion,completionStream,listModels).LmStudioHttpClient— HTTP transport with automatic retry and exponential
backoff (maxRetries, configurabledelay).SseParser— Server-Sent Events stream transformer that handles multi-line
data and[DONE]sentinels.
Data Models (OpenAI-compatible)
ChatMessageandChatMessageRoleenum (system,user,assistant,tool).ChatCompletionRequest/ChatCompletionResponse/ChatCompletionChoice.ChatCompletionChunk/ChatCompletionChunkChoice/ChatCompletionDelta
for streaming responses.CompletionRequest/CompletionResponse/CompletionChoice.CompletionUsage— token usage tracking.ToolDefinitionandToolCall/ToolCallFunctionfor function calling.LmModel— model listing response.
Configuration
AgentsCoreConfig— central configuration withlmStudioBaseUrl,
defaultModel,requestTimeout,dockerImage,workspacePath, andlogger.AgentsCoreConfig.fromEnvironment()factory — readsLM_STUDIO_BASE_URL,
AGENTS_DEFAULT_MODEL,AGENTS_DOCKER_IMAGE,AGENTS_WORKSPACE_PATH, and
AGENTS_REQUEST_TIMEOUT_SECONDSfrom environment variables.AgentsCoreConfig.copyWith()for immutable modifications.Loggerabstraction withStderrLoggerandSilentLoggerimplementations.
File Context
FileContext— sandboxed file-system abstraction withread,write,
append,delete,exists, andlistFiles(with glob filtering).- Path traversal protection on all file operations.
- Pre-built tool definitions:
readFileTool,writeFileTool,listFilesTool,
appendFileTool, andcreateHandlers()factory.
Orchestrator
Orchestrator— sequential agent pipeline with sharedFileContext.AgentStep— static or dynamic (AgentStep.dynamic) task prompts with
optionalconditionguards.OrchestratorResult— collectsstepResults,duration, anderrors.OrchestratorErrorPolicy—stop(default) orcontinueOnError.
Docker Integration
DockerClient— run containers, check availability, pull images.DockerRunResult— capturesstdout,stderr, andexitCode.
Python Execution
PythonToolAgent— pre-configuredReActAgentwith Docker-based Python
execution and optional file tools.PythonExecutionTool— tool definition and handler factory for running
Python code in sandboxed Docker containers.
Quick Functions
ask()— one-shot chat completion that manages client lifecycle.askStream()— streaming one-shot chat completion.Conversation— stateful multi-turn wrapper withsend(),sendStream(),
setSystemPrompt(), andclearHistory().
Exception Hierarchy
AgentsCoreException— library base exception.LmStudioHttpException— non-2xx HTTP responses.LmStudioApiException— structured API errors withisModelNotFound,
isContextLengthExceeded, andisRateLimitedhelpers.LmStudioConnectionException— transport failures withsocketError,
httpError,timeout, andfromExceptionfactories.DockerNotAvailableException/DockerExecutionException.FileNotFoundException/PathTraversalException.SseParseException— malformed SSE data.
Full Changelog: https://github.com/davidsdearaujo/agents_core/commits/0.1.0
Release notes
Open source →First feature-complete release of
agents_core.Features
Agent Framework
Agentabstract base class withrun(String task, {FileContext? context})method.SimpleAgent— single-round chat completion agent.ReActAgent— multi-turn Reason + Act loop with tool calling, configurablemaxIterationsandmaxTotalTokensbudget.AgentResult— structured output withoutput,tokensUsed,toolCallsMade,filesModified, andstoppedReason.
LM Studio Client
LmStudioClient— high-level typed API for LM Studio's OpenAI-compatible endpoints (chatCompletion,chatCompletionStream,chatCompletionStreamText,completion,completionStream,listModels).LmStudioHttpClient— HTTP transport with automatic retry and exponential backoff (maxRetries, configurabledelay).SseParser— Server-Sent Events stream transformer that handles multi-line data and[DONE]sentinels.
Data Models (OpenAI-compatible)
ChatMessageandChatMessageRoleenum (system,user,assistant,tool).ChatCompletionRequest/ChatCompletionResponse/ChatCompletionChoice.ChatCompletionChunk/ChatCompletionChunkChoice/ChatCompletionDeltafor streaming responses.CompletionRequest/CompletionResponse/CompletionChoice.CompletionUsage— token usage tracking.ToolDefinitionandToolCall/ToolCallFunctionfor function calling.LmModel— model listing response.
Configuration
AgentsCoreConfig— central configuration withlmStudioBaseUrl,defaultModel,requestTimeout,dockerImage,workspacePath, andlogger.AgentsCoreConfig.fromEnvironment()factory — readsLM_STUDIO_BASE_URL,AGENTS_DEFAULT_MODEL,AGENTS_DOCKER_IMAGE,AGENTS_WORKSPACE_PATH, andAGENTS_REQUEST_TIMEOUT_SECONDSfrom environment variables.AgentsCoreConfig.copyWith()for immutable modifications.Loggerabstraction withStderrLoggerandSilentLoggerimplementations.
File Context
FileContext— sandboxed file-system abstraction withread,write,append,delete,exists, andlistFiles(with glob filtering).- Path traversal protection on all file operations.
- Pre-built tool definitions:
readFileTool,writeFileTool,listFilesTool,appendFileTool, andcreateHandlers()factory.
Orchestrator
Orchestrator— sequential agent pipeline with sharedFileContext.AgentStep— static or dynamic (AgentStep.dynamic) task prompts with optionalconditionguards.OrchestratorResult— collectsstepResults,duration, anderrors.OrchestratorErrorPolicy—stop(default) orcontinueOnError.
Docker Integration
DockerClient— run containers, check availability, pull images.DockerRunResult— capturesstdout,stderr, andexitCode.
Python Execution
PythonToolAgent— pre-configuredReActAgentwith Docker-based Python execution and optional file tools.PythonExecutionTool— tool definition and handler factory for running Python code in sandboxed Docker containers.
Quick Functions
ask()— one-shot chat completion that manages client lifecycle.askStream()— streaming one-shot chat completion.Conversation— stateful multi-turn wrapper withsend(),sendStream(),setSystemPrompt(), andclearHistory().
Exception Hierarchy
AgentsCoreException— library base exception.LmStudioHttpException— non-2xx HTTP responses.LmStudioApiException— structured API errors withisModelNotFound,isContextLengthExceeded, andisRateLimitedhelpers.LmStudioConnectionException— transport failures withsocketError,httpError,timeout, andfromExceptionfactories.DockerNotAvailableException/DockerExecutionException.FileNotFoundException/PathTraversalException.SseParseException— malformed SSE data.
-
0.0.125 Mar 2026