Memories with positive effectiveness scores consistently improve task performance. By voting on memories, agents learn what strategies actually work.
Copy
from aegis_memory import AegisClientclient = AegisClient(api_key="...")# After successfully using a strategyclient.vote( memory_id=strategy.id, vote="helpful", voter_agent_id="executor", context="Successfully paginated through all API results", task_id="task-12345")# After a strategy caused an errorclient.vote( memory_id=strategy.id, vote="harmful", voter_agent_id="executor", context="Caused infinite loop - range(10) wasn't enough pages", task_id="task-12345")
Prevent premature victory with explicit verification.
Copy
# Initialize features at project startclient.features.create( feature_id="new-chat", description="User can create a new chat and receive AI response", test_steps=[ "Navigate to main interface", "Click 'New Chat' button", "Verify new conversation created", "Type message and press Enter", "Verify AI response appears" ])# Only mark complete after verificationasync def verify_and_complete(feature_id: str): feature = client.features.get(feature_id) for step in feature.test_steps: result = await run_test_step(step) if not result.passed: client.features.mark_failed(feature_id, reason=f"Failed: {step}") return False client.features.mark_complete(feature_id, verified_by="qa-agent") return True
Without run tracking, there’s no feedback loop. Memories get voted on manually (if at all), and agents keep making the same mistakes. Run tracking closes the loop automatically: memories used in successful runs get reinforced, and failures generate reflections.
Copy
from aegis_memory import AegisClientclient = AegisClient(api_key="...")# 1. Query playbook before startingplaybook = client.get_playbook_for_agent( "executor", query="API pagination task", task_type="api-integration",)memory_ids = [e.id for e in playbook.entries]# 2. Start tracking the runrun = client.start_run( run_id="task-42", agent_id="executor", task_type="api-integration", memory_ids_used=memory_ids,)# 3. Execute the task...# (agent does its work here)# 4. Complete the run with outcomeresult = client.complete_run( "task-42", success=True, evaluation={"score": 0.95, "pages_fetched": 150},)# Auto-votes 'helpful' on all memory_ids_used!# On failure:result = client.complete_run( "task-42", success=False, evaluation={"error": "Timeout after 30s", "error_pattern": "timeout"},)# Auto-votes 'harmful' AND creates a reflection memory!