Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion examples/langchain_ollama/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
from langchain_core.messages import HumanMessage, SystemMessage, ToolMessage
from langchain_ollama import ChatOllama

SYSTEM = "You are a helpful assistant with access to tools for filesystem management."
SYSTEM = """\
You are a helpful assistant with access to tools for filesystem management. Every tool is gated by
VRE (Volute Reasoning Engine) to enforce epistemic justification before execution.

Your shell tool runs in a fully writable workspace directory. All files should be created and managed
there using relative paths. Do not use /tmp or other directories outside the workspace.
"""


class ToolAgent:
Expand Down
2 changes: 1 addition & 1 deletion examples/langchain_ollama/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def main() -> None:
shell_tool = StructuredTool.from_function(
shell_fn,
name="shell_tool",
description="Run a shell command in the sandbox.",
description="Run a shell command in the workspace directory. The workspace is fully writable — you can create, modify, delete, and execute files here. Use relative paths.",
)

agent = make_agent([shell_tool], model=args.model)
Expand Down
5 changes: 4 additions & 1 deletion examples/langchain_ollama/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ def init_tools(
)
def shell_tool(command: str, cwd: str = sandbox) -> str:
"""
Execute a shell command inside the sandbox directory.
Execute a shell command inside the workspace directory. The
workspace is fully writable — files can be created, modified,
deleted, and executed here. Use relative paths to stay within
the workspace.
"""
result = subprocess.run(
command, shell=True, capture_output=True, text=True, cwd=cwd
Expand Down
13 changes: 8 additions & 5 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ poetry run python scripts/clear_graph.py

## seed_all.py

Seeds the fully grounded epistemic graph — 15 primitives covering the
filesystem domain end-to-end. Every primitive is grounded to D3
Seeds the fully grounded epistemic graph — 20 primitives covering the
filesystem domain end-to-end. Every primitive is grounded to at least D3
(CONSTRAINTS) with complete structural relata (DEPENDS_ON, REQUIRES,
INCLUDES, APPLIES_TO, CONSTRAINED_BY).
INCLUDES, APPLIES_TO, CONSTRAINED_BY). Two primitives (`delete`,
`execute`) extend to D4 (IMPLICATIONS) to demonstrate consequential
relationships and the full depth model.

Primitives: `operating_system`, `filesystem`, `path`, `permission`,
`directory`, `file`, `user`, `group`, `create`, `read`, `write`,
`delete`, `list`, `move`, `copy`
`ownership`, `directory`, `file`, `symlink`, `user`, `group`,
`process`, `create`, `read`, `write`, `modify`, `delete`, `list`,
`move`, `copy`, `execute`

```bash
poetry run python scripts/seed_all.py
Expand Down
Loading