Metadata-Version: 2.4
Name: reflex-agent-client
Version: 0.1.0
Summary: Python client for the Reflex sidecar (`reflex serve`).
Author: Saksham Sharma
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/1sakshm/reflex
Project-URL: Issues, https://github.com/1sakshm/reflex/issues
Keywords: ai,agents,llm,routing,system-1,reflex
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# reflex-agent-client

Python client for the [Reflex](https://github.com/1sakshm/reflex) sidecar (`npx @reflex-ai/cli serve`). Zero dependencies, and fails open: if the sidecar is unavailable, decisions come back as `escalate`.

```python
from reflex_agent import Reflex, action

reflex = Reflex(workload="my-agent")   # REFLEX_URL defaults to http://127.0.0.1:7070
d = reflex.decide("next_action", {"lastAction": "run_tests", "lastObservation": {"status": "error"}},
                  [action("read_file", "tool", "safe"), action("frontier", "model", "cheap", reasoning=True)], task_id="t1")
if d["type"] == "auto":
    run(d["action"])
else:
    reflex.observe(d["id"], ask_frontier(d["hints"]))
reflex.task_outcome("t1", success=True)
```
