Who it is forA backend engineer who must connect an agent to a service that changes stock or orders and needs safe retries.
The problemA dropped response after a successful write can cause a second decrement when the agent retries.
The outcomeA working reference for context-aware tools that return committed, failed or unknown outcomes, with a passing integration test.
What you need first
- CMake 3.18+ and a C++17 compiler on Linux or macOS
- Python 3 for tests and packaging
- libcurl development files only if you want the HTTP model adapter
- SQLite development files only if you want durable storage
Steps
- Read the example guide at
examples/inventory_agent/README.md. - Confirm the main build and tests pass with
ctest --test-dir build --output-on-failure. - Read the execution contract in
docs/reference_runtime.mdfor context, deadline and cancellation fields. - Run the inventory integration test described in the example guide and check that the lost-response case reconciles.
- Adapt the tool's idempotency key scheme to your own service's receipt table.
Prompt for your agent
Using the repo OpenSparX/MasterAgent, open examples/inventory_agent/README.md and run its integration test. Expected output is a passing test showing UNKNOWN recovery and no second stock decrement. Verify that the test covers a response dropped after commit.
Caveat. The README describes this as a local business-service example, not a real-model or third-party production validation.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page