Full Fledged Support Agent
Build an end-to-end support agent with helper-first memory, compaction-safe context, coordination, and reinforcement.
This page shows one complete support-agent shape per SDK using the current recommended Mubit flow:
- register the agents involved
- store facts, traces, and preferences
- assemble context before responding
- checkpoint before compaction or risky transitions
- coordinate specialist review with handoff and feedback
- reflect and record outcomes so future cases improve
Environment
MUBIT_API_KEY="mbt_<instance>_<key_id>_<secret>"
MUBIT_ENDPOINT="https://api.mubit.ai"Full implementation
A freshly reflected lesson may enter long-term memory as a pending candidate (the validation gate is on by default, accept threshold 0.6) and is not immediately surfaced until enough evidence accrues. The outcomes you record against it are exactly how it accrues that evidence and gets promoted to active — the control stream emits context.lesson_validation_passed / context.lesson_validation_failed alongside context.lesson_promoted. Operators can disable the gate with MUBIT_CONTROL_LESSON_VALIDATION_ENABLED=0.
The answer was grounded on more than the lesson alone, so attribute the win to every recalled entry that informed it. client.outcomes.record accepts unit_ids (a list of the recalled entry ids — e.g. the customer fact and the billing trace) so each one's reinforcement counters update, not just the lesson reference_id (which is never double-counted). The Rust RecordOutcomeOptions field is entry_ids.
Operational notes
- Start with the
Clientnamespaces and drop toclient.raw.invoke(op, payload)only for operations that have no namespace method yet. mubit.init(instrument=True)ormubit.wrap_openai(...)feeds Python LLM traces into this same memory loop automatically; see LLM providers.
Next steps
- Read the route contract at Control HTTP reference.
- Use the narrower examples at Support agent memory loop and Multi-agent shared state.