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:
-
TaskPolicy is a softmax distribution over
Ndiscrete actions (e.g., "take action A", "take action B", "take action C"). It lives in Python and updates in milliseconds. -
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.
-
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 an evidence-gated autonomy assessment. Routine confirmation stops only after the recommended action has enough scored outcomes, a 95% Wilson correctness lower bound of at least 90%, positive mean reward, strong probability and margin, and the same winner across three trained snapshots. Autonomous executions continue learning from observable outcomes, while a configurable sample requests user feedback to detect drift.
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_learning-0.6.0.tar.gz.
File metadata
- Download URL: agent_learning-0.6.0.tar.gz
- Upload date:
- Size: 104.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e98a4e3ce7e43d0587fe69db279ebf708da3d592d32be5366fddf050001953c7
|
|
| MD5 |
dd0c0215482273cfa42c5dce2f05987f
|
|
| BLAKE2b-256 |
d4b39d0188beecea40724dc16789229bbb8d823d4a044f309822b451eed9adf7
|
Provenance
The following attestation bundles were made for agent_learning-0.6.0.tar.gz:
Publisher:
publish.yaml on microsoft/agent-learning
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_learning-0.6.0.tar.gz -
Subject digest:
e98a4e3ce7e43d0587fe69db279ebf708da3d592d32be5366fddf050001953c7 - Sigstore transparency entry: 2400804224
- Sigstore integration time:
-
Permalink:
microsoft/agent-learning@1f239fbcf7f8529432588a49e21a8649297bc8b1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/microsoft
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@1f239fbcf7f8529432588a49e21a8649297bc8b1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agent_learning-0.6.0-py3-none-any.whl.
File metadata
- Download URL: agent_learning-0.6.0-py3-none-any.whl
- Upload date:
- Size: 106.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f21c8500ff64d58869bc7c2e18ed775f44a0caaf700d4f9281acf5e91fdfe97
|
|
| MD5 |
c3955f8da7df4e1b1c40dc79dc1da9dc
|
|
| BLAKE2b-256 |
92779704db5bb50ae96585e014c1b5e663c1f24a74d5484afcef76a1be8bde5c
|
Provenance
The following attestation bundles were made for agent_learning-0.6.0-py3-none-any.whl:
Publisher:
publish.yaml on microsoft/agent-learning
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_learning-0.6.0-py3-none-any.whl -
Subject digest:
1f21c8500ff64d58869bc7c2e18ed775f44a0caaf700d4f9281acf5e91fdfe97 - Sigstore transparency entry: 2400804520
- Sigstore integration time:
-
Permalink:
microsoft/agent-learning@1f239fbcf7f8529432588a49e21a8649297bc8b1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/microsoft
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@1f239fbcf7f8529432588a49e21a8649297bc8b1 -
Trigger Event:
push
-
Statement type: