Metadata-Version: 2.4 Name: agent-learning Version: 0.7.0 Summary: Evidence-driven decision learning for AI agents with inspectable autonomy gates. Author: Chris Tava License: MIT License Copyright (c) 2026 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Project-URL: Homepage, https://github.com/microsoft/agent-learning Project-URL: Repository, https://github.com/microsoft/agent-learning Project-URL: Issues, https://github.com/microsoft/agent-learning/issues Keywords: agentic-decision-making,reinforcement-learning,ai-agents,azure,evaluation Classifier: Development Status :: 4 - Beta Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence Requires-Python: >=3.10 Description-Content-Type: text/markdown License-File: LICENSE Requires-Dist: numpy>=1.24 Requires-Dist: azure-identity>=1.15 Requires-Dist: azure-ai-evaluation>=1.0.0 Requires-Dist: pydantic>=2.0 Provides-Extra: dev Requires-Dist: pytest>=7.4; extra == "dev" Requires-Dist: pytest-asyncio>=0.21; extra == "dev" Requires-Dist: pytest-cov>=4.1; extra == "dev" Requires-Dist: ruff>=0.1; extra == "dev" Requires-Dist: mypy>=1.6; extra == "dev" Provides-Extra: cosmos Requires-Dist: azure-cosmos>=4.5; extra == "cosmos" Provides-Extra: nlp Requires-Dist: scikit-learn>=1.3; extra == "nlp" Requires-Dist: scipy>=1.10; extra == "nlp" Requires-Dist: joblib>=1.3; extra == "nlp" Provides-Extra: examples Requires-Dist: pyyaml>=6.0; extra == "examples" Provides-Extra: slm Requires-Dist: onnxruntime-genai>=0.5; extra == "slm" Provides-Extra: llm Requires-Dist: azure-ai-evaluation>=1.0.0; extra == "llm" Requires-Dist: azure-identity>=1.15; extra == "llm" Dynamic: license-file # agent-learning Native reinforcement learning SDK for AI agents. An in-process Learner optimizes a small, interpretable TaskPolicy over discrete agent choices (understand intent and complete task by choosing the right outcome). TaskPolicies model reusable decisions among executable alternatives such as models, skills, tools, workflows, or workloads. Factual questions, ordinary chat, reporting, and learning automation are not policy tasks. ## How it works The SDK improves agents without LLM weight fine-tuning. There are no GPU fine-tune jobs and no opaque update cycles — just three pieces that run in your existing Python process: 1. **TaskPolicy** is a softmax distribution over `N` discrete actions (e.g., "take action A", "take action B", "take action C"). It lives in Python and updates in milliseconds. 2. **Score** evaluates each episode on-device with three stdlib scorers for intent resolution, task adherence, and task completion. Their scores are combined into a single scalar reward with no scoring endpoint or environment variables required. Azure AI evaluators remain available as an opt-in. 3. **Learner** applies REINFORCE-with-baseline to update TaskPolicy logits directly from logged episodes. Updates are tiny gradient steps that run on local compute and persist through a pluggable store — in-memory or local files by default, with Azure Cosmos DB optional. `task-policy-decide` closes the loop at execution time by returning the selected action plus historical correctness, reward, result summaries, and per-metric quality feedback for the agent to use on its next delegated decision. It also returns a complexity-proportional autonomy assessment. A persisted profile covers intent ambiguity, context variability, outcome observability, decision impact, reversibility, and mandatory approval; action-space size is derived. The resulting low, standard, high, or critical tier scales required outcomes, Wilson confidence, reward, probability, margin, stable snapshots, and drift-audit rate. Autonomous executions continue learning from observable outcomes, while tier-scaled samples request user feedback to detect drift. An explicit accepted-feedback episode is a separate durable authorization path: it pins that action for the task policy and suppresses future feedback prompts until the user explicitly rejects it. Every episode, reward, run, and deployment is captured by the configured store — in-memory or local files by default, or Azure Cosmos DB — giving you a complete lineage and audit trail of how the policy evolved over time.