Skip to content

Remove agent script execution feature#315

Draft
mrostan wants to merge 2 commits into
mainfrom
mrostan/remove-agent-script-execution
Draft

Remove agent script execution feature#315
mrostan wants to merge 2 commits into
mainfrom
mrostan/remove-agent-script-execution

Conversation

@mrostan

@mrostan mrostan commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

What's new?

Removes the /api/v1/agent/execute_script endpoint and its RestrictedPython
executor, which allowed callers to send Python scripts to be run on the agent.
The feature is unused and is flagged by customer security reviews.

  • Delete apollo/agent/scripts.py (the RestrictedPython executor)
  • Remove Agent.execute_script / Agent._execute_script and AgentEvaluationUtils.execute_script
  • Remove the /api/v1/agent/execute_script Flask route
  • Drop the RestrictedPython dependency (requirements.in / requirements.txt)
  • Remove the script tests and sample-script fixtures

Related PRs

  • agent-base — removes the now-unused AgentScript model + constants
  • data-collector — removes the subsystem that called this endpoint

Testing

  • Unit tests pass locally (1122 passed)
  • Integration tested on dev

Merge ordering

Part of a 3-repo change. apollo-agent no longer imports anything from the
removed agent-base symbols, so CI passes against the currently-pinned
agent-base. Coordinated dev rollout: agent-base + apollo-agent first, then
bump data-collector's mcd-agent pin (which drops restrictedpython from its
lockfile).

🤖 Generated with Claude Code

mrostan and others added 2 commits June 2, 2026 10:12
Removes the /api/v1/agent/execute_script endpoint and its RestrictedPython
executor, which allowed callers to send Python scripts to be run on the
agent. The feature is unused and flagged by customer security reviews.

- Delete apollo/agent/scripts.py (the RestrictedPython executor)
- Remove Agent.execute_script / Agent._execute_script and
  AgentEvaluationUtils.execute_script
- Remove the /api/v1/agent/execute_script Flask route
- Drop the RestrictedPython dependency (requirements.in/.txt)
- Remove the script tests and sample-script fixtures

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Temporarily pins agent-base to @dev (was @v0.0.2) so apollo-agent's dev
build/deploy validates against the agent-base dev branch, which now has the
AgentScript model/constants removed.

NOTE: must be swapped back to a proper agent-base release tag before this PR
merges to main.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mrostan

mrostan commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Do not merge to main as-is. This branch temporarily pins agent-base @ ...@dev (commit 21c9b6c) for dev integration testing against the agent-base change (monte-carlo-data/agent-base#7, already on agent-base dev). Before merging to main, swap the pin back to a proper agent-base release tag (cut a new agent-base release after #7 merges to main, then bump requirements.in/requirements.txt here).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant