Inspiration
Most AI agents make the same mistakes every time they run. They may use a tool incorrectly, miss important information, or follow the wrong process, but they do not remember these mistakes.
I built Astra to explore a simple idea: what if an agent could learn from every attempt and become better at using unfamiliar tools?
What it does
Astra is a self-improving, tool-agnostic AI agent.
You give Astra:
- A task
- A set of MCP tools
- A way to check the result
Astra then completes the task, receives a score, studies what went wrong, and saves what it learned.
It remembers:
- Useful facts found in tool data
- Correct ways to use each tool
- Step-by-step skills
- Mistakes from previous runs
- Improvements to its instructions
Astra uses this memory during its next attempt.
It also tests its own learning. If a new instruction makes the next result worse, Astra removes that instruction and returns to the previous version.
How I built it
I built Astra in Python using a repeating learning loop:
- Discover the available tools
- Attempt the task
- Grade the result
- Read the complete tool trace
- Reflect on mistakes
- Save useful knowledge
- Use that knowledge in the next run
- Keep or revert the new learning based on its score
Astra’s main code does not contain CRM-specific or issue-tracker-specific rules. It discovers those rules by reading data and using the available tools.
Every run records its score, tool calls, errors, cost, time, reflection, and learning decisions. A visual scoreboard displays these results.
What I tested
I tested Astra on two different tool environments using Gemini 2.5 Flash and MCP over stdio.
CRM test
Astra had to find open sales deals that were at risk and report the correct owner.
It learned how to:
- Retrieve all pages of deals
- Understand which stages are open
- Read notes for hidden risk signals
- Resolve owner IDs into names
- Report inactive owners as
UNASSIGNED
Its quality improved from 0.500 to 1.000.
Issue-tracker test
Astra had to label open issues by severity and assign them to the correct team members.
It learned how to:
- Select the correct severity label
- Match the module in an issue title to its owner
- Check comments before marking an issue as a duplicate
- Avoid assigning duplicate issues
Its quality improved from 0.489 to 1.000.
Every attempt used a new data snapshot with different records and IDs. This meant Astra could not memorize the answers. It had to learn rules that worked on new data.
How I used AO
I used Agent Orchestrator as both a development and execution environment.
AO helped organize work across Astra’s runtime, MCP integration, evaluation system, tests, scoreboard, and documentation.
I also ran a real learning series through AO worker astra-25. The same worker received four tasks one after another, allowing every run to use memory from the previous run.
The AO-managed score improved:
0.000 → 0.167 → 0.725 → 0.750
The number of learned facts grew from 5 to 16.
After every AO run, Astra verified that the trace, reflection, memory, results, and scoreboard were committed and pushed to GitHub before continuing.
The verified AO artifacts are available on the learn/astra-ao-demo branch.
Challenges I faced
The biggest challenge was preventing Astra from learning incorrect rules.
An AI reflection can sound reasonable while still being wrong. I solved this with a keep-or-revert system. Astra tests proposed learning on new data and removes it when the score becomes worse.
Other challenges included:
- Preventing repeated tool calls
- Correctly managing MCP processes
- Keeping memory safe during concurrent runs
- Measuring cost and latency
- Handling API and certificate errors
- Verifying that AO workers pushed complete results
Accomplishments
I am proud that Astra:
- Reached a perfect score on two different tool environments
- Completed 10 real-model learning runs
- Made 181 recorded tool calls
- Learned 27 semantic facts
- Detected and reverted harmful changes
- Produced an auditable trace and reflection for every run
- Ran sequential learning iterations through AO
- Passed all 14 automated regression tests
What I learned
I learned that agent memory is only useful when it is connected to evaluation.
Simply saving every AI reflection can make an agent worse. A reliable learning system must measure results, test new knowledge, and remove incorrect lessons.
I also learned that better accuracy can require more tool calls. Astra records accuracy, cost, speed, and reliability together so this tradeoff is visible.
What’s next
Next, I want to connect Astra to more real business tools, add human approval for sensitive actions, improve long-term skill promotion, and create a hosted dashboard for monitoring learning in production.
Log in or sign up for Devpost to join the conversation.