+ );
+}
+```
+
+## Saving Credentials During Programmatic Flow
+
+You can save credentials during the invocation for future automated re-auth:
+
+```typescript
+const invocation = await kernel.agents.auth.invocations.create({
+ auth_agent_id: agent.id,
+ save_credential_as: 'my-login-creds', // Credentials will be saved
+});
+
+// ... complete the programmatic flow ...
+// Credentials are automatically saved when login succeeds
+```
+
+