agentic-sidecar 0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ """agentic-sidecar: a companion intelligence and real-time decision
2
+ supervision layer for autonomous AI agents.
3
+
4
+ The Main Agent acts. The Sidecar observes, thinks, advises, and governs.
5
+
6
+ This package is currently a **scaffold** -- directory layout, tooling, and
7
+ CI/release workflows exist, but nothing under `agentic_sidecar` is
8
+ implemented yet. See ROADMAP.md for the build order, starting with a
9
+ rule-based, LLM-free v0.1 Decision Gate, and README.md for the architecture
10
+ and planned Python API.
11
+ """
12
+
13
+ __version__ = "0.0.1"
14
+
15
+ __all__ = ["__version__"]
@@ -0,0 +1,8 @@
1
+ """Framework adapters -- the `before_tool_call` / decision-boundary
2
+ interception point for each supported agent framework.
3
+
4
+ `langgraph.py` is the only adapter planned for v0.1. Do not start a second
5
+ adapter before it is done and stable -- the interception abstraction needs
6
+ to survive contact with one real framework first (ROADMAP.md's Design
7
+ Constraint 1). The other four are placeholders for v0.6.
8
+ """
@@ -0,0 +1,7 @@
1
+ """AutoGen interception adapter.
2
+
3
+ Not started until `adapters/langgraph.py` (v0.1) is done and stable --
4
+ see ROADMAP.md's Design Constraint 1.
5
+
6
+ Planned for v0.6 -- see ROADMAP.md. Not implemented yet.
7
+ """
@@ -0,0 +1,7 @@
1
+ """CrewAI interception adapter.
2
+
3
+ Not started until `adapters/langgraph.py` (v0.1) is done and stable --
4
+ see ROADMAP.md's Design Constraint 1.
5
+
6
+ Planned for v0.6 -- see ROADMAP.md. Not implemented yet.
7
+ """
@@ -0,0 +1,7 @@
1
+ """Google Agent Development Kit (ADK) interception adapter.
2
+
3
+ Not started until `adapters/langgraph.py` (v0.1) is done and stable --
4
+ see ROADMAP.md's Design Constraint 1.
5
+
6
+ Planned for v0.6 -- see ROADMAP.md. Not implemented yet.
7
+ """
@@ -0,0 +1,7 @@
1
+ """LangGraph interception adapter -- the first and, until it's proven out,
2
+ only decision-boundary hook. LangGraph was chosen as the starting framework
3
+ because its explicit graph/node structure gives `before_tool_call`-style
4
+ interception the clearest place to attach.
5
+
6
+ Planned for v0.1 -- see ROADMAP.md. Not implemented yet.
7
+ """
@@ -0,0 +1,7 @@
1
+ """OpenAI Agents SDK interception adapter.
2
+
3
+ Not started until `adapters/langgraph.py` (v0.1) is done and stable --
4
+ see ROADMAP.md's Design Constraint 1.
5
+
6
+ Planned for v0.6 -- see ROADMAP.md. Not implemented yet.
7
+ """
@@ -0,0 +1,7 @@
1
+ """CLI entry point.
2
+
3
+ `[project.scripts]` in pyproject.toml intentionally does not point here yet
4
+ -- add it once `main.py` has a real Typer `app`.
5
+
6
+ Planned for v0.5 -- see ROADMAP.md. Not implemented yet.
7
+ """
@@ -0,0 +1,5 @@
1
+ """`agentic-sidecar status --follow` -- live status stream backed by
2
+ `status/narrate.py`.
3
+
4
+ Planned for v0.5 -- see ROADMAP.md. Not implemented yet.
5
+ """
@@ -0,0 +1,5 @@
1
+ """Sidecar runtime: attach() an existing agent, intercept decision
2
+ boundaries, and produce Decision objects.
3
+
4
+ Planned for v0.1 -- see ROADMAP.md. Not implemented yet.
5
+ """
@@ -0,0 +1,6 @@
1
+ """`DecisionContext` -- what gets passed to every evaluator (Policy, Risk,
2
+ Intent, Critic, Judge) at a decision boundary: the proposed tool call, the
3
+ active IntentEnvelope, accumulated execution history, and risk metadata.
4
+
5
+ Planned for v0.1 -- see ROADMAP.md. Not implemented yet.
6
+ """
@@ -0,0 +1,9 @@
1
+ """`Decision(status, risk, reason, ...)` -- the Decision Gate's output type.
2
+
3
+ v0.1 ships `status in {"ALLOW", "BLOCK"}` only. The full outcome set
4
+ (`ALLOW`, `WARN`, `REPLAN`, `PAUSE`, `BLOCK`, `ESCALATE`) lands in v0.4 --
5
+ see README.md's "How the Decision Gate evaluates a decision" and
6
+ ROADMAP.md's build order.
7
+
8
+ Planned for v0.1 -- see ROADMAP.md. Not implemented yet.
9
+ """
@@ -0,0 +1,9 @@
1
+ """The `Sidecar` class -- `Sidecar(roles=[...])` and `sidecar.attach(agent)`.
2
+
3
+ Owns module configuration (which of Policy/Risk/Intent/Critic/Judge/Budget
4
+ are enabled) and the required `on_sidecar_failure` setting (`fail_open` /
5
+ `fail_closed`, no default -- see README.md and ROADMAP.md's Design
6
+ Constraints).
7
+
8
+ Planned for v0.1 -- see ROADMAP.md. Not implemented yet.
9
+ """
@@ -0,0 +1,14 @@
1
+ """Planner, Critic, and Judge -- independent evaluation of a proposed plan
2
+ or decision.
3
+
4
+ Unlike `gate/` (Policy, Risk), these modules may call an LLM, and it should
5
+ never be the same model/provider as the Main Agent by default (see
6
+ README.md § Sidecar modules -- model independence). All three stay optional
7
+ and off by default (`judge.enabled: false`) given the cost/latency
8
+ tradeoff.
9
+
10
+ Planner evaluates the whole plan; Critic challenges one decision at a time;
11
+ Judge is the pluggable model-agnostic scoring interface both can call into.
12
+
13
+ Planned for v0.3 -- see ROADMAP.md. Not implemented yet.
14
+ """
@@ -0,0 +1,6 @@
1
+ """Critic mode -- challenges a proposed decision before it executes: looks
2
+ for unsupported assumptions, unnecessary actions, contradictions, and
3
+ alternative approaches.
4
+
5
+ Planned for v0.3 -- see ROADMAP.md. Not implemented yet.
6
+ """
@@ -0,0 +1,9 @@
1
+ """Model-agnostic LLM Judge interface.
2
+
3
+ Main Agent model and Sidecar Judge model must be independently swappable --
4
+ at least two provider backends should exist to prove this isn't just a
5
+ wrapper around whichever SDK is imported first (README.md § Sidecar
6
+ modules, "model independence").
7
+
8
+ Planned for v0.3 -- see ROADMAP.md. Not implemented yet.
9
+ """
@@ -0,0 +1,17 @@
1
+ """Planner -- independently evaluates the Main Agent's *plan*, before
2
+ individual decisions within it reach the Decision Gate.
3
+
4
+ Distinct from Critic (critic.py), which challenges a single proposed
5
+ decision right before it executes: Planner looks at the whole multi-step
6
+ plan against the active IntentEnvelope and flags steps that exceed what
7
+ was actually asked for (e.g. the user requested an explanation, the plan
8
+ includes a cancellation and a refund -- see the DEV/production-cleanup and
9
+ "explain my charge" examples this mirrors). Its output feeds the
10
+ `CHALLENGE` / `REPLAN` Decision Gate outcomes the same way Critic's does.
11
+
12
+ Planned for v0.3, alongside Critic and Judge -- like both, it requires real
13
+ reasoning rather than a deterministic check, so it doesn't ship until v0.1/
14
+ v0.2's LLM-free phase is done (see ROADMAP.md's Design Constraint 2).
15
+
16
+ Not implemented yet.
17
+ """
@@ -0,0 +1,12 @@
1
+ """The Decision Gate: Policy Advisor, Risk Evaluator, and Budget Guardian.
2
+
3
+ Answers "are you permitted to do this?" (policy.py) and "how dangerous is
4
+ this action?" (risk.py) -- deliberately separate from `intent/`, which
5
+ answers the harder question "is this actually what the human asked you to
6
+ accomplish?" See README.md's "How the Decision Gate evaluates a decision"
7
+ and ROADMAP.md's Design Constraint 5 before adding a check here that's
8
+ really an intent question.
9
+
10
+ `policy.py` and `risk.py` are planned for v0.1 (rule-based, zero LLM calls).
11
+ `budget.py` is planned for v0.4. Not implemented yet.
12
+ """
@@ -0,0 +1,5 @@
1
+ """Budget Guardian -- cost/token ceilings enforced per task, through the same
2
+ Decision Gate as Policy and Risk rather than a side channel.
3
+
4
+ Planned for v0.4 -- see ROADMAP.md. Not implemented yet.
5
+ """
@@ -0,0 +1,8 @@
1
+ """Policy Advisor -- deterministic, YAML-driven allow/deny rules.
2
+
3
+ Answers "are you permitted to do this?" only. No LLM calls, no intent
4
+ awareness -- that's `intent/` and `evaluators/`, deliberately kept separate
5
+ (see ROADMAP.md's Design Constraint 5).
6
+
7
+ Planned for v0.1 -- see ROADMAP.md. Not implemented yet.
8
+ """
@@ -0,0 +1,9 @@
1
+ """Risk Evaluator -- classifies a proposed action's risk level.
2
+
3
+ v0.1-v0.2: static rules only (tool name, argument pattern, destination).
4
+ Promote to an optional small local model only once there's measured
5
+ evidence the rule-based version is the bottleneck (ROADMAP.md's Design
6
+ Constraint 4 -- a risk classifier is not a free lunch).
7
+
8
+ Planned for v0.1 -- see ROADMAP.md. Not implemented yet.
9
+ """
@@ -0,0 +1,13 @@
1
+ """Optional adapters to sibling DeepAgentLabs projects.
2
+
3
+ Nothing in `agentic_sidecar`'s core ever imports this package -- each module
4
+ here is its own opt-in extra (`pip install agentic-sidecar[agenticlens]` /
5
+ `[agentic-chaos]`) and must degrade gracefully (auto-skip in tests) when the
6
+ target package isn't installed.
7
+
8
+ - `agenticlens.py` -- one-way export: Sidecar decisions -> AgenticLens Workflow.
9
+ - `agentic_chaos.py` -- two-way, same-run coordination for recovery-decision
10
+ evaluation and chaos-testing the Sidecar's own gate.
11
+
12
+ Both are placeholders; neither has real code yet.
13
+ """
@@ -0,0 +1,26 @@
1
+ """Optional Agentic Chaos coordination.
2
+
3
+ Unlike the AgenticLens adapter (a one-way export after the fact, merging a
4
+ completed Sidecar session onto a `Workflow`), this is a two-way, same-run
5
+ relationship: Agentic Chaos and the Sidecar both attach to the *same* agent
6
+ invocation. Agentic Chaos injects a fault; the Sidecar's Decision Gate
7
+ evaluates the agent's recovery attempt through its normal Policy/Risk/Intent
8
+ checks, answering not just "did it recover?" but "was the recovery decision
9
+ itself appropriate?".
10
+
11
+ Also relevant in the other direction: chaos-testing the Sidecar's own gate
12
+ by injecting a fault into the Sidecar's evaluation path itself, to verify
13
+ `on_sidecar_failure` (`fail_open` / `fail_closed`) behaves as configured
14
+ when the Sidecar times out or errors.
15
+
16
+ The concrete integration surface -- what this module reads from an active
17
+ chaos session, what it reports back, and whether that needs a shared schema
18
+ the way the AgenticLens adapter does -- isn't designed yet. See
19
+ ROADMAP.md's Cross-Project Dependencies (`agentic-chaos`: "Coordinate
20
+ with").
21
+
22
+ Not core-dependency: `agentic_sidecar`'s runtime never imports this module
23
+ on its own. Requires `pip install agentic-sidecar[agentic-chaos]`.
24
+
25
+ Not yet scheduled to a specific ROADMAP version. Not implemented yet.
26
+ """
@@ -0,0 +1,14 @@
1
+ """Optional AgenticLens adapter -- surfaces Sidecar Decision events
2
+ (allow/warn/replan/block, intent-alignment score) as AgenticLens `Workflow`
3
+ step data, so `agenticlens analyze` can report on them alongside cost and
4
+ latency. Expected shape: an `attach_events()` / `step_kwargs()`-style pair --
5
+ one call to merge a completed Sidecar session onto a `Workflow`, one helper
6
+ to pass Sidecar's own step correlation IDs through cleanly.
7
+
8
+ Not core-dependency: `agentic_sidecar`'s runtime never imports this module
9
+ on its own. Requires `pip install agentic-sidecar[agenticlens]`.
10
+
11
+ Not yet scheduled to a specific ROADMAP version -- see ROADMAP.md's
12
+ Cross-Project Dependencies (`agenticlens`: "Validate in"). Not implemented
13
+ yet.
14
+ """
@@ -0,0 +1,11 @@
1
+ """Intent Guardian -- structured IntentEnvelope, intent injection at decision
2
+ boundaries, drift detection, and constraint validation.
3
+
4
+ Answers "is this actually what the human asked you to accomplish?" -- the
5
+ project's actual differentiator (see README.md's "How the Decision Gate
6
+ evaluates a decision"). Keep this module's checks semantic, not a
7
+ permission list in disguise; static allow/deny checks belong in
8
+ `gate/policy.py` instead (ROADMAP.md's Design Constraint 5).
9
+
10
+ Planned for v0.2 -- see ROADMAP.md. Not implemented yet.
11
+ """
@@ -0,0 +1,10 @@
1
+ """Intent-drift detection and constraint validation -- is the current
2
+ proposed action still consistent with the active IntentEnvelope's goal,
3
+ constraints, and granted authority?
4
+
5
+ Deterministic where possible (e.g. `proposed_refund > envelope.constraints.maximum_refund`)
6
+ so this stays checkable without an LLM -- see the v0.2.x Early Validation
7
+ Benchmark in ROADMAP.md, which measures exactly this module's catch rate.
8
+
9
+ Planned for v0.2 -- see ROADMAP.md. Not implemented yet.
10
+ """
@@ -0,0 +1,10 @@
1
+ """`IntentEnvelope` -- goal, requester, constraints, granted/denied
2
+ authority, and expiry (see README.md § Sidecar modules for the YAML shape).
3
+
4
+ When this is actually designed, account for the v1.0 target of publishing
5
+ it as a cross-project interoperability schema (README.md's "Long-term: an
6
+ intent propagation layer") -- e.g. a `parent_intent_id` for delegation
7
+ chains -- even though nothing consumes that field until v1.0.
8
+
9
+ Planned for v0.2 -- see ROADMAP.md. Not implemented yet.
10
+ """
@@ -0,0 +1,5 @@
1
+ """Status Interpreter -- translates raw tool/MCP traces into human-readable
2
+ live narration (e.g. "Looking up your order" instead of `GET /orders/182`).
3
+
4
+ Planned for v0.5 -- see ROADMAP.md. Not implemented yet.
5
+ """
@@ -0,0 +1,6 @@
1
+ """Narration rendering -- raw execution event in, human-readable status line
2
+ out. Backs the `agentic-sidecar status --follow` CLI (cli/main.py, also
3
+ v0.5).
4
+
5
+ Planned for v0.5 -- see ROADMAP.md. Not implemented yet.
6
+ """
@@ -0,0 +1,466 @@
1
+ Metadata-Version: 2.5
2
+ Name: agentic-sidecar
3
+ Version: 0.0.1
4
+ Summary: Companion intelligence and real-time decision supervision for autonomous AI agents.
5
+ Project-URL: Homepage, https://github.com/DeepAgentLabs/agentic-sidecar
6
+ Project-URL: Repository, https://github.com/DeepAgentLabs/agentic-sidecar
7
+ Project-URL: Issues, https://github.com/DeepAgentLabs/agentic-sidecar/issues
8
+ Project-URL: Changelog, https://github.com/DeepAgentLabs/agentic-sidecar/blob/main/CHANGELOG.md
9
+ Author: agentic-sidecar Contributors
10
+ License: MIT License
11
+
12
+ Copyright (c) 2026 pramodbn27
13
+
14
+ Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ of this software and associated documentation files (the "Software"), to deal
16
+ in the Software without restriction, including without limitation the rights
17
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+ copies of the Software, and to permit persons to whom the Software is
19
+ furnished to do so, subject to the following conditions:
20
+
21
+ The above copyright notice and this permission notice shall be included in all
22
+ copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
+ SOFTWARE.
31
+ License-File: LICENSE
32
+ Keywords: agents,decision-supervision,governance,intent,llm,safety
33
+ Classifier: Development Status :: 2 - Pre-Alpha
34
+ Classifier: Intended Audience :: Developers
35
+ Classifier: License :: OSI Approved :: MIT License
36
+ Classifier: Programming Language :: Python :: 3.10
37
+ Classifier: Programming Language :: Python :: 3.11
38
+ Classifier: Programming Language :: Python :: 3.12
39
+ Classifier: Programming Language :: Python :: 3.13
40
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
41
+ Requires-Python: >=3.10
42
+ Requires-Dist: pydantic<3,>=2.0
43
+ Provides-Extra: agentic-chaos
44
+ Requires-Dist: agentic-chaos>=0.1; extra == 'agentic-chaos'
45
+ Provides-Extra: agenticlens
46
+ Requires-Dist: agenticlens>=0.1.3; extra == 'agenticlens'
47
+ Provides-Extra: dev
48
+ Requires-Dist: build>=1.2; extra == 'dev'
49
+ Requires-Dist: mypy>=1.10; extra == 'dev'
50
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
51
+ Requires-Dist: pytest>=8.0; extra == 'dev'
52
+ Requires-Dist: ruff>=0.6; extra == 'dev'
53
+ Requires-Dist: twine>=5.1; extra == 'dev'
54
+ Description-Content-Type: text/markdown
55
+
56
+ # agentic-sidecar
57
+
58
+ **A companion intelligence and real-time supervision layer for autonomous AI agents.**
59
+
60
+ > The Main Agent acts. The Sidecar observes, thinks, advises, and governs.
61
+
62
+ ## Status
63
+
64
+ **Concept / pre-implementation.** This repository currently contains the
65
+ architecture proposal ([`concept.md`](concept.md)) and this README
66
+ — no package code, no PyPI release, no CI yet. See
67
+ [ROADMAP.md](ROADMAP.md) for the build plan, starting with a narrow,
68
+ LLM-free v0.1.
69
+
70
+ ## Contents
71
+
72
+ - [Why](#why)
73
+ - [What it is not](#what-it-is-not)
74
+ - [Architecture](#architecture)
75
+ - [Sidecar vs. Agent Harness](#sidecar-vs-agent-harness)
76
+ - [Main Agent vs. Sidecar](#main-agent-vs-sidecar)
77
+ - [How the Decision Gate evaluates a decision](#how-the-decision-gate-evaluates-a-decision)
78
+ - [Sidecar modules](#sidecar-modules)
79
+ - [Planned Python API](#planned-python-api)
80
+ - [Operating modes](#operating-modes)
81
+ - [Long-term: an intent propagation layer](#long-term-an-intent-propagation-layer)
82
+ - [The DeepAgentLabs ecosystem](#the-deepagentlabs-ecosystem)
83
+ - [Roadmap](#roadmap)
84
+ - [License](#license)
85
+
86
+ ## Why
87
+
88
+ Autonomous agents chain a lot of reasoning and tool calls between a user's
89
+ request and a real-world effect:
90
+
91
+ ```text
92
+ User → Agent → Planning → Sub-Agent → MCP → Tool → API → External System
93
+ ```
94
+
95
+ Three things go wrong in that chain that permission checks alone don't catch:
96
+
97
+ - **Intent drift** — "investigate why production is slow" quietly becomes
98
+ "restart the production database." Nobody revoked authority; the agent's
99
+ plan just wandered.
100
+ - **Technically-allowed, contextually-wrong actions** — `refund_customer()`
101
+ is a permitted tool call. Refunding $850 against a $500 authorization is
102
+ not a permitted *decision*, even though the tool call succeeds.
103
+ - **No live visibility** — long-running agents act for minutes at a time
104
+ with no answer to "what is it doing right now, and can I stop it?"
105
+
106
+ `agentic-sidecar` is designed to attach to any agent framework, but the first
107
+ release proves that against one framework only — LangGraph — before claiming
108
+ the rest (see [Design Constraints](ROADMAP.md#design-constraints-read-before-building-v01)
109
+ in ROADMAP.md). Either way, it answers a different question than permission
110
+ checks or observability tools do:
111
+
112
+ > **Not** "can this agent call this tool?" — **"should it, right now, given
113
+ > what the user actually asked for?"**
114
+
115
+ ## What it is not
116
+
117
+ - **Not a multi-agent framework.** The Sidecar never owns or executes the
118
+ task plan, and it never replaces a worker agent. It may independently
119
+ critique the Main Agent's plan or propose alternatives (the Planner
120
+ module) — but the Main Agent decides whether to act on that critique, and
121
+ remains the one that executes.
122
+ - **Not a content-safety guardrail.** Libraries like NeMo Guardrails or
123
+ Guardrails AI validate a single prompt/response turn against rules. The
124
+ Sidecar evaluates a *decision* — a tool call or plan step — against intent
125
+ and context accumulated across an entire task.
126
+ - **Not a tracing/observability tool.** That's
127
+ [AgenticLens](https://github.com/DeepAgentLabs/agenticlens)'s job:
128
+ "what did the agent do, and why did it fail?" — after the fact. The
129
+ Sidecar's job is "should it continue?" — while it's still running.
130
+ - **Not just LLM-as-a-Judge.** A judge model is one possible evaluator inside
131
+ one Sidecar module (§ [Sidecar modules](#sidecar-modules)). Most decisions
132
+ should never reach an LLM at all — see [Operating
133
+ modes](#operating-modes) and the cost-control design in
134
+ [ROADMAP.md](ROADMAP.md).
135
+ - **Not an agent harness.** It doesn't run the agent loop, manage tools, or
136
+ handle retries — that's LangGraph's, CrewAI's, or your custom loop's job.
137
+ The Sidecar attaches to whatever harness is already running the agent; see
138
+ [Sidecar vs. Agent Harness](#sidecar-vs-agent-harness).
139
+
140
+ ## Architecture
141
+
142
+ ```text
143
+ USER
144
+ │
145
+ User Intent
146
+ │
147
+ ▼
148
+ ┌───────────────┐
149
+ │ MAIN AGENT │
150
+ │ EXECUTOR │
151
+ └───────┬───────┘
152
+ │
153
+ Plans / Decisions
154
+ │
155
+ ▼
156
+ ┌─────────────────────┐
157
+ │ AGENTIC SIDECAR │
158
+ │ │
159
+ │ Intent Guardian │
160
+ │ Planner │
161
+ │ Critic │
162
+ │ Judge │
163
+ │ Risk Evaluator │
164
+ │ Policy Advisor │
165
+ │ Decision Gate │
166
+ │ Status Interpreter │
167
+ └──────────┬──────────┘
168
+ │
169
+ Advice / Approval / Challenge
170
+ │
171
+ ▼
172
+ MAIN AGENT
173
+ │
174
+ ▼
175
+ MCP / Tools
176
+ │
177
+ ▼
178
+ External Systems
179
+ ```
180
+
181
+ The Sidecar is attached to the execution lifecycle. It does not own the
182
+ user's task and is never a second worker in the plan.
183
+
184
+ ## Sidecar vs. Agent Harness
185
+
186
+ An **agent harness** (LangGraph, a custom loop, OpenAI Agents SDK, Microsoft
187
+ Agent Framework, ...) is the control and execution environment: it runs the
188
+ agent loop and manages tools, state, context, retries, and lifecycle.
189
+ `agentic-sidecar` doesn't replace that — it attaches to it as a decision-time
190
+ supervision layer:
191
+
192
+ ```text
193
+ Agent Harness = control and execution loop.
194
+ Agentic Sidecar = decision-time supervision layer for that loop.
195
+ ```
196
+
197
+ The harness answers *"how do I execute this workflow?"* The Sidecar answers
198
+ *"should this decision happen, given what the human originally asked for?"*
199
+
200
+ This distinction matters most once a task fans out across a delegation
201
+ chain — Agent A → Agent B → Agent C → MCP/Tool — where each hop tends to
202
+ receive only the sub-task it needs to perform, not the original constraints
203
+ and authority behind it:
204
+
205
+ ```text
206
+ Human Intent → Agent A → delegates → Agent B → delegates → Agent C → MCP/Tool
207
+ ```
208
+
209
+ The Sidecar's Intent Envelope (§ [Sidecar modules](#sidecar-modules)) is
210
+ designed to travel with the task through that chain instead of being
211
+ reconstructed from conversation history at every hop — see [Long-term: an
212
+ intent propagation layer](#long-term-an-intent-propagation-layer).
213
+
214
+ Where it pays for itself: without a supervision layer, a harness typically
215
+ discovers a bad decision only after acting on it —
216
+
217
+ ```text
218
+ Plan → Act → Fail → Recover → Replan
219
+ ```
220
+
221
+ — versus catching it before execution:
222
+
223
+ ```text
224
+ Plan → Sidecar Check → Act
225
+ ├── ALLOW
226
+ ├── CHALLENGE
227
+ ├── REPLAN
228
+ ├── BLOCK
229
+ └── ESCALATE
230
+ ```
231
+
232
+ That's primarily a reliability and control win, not a speed win — the
233
+ Sidecar doesn't make the underlying model faster, it reduces unnecessary
234
+ actions, unsafe retries, and repeated context reconstruction. Full treatment:
235
+ [concept.md § 23](concept.md#23-sidecar-vs-agent-harness).
236
+
237
+ ## Main Agent vs. Sidecar
238
+
239
+ | Main Agent | Agentic Sidecar |
240
+ | --- | --- |
241
+ | Accomplishes the task | Maintains original intent |
242
+ | Reasons about the domain problem | Independently evaluates plans and decisions |
243
+ | Selects and calls tools | Challenges questionable decisions |
244
+ | Interacts with MCP servers / APIs | Evaluates risk and checks policy |
245
+ | Executes actions | Decides when human approval is required |
246
+ | Produces the final result | Explains live execution; recommends replanning; pauses or blocks when configured |
247
+
248
+ ## How the Decision Gate evaluates a decision
249
+
250
+ Three modules ask three genuinely different questions about the same
251
+ proposed action, and the roadmap's job is to keep them from collapsing into
252
+ one generic "policy engine":
253
+
254
+ ```text
255
+ USER INTENT
256
+ │
257
+ Intent Envelope
258
+ │
259
+ ▼
260
+ MAIN AGENT
261
+ │
262
+ proposed action
263
+ │
264
+ ▼
265
+ SIDECAR
266
+ ┌───────┼────────┐
267
+ │ │ │
268
+ Policy Risk Intent
269
+ │ │ │
270
+ "Are you "How "Is this
271
+ permitted dangerous actually what
272
+ to do is this the human
273
+ this?" action?" asked you to
274
+ accomplish?"
275
+ │ │ │
276
+ └───────┼────────┘
277
+ │
278
+ DECISION GATE
279
+ │
280
+ ┌──────────┼──────────┐
281
+ ▼ ▼ ▼
282
+ ALLOW REPLAN ESCALATE
283
+ │
284
+ HUMAN
285
+ ```
286
+
287
+ Policy and Risk are largely mechanical — permission lists, thresholds,
288
+ tool-argument patterns — and v0.1 ships them with zero LLM calls (see
289
+ [ROADMAP.md](ROADMAP.md)). Intent is the one that requires understanding
290
+ what the user actually meant, and it's where the project's distinctive
291
+ value lives.
292
+
293
+ The diagram above shows the target outcome set. **v0.1 ships a narrower
294
+ slice**: only `ALLOW`/`BLOCK`, in Observe mode — the Sidecar logs what it
295
+ *would* have decided but cannot yet stop an action in practice. `WARN`,
296
+ `CHALLENGE`, `REPLAN`, `PAUSE`, and `ESCALATE` arrive across v0.2–v0.4 as
297
+ Intent Guardian and the full Decision Gate ship. Version-by-version build
298
+ order is in [ROADMAP.md](ROADMAP.md#build-order).
299
+
300
+ ## Sidecar modules
301
+
302
+ Users enable only what they need:
303
+
304
+ ```text
305
+ Agentic Sidecar
306
+ │
307
+ ├── Intent Guardian — Intent Envelope, alignment checks, drift detection
308
+ ├── Planner — independently evaluates the agent's plan
309
+ ├── Critic — challenges a proposed decision before it executes
310
+ ├── Judge — optional independent (and independent-model) evaluation
311
+ ├── Risk Evaluator — classifies an action's risk before deciding whether to escalate
312
+ ├── Policy Advisor — deterministic policy rules (cheapest check, runs first)
313
+ ├── Decision Gate — turns evaluations into ALLOW / WARN / CHALLENGE / REPLAN / PAUSE / BLOCK / ESCALATE
314
+ ├── Budget Guardian — cost/token ceilings per task
315
+ ├── Status Interpreter — translates raw tool/MCP traces into human-readable narration
316
+ └── Human Escalation — pauses execution and requests approval
317
+ ```
318
+
319
+ ```yaml
320
+ sidecar:
321
+ intent:
322
+ enabled: true
323
+ preserve_original_intent: true
324
+ planner:
325
+ enabled: false # off by default — see cost design in ROADMAP.md
326
+ critic:
327
+ enabled: false # off by default — see cost design in ROADMAP.md
328
+ policy:
329
+ enabled: true
330
+ source: policies.yaml
331
+ risk:
332
+ enabled: true
333
+ intervention_threshold: 0.80
334
+ judge:
335
+ enabled: false # off by default — see cost design in ROADMAP.md
336
+ model: independent-model
337
+ budget:
338
+ enabled: true
339
+ max_cost: 2.00
340
+ human_approval:
341
+ enabled: true
342
+ on_sidecar_failure: fail_closed # or fail_open — see ROADMAP.md
343
+ ```
344
+
345
+ ## Planned Python API
346
+
347
+ This is the target developer experience — **not yet implemented** (tracked
348
+ as v0.1 in [ROADMAP.md](ROADMAP.md)):
349
+
350
+ ```python
351
+ from agentic_sidecar import Sidecar
352
+
353
+ sidecar = Sidecar(roles=["intent_guardian", "policy", "risk", "planner", "critic"])
354
+ agent = sidecar.attach(my_agent)
355
+
356
+ agent.run("Investigate the production issue but do not modify production.")
357
+ ```
358
+
359
+ ```python
360
+ @sidecar.before_tool_call
361
+ def evaluate_action(context):
362
+ return sidecar.evaluate(
363
+ intent=context.intent,
364
+ action=context.tool_call,
365
+ risk=context.risk,
366
+ )
367
+ ```
368
+
369
+ ```python
370
+ Decision(
371
+ status="REPLAN",
372
+ risk="HIGH",
373
+ reason="Action exceeds original user intent",
374
+ )
375
+ ```
376
+
377
+ ## Operating modes
378
+
379
+ | Mode | Behavior |
380
+ | --- | --- |
381
+ | **Observe** | Sidecar monitors and logs; cannot affect execution. |
382
+ | **Advise** | Sidecar returns a recommendation; the agent decides whether to follow it. |
383
+ | **Govern** | Sidecar's Decision Gate can allow, warn, replan, pause, or block. |
384
+ | **Human-supervised** | High-risk decisions route to a human for approve/reject. |
385
+
386
+ Modes are meant to be adopted in that order — organizations start in Observe
387
+ and move to Govern once they trust the signal.
388
+
389
+ ## Long-term: an intent propagation layer
390
+
391
+ The nearer-term modules above are the whole of what v0.1–v0.8 ship. But the
392
+ `IntentEnvelope` (§ [Sidecar modules](#sidecar-modules)) is designed to
393
+ survive being handed off — not just checked once and discarded:
394
+
395
+ ```text
396
+ Human
397
+ │
398
+ └── Intent Envelope #182
399
+ │
400
+ ▼
401
+ Agent A
402
+ │
403
+ delegates
404
+ ▼
405
+ Agent B
406
+ │
407
+ MCP
408
+ ▼
409
+ Agent C
410
+ │
411
+ Tool
412
+ ```
413
+
414
+ If every hop in a delegation chain can answer *what was originally
415
+ requested, who authorized it, what constraints apply, what authority was
416
+ actually delegated, and whether intent has since changed* — that's no
417
+ longer just a feature of one package. It's closer to an interoperability
418
+ concern for autonomous systems generally, which is why v1.0 targets
419
+ publishing the envelope as a versioned schema in `ai-operations-spec`
420
+ rather than keeping it as an internal Sidecar structure (see the v1.0 entry
421
+ in [ROADMAP.md](ROADMAP.md#build-order)).
422
+ This is explicitly a v1.0 target, not something v0.1 needs to anticipate —
423
+ noted here because it's the reason the envelope's shape deserves care early,
424
+ even though nothing consumes it across process boundaries yet.
425
+
426
+ ## The DeepAgentLabs ecosystem
427
+
428
+ ```text
429
+ DeepAgentLabs
430
+ Autonomous AI Systems
431
+ │
432
+ ┌─────────────┼─────────────┐
433
+ │ │ │
434
+ OBSERVE GUIDE CONNECT
435
+ │ │ │
436
+ AgenticLens Agentic Sidecar Agentic MCP
437
+ │ │ │
438
+ └─────────────┼─────────────┘
439
+ │
440
+ TEST
441
+ │
442
+ Agentic Chaos
443
+ ```
444
+
445
+ | Project | Question it answers |
446
+ | --- | --- |
447
+ | [AgenticLens](https://github.com/DeepAgentLabs/agenticlens) | What did the agent do, and what happened? |
448
+ | [Agentic Chaos](https://github.com/DeepAgentLabs/agentic-chaos) | How does the agent behave when things go wrong? |
449
+ | [Agentic MCP](https://github.com/DeepAgentLabs/mcp-server) | How does the agent interact with tools and external capabilities? |
450
+ | **Agentic Sidecar** | Should the agent continue with this decision, and is it still acting according to intent? |
451
+
452
+ Each project is independently installable; none requires another as a hard
453
+ dependency (see [Cross-Project Dependencies](ROADMAP.md#cross-project-dependencies)
454
+ in the roadmap).
455
+
456
+ ## Roadmap
457
+
458
+ Full build plan, version sequencing, and design constraints:
459
+ [ROADMAP.md](ROADMAP.md).
460
+
461
+ Original architecture proposal: [concept.md](concept.md).
462
+
463
+ ## License
464
+
465
+ MIT (planned — `LICENSE` file to be added alongside the first code commit,
466
+ matching sibling DeepAgentLabs projects).
@@ -0,0 +1,33 @@
1
+ agentic_sidecar/__init__.py,sha256=E4IIBe-c1WFUuHRtcUF5sg3Co-7hu18mkDAb_6tYiWI,556
2
+ agentic_sidecar/adapters/__init__.py,sha256=K64pZP-ax-mRit0h9YTer1sql2DNVUBAg7Os6d70-kM,405
3
+ agentic_sidecar/adapters/autogen.py,sha256=8zRlcGEfT2QcifObvrljRbmIac5hK2Pgkw6NWz1DciY,205
4
+ agentic_sidecar/adapters/crewai.py,sha256=rARZMyq-owXF3i6-Dg_DVxgh-H4a5lEjialDtErBrx8,204
5
+ agentic_sidecar/adapters/google_adk.py,sha256=bnJL2fcYXEFlvhybpaZ5GUAU06Yj8Q8uO5jwTIfeL2Y,232
6
+ agentic_sidecar/adapters/langgraph.py,sha256=KQo0S2IaVlaVa2ZpN5fEQrnZD6OlYMObX_ljT3jOkY8,329
7
+ agentic_sidecar/adapters/openai_agents.py,sha256=dt7cT8nUMkY8FgBQjYNXxIJIENEMX0hkLizLe-lgxfc,215
8
+ agentic_sidecar/cli/__init__.py,sha256=izIdMCzY2UDWkCdysIIR9-ViL2e469v-t1kPU6neqFY,208
9
+ agentic_sidecar/cli/main.py,sha256=d0Ax1qxrYWzHV3mMJ90dIuOeNkBXQn68ybLK-pab5kw,152
10
+ agentic_sidecar/core/__init__.py,sha256=DiNE6u0dqGp0dxD00PNlxee64NLQqOt2eTLIckerSU4,171
11
+ agentic_sidecar/core/context.py,sha256=QoqLPvRrR4dWWku7M16rrpDhtBsIWCSe8_MF1u8gZzA,285
12
+ agentic_sidecar/core/decision.py,sha256=aziHx_wCAmNb8nd1Mhd2CeQrdUEMHni_pms04gzm4R0,375
13
+ agentic_sidecar/core/sidecar.py,sha256=Gsj5y12fYUIndElQ6VZvyJJCicZjGcfXGg21hnjuiXs,371
14
+ agentic_sidecar/evaluators/__init__.py,sha256=m51PuQN44CXEpEipvOSIov_u06nFs919GZT2sFhp2Bo,601
15
+ agentic_sidecar/evaluators/critic.py,sha256=-6yd51ivTk4IqS4pdUhQmYFk8AfY21wh7_AbDLLUDvo,231
16
+ agentic_sidecar/evaluators/judge.py,sha256=rlQEKQLy2cMEhSweoPbAZ-7DY4o4ceavYFS1EGzfT1o,350
17
+ agentic_sidecar/evaluators/planner.py,sha256=mE814lo0yP6a3i2vzO0aHNf-ssrVxnPOPQhbfUEOwao,877
18
+ agentic_sidecar/gate/__init__.py,sha256=uz28Bw5LcROPkGFVmq_Khc8uRK3LLg5eiH_hATzO0CY,603
19
+ agentic_sidecar/gate/budget.py,sha256=qwz6MMp2CMrQQfseztATau2fEageZJ3EUKrmcscJebc,201
20
+ agentic_sidecar/gate/policy.py,sha256=xeWzbEtltca6xtoYDXO0_5Qbx9-QU9w85weWs8pgrqE,315
21
+ agentic_sidecar/gate/risk.py,sha256=SVIejZuPUOZYs5ooisj1YHVFGXJuA7tRriHroWPcAQo,395
22
+ agentic_sidecar/integrations/__init__.py,sha256=dCpTYF4TWzM44xAyabQPA33Ae9ZghbowiggqQOvuWPg,587
23
+ agentic_sidecar/integrations/agentic_chaos.py,sha256=XZUjfrqDc0L04M5l56SxXnf1LopvGi3LUUahOEBHQy4,1284
24
+ agentic_sidecar/integrations/agenticlens.py,sha256=J4kXFdzbPZNyzUtEmHY1iQYq06YtiSY5cjvz4GApf-s,726
25
+ agentic_sidecar/intent/__init__.py,sha256=DiVa-1S2ifNvhdnkCYhEeQWr6vQvMPPqQ-IaoP1Ddr4,534
26
+ agentic_sidecar/intent/alignment.py,sha256=48omdh6x2X-s3fMbkzpiCzgUzccm7wwoQqkK03NPa9Q,481
27
+ agentic_sidecar/intent/envelope.py,sha256=FD5DZk2VLrXchUbEywREq8fBJV32u_opFs2tAtCobwc,489
28
+ agentic_sidecar/status/__init__.py,sha256=gLhplCh9koEpD-Jk1kpMYp1mdiXnAiXp5On0cstWcko,214
29
+ agentic_sidecar/status/narrate.py,sha256=N5j8PLeCHoqre_Uf4_SDCeRmNglb7WyDKn5sFwHLdbk,218
30
+ agentic_sidecar-0.0.1.dist-info/METADATA,sha256=MH6-lWn9SJw9VD9x77wkAGzf0j-kPtrJSXohPfEhpZo,18362
31
+ agentic_sidecar-0.0.1.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
32
+ agentic_sidecar-0.0.1.dist-info/licenses/LICENSE,sha256=asfUZpnkKQnsP0OQ9BE8_TAUEYZz4qUBkwgHPLvSWko,1067
33
+ agentic_sidecar-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 pramodbn27
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.