AgentTools AGENTS.md

Repository guidance for AI coding agents working on AgentTools, a Wolfram Language package that connects AI systems with Wolfram computation and knowledge services.

In plain words
What is it for?
Use it when developing AgentTools, writing or running tests, building its paclet, or investigating its code architecture.
Why use it?
It explains the project’s development rules, including how to work with Wolfram Language code, test changes, inspect files, and load the package for debugging.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/wolframresearch/agenttools/agents-md
Clone the repo
git clone --depth 1 https://github.com/WolframResearch/AgentTools

Made for: Codex, OpenCode.

Per session 3,342 This file is loaded in full into every session.
When invoked 3,342 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.03342 $0.03342
Opus 5 $0.01671 $0.01671
Sonnet 5 $0.00668 $0.00668
Haiku 4.5 $0.00334 $0.00334

Measured 2d ago against content hash 16579a27904a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

AgentTools AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 183 lines

How it starts

The opening of the file, as written. The whole thing — 183 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

This file provides guidance to AI agents (Claude Code, GitHub Copilot, etc.) when working with code in this repository.

Overview

AgentTools is a Wolfram Language package for integrating with AI agents and large language models. It provides MCP servers, agent skills, and other standard interfaces that enable AI systems to leverage Wolfram Language computation, Wolfram|Alpha knowledge, and related resources. The package supports a wide range of AI clients and protocols, with an extensible architecture for adding new tools, prompts, servers, and integration points.

Development

Always use the WolframLanguageContext tool when working with Wolfram Language code to ensure that you are aware of the latest documentation and other Wolfram resources.

When you make changes to paclet source code, you should also write and run tests for the changes you made using the TestReport tool and check the updated files (including test files) with the CodeInspector tool.

If you need to debug code in the WolframLanguageEvaluator tool, you'll first need to evaluate:

PacletDirectoryLoad[ "path/to/AgentTools" ];
Get[ "Wolfram`AgentTools`" ]

Note: This is not necessary for the TestReport tool, since the tests load the paclet automatically.

You should use the SymbolDefinition tool to investigate symbols rather than use things like DownValues, Definition, etc. It runs in the same kernel as the WolframLanguageEvaluator tool, so it will have access to the same definitions.

Writing and Running Tests

Use the TestReport MCP tool to run tests.

Always review testing.md for detailed instructions before modifying or adding tests.

Building the Paclet

See building.md for detailed instructions.

Code Architecture

Project Structure

  • Kernel/: Contains the core implementation files
    • AgentTools.wl: Main entry point which loads an MX file if available, otherwise proceeds to Main.wl
    • Main.wl: Entry point for loading other package files; exported symbols must be declared here
    • Common.wl: Common utilities and error handling
    • CommonSymbols.wl: Any symbols shared between paclet files must be declared here
    • CreateMCPServer.wl: Implementation for creating MCP servers
    • DefaultServers.wl: Defines several predefined named MCP servers
    • DeployAgentTools.wl: Implementation for deploying and managing agent tool deployments
    • Files.wl: Helper functions for file operations (local WXF/JSON I/O plus readCloudWXF/writeCloudWXF for cloud-object WXF, used by the cloud admin API's key-label store) and the machine-wide settings store $rootPath/GlobalSettings.wxf (readGlobalSettings/getGlobalSetting/setGlobalSetting), which currently holds the usage-data opt-out
    • Formatting.wl: Definitions for formatting in notebooks
    • InstallMCPServer.wl: Implementation for installing MCP servers for use in some common MCP client applications
    • MCPClientRequests.wl: Server-to-client request infrastructure (request registry, response correlation, notification dispatch) used by MCP roots and other server-initiated requests
    • MCPRoots.wl: MCP roots handshake — issues roots/list, normalizes file:// URIs (including malformed Windows variants), and applies the selected directory to the kernel, evaluator, and RunProcess calls
    • MCPServerObject.wl: Defines the MCP server object format, including its MCPServerObject upvalues (DeleteObject, LLMConfiguration, and CloudDeploy)
    • Messages.wl: Definitions for error messages
    • PacletExtension.wl: Paclet discovery, name resolution, and definition loading for the paclet extension system
    • PreferencesContent.wl: Implementation of CreatePreferencesContent, which builds the toolset configuration UI for the system preferences dialog (see preferences-content.md)
    • Server/: MCP server implementation, split by transport so the local (stdio) and cloud (HTTP) servers share a common core
      • Server.wl: Aggregator that declares the server-session state shared across the subcontexts, defines the exported $MCPEvaluationEnvironment/$MCPTransport host descriptors (bound per session/request by each transport), and loads the children below
      • Shared.wl: Transport-agnostic core — method dispatch (handleMethod), tool/prompt resolution, tool evaluation and result formatting, capability negotiation (initResponse), server-state build (initializeServerState), environment-specific tool overrides (applyToolOverrides, driven by the "Overrides" tool property), and logging helpers
      • Local.wl: Local stdio transport — StartMCPServer, the read loop (processRequest), tool warmup, and stdout-protecting output suppression (superQuiet); calls the usage-data hooks (initializeUsageData, recordUsageData)
      • UsageData.wl: Anonymous usage data for local servers — per-session state ($mcpSessionID, $mcpClientInformation, $usageEvents), the enabling logic (SUBMIT_USAGE_DATA environment variable, otherwise the servers' "EnableUsageData" property combined with the global opt-out from GlobalSettings.wxf via getGlobalUsageDataSetting/setGlobalUsageDataSetting, which the preferences checkbox reads and writes), the session file under $rootPath/UsageData, the hourly keep-alive task, and the locked submission of finished sessions to the usage endpoint
      • Cloud.wl: Cloud HTTP transport — RunCloudMCPServer (stateless Streamable HTTP handler), CloudDeployMCPServer, the full-directory-bundle deploy implementation (cloudDeployDirectory) behind both the CloudDeploy UpValue on MCPServerObject (the UpValue itself is defined in MCPServerObject.wl) and the exported CloudDeployMCPServerBundle that deploys /mcp, the landing page, /api/info, and the forced-Private admin page/API, the self-describing session-ID capability codec, server-embedding deploy helpers (including the cloud-paclet detection — $cloudSupportPacletVersion/cloudAgentToolsAvailableQ — that swaps the heavy definition-bundling payloads for light paclet-loading ones when the connected cloud account has a new-enough Wolfram/AgentTools installed), the landing-page /api/info metadata generator, and the owner-only /api/admin key-management handler (runCloudAdminAPI: list/create/revoke PermissionsKeys) (see Cloud Deployment spec)
    • SupportedClients.wl: Registry of supported MCP clients ($SupportedMCPClients) and relevant utility functions
    • ValidateAgentToolsPacletExtension.wl: Validation of "AgentTools" paclet extensions
    • UIResources.wl: MCP Apps UI resource registry, client capability detection, and shared notebook delivery helpers (cloud deployment and experimental inline embedding)
    • Utilities.wl: General-purpose helpers — LLMKit subscription checks, Chatbook version verification, and toJSRegex for converting ICU/PCRE patterns to ECMA 262 (used when sanitizing tool schema "pattern" fields)
    • YAML.wl: YAML import/export helpers (importYAML, importYAMLString, exportYAML, exportYAMLString) used by YAML-based MCP clients (e.g. Goose)
    • Tools/: Contains several files defining predefined MCP tools used by default servers. If tool schemas are modified, we need to rebuild agent skills.
    • Prompts/: Contains files defining predefined MCP prompts used by default servers
  • Assets/: Static assets bundled with the paclet
    • Apps/: HTML and JSON files for MCP Apps UI resources
    • Cloud/: Landing- and admin-page HTML/CSS/JS for cloud-deployed MCP servers — the dynamic index.html + assets/ (fetches /api/info) and the self-contained owner-only admin.html (calls /api/admin), read via PacletObject[…]["AssetLocation","Cloud"]
  • FrontEnd/: FrontEnd extension resources loaded by the notebook front end
    • Assets/AgentTools.wl: Localized strings (AgentToolsStrings) and graphics (AgentToolsExpressions) used by CreatePreferencesContent (see preferences-content.md)
  • Scripts/: Contains utility scripts for building, testing, and running the paclet
    • BuildAgentSkills.wls: Generates agent skill scripts from MCP tool definitions (see agent-skills.md)
    • Resources/SkillScriptTemplate.wls: Template used to generate .wls scripts for agent skills
  • AgentSkills/: Agent skills for distributing Wolfram tools to AI coding agents (see agent-skills.md)
    • Manifest.wl: Maps skill names to their MCP tools and shared references
    • References/: Single-source shared reference files copied into every skill at build time
    • Skills/: Generated skill directories. The references/ and scripts/ subdirectories of each skill (e.g. AgentSkills/Skills/wolfram-language/references/) are generated by Scripts/BuildAgentSkills.wls and must not be edited manually — modify the source files (AgentSkills/References/, Scripts/Resources/SkillScriptTemplate.wls, and the corresponding tool definitions in Kernel/Tools/) and rebuild instead.
  • .claude-plugin/: Claude Code plugin packaging
    • marketplace.json: Plugin marketplace definition for distributing agent skills via Claude Code
  • Notes/: Development notes and design explorations
  • Documentation/: Contains documentation notebooks
    • English/: English documentation
      • ReferencePages/Symbols/: Reference pages for exported symbols
      • Use the ReadNotebook tool to read documentation notebooks as markdown text
  • TestResources/: Mock paclets and other test fixtures
  • Tests/: Contains test files (.wlt)
  • Specs/: Design specifications for features
  • docs/: Developer documentation
    • testing.md: Writing and running tests
    • building.md: Building the paclet for distribution
    • error-handling.md: Error handling architecture and patterns
    • servers.md: Predefined MCP servers and choosing the right one
    • tools.md: MCP tools system, tool options, and how to add new tools
    • mcp-prompts.md: MCP prompts system and how to add new prompts
    • mcp-clients.md: MCP client support and installation
    • mcp-apps.md: MCP Apps system for interactive UI resources
    • code-inspector-rules.md: Adding custom CodeInspector rules
    • agent-skills.md: Agent skills system, build process, and how to add new skills
    • deploy-agent-tools.md: Deployment management for agent tools
    • cloud-deployment.md: Deploying an MCPServerObject as a remote HTTP MCP server in the Wolfram Cloud (CloudDeploy/CloudDeployMCPServer, directory layout, authentication, statelessness, admin key management)
    • mcp-roots.md: MCP roots handshake, working-directory propagation, and guidance for tools that resolve relative paths
    • paclet-extensions.md: Third-party paclet extension system for contributing tools, prompts, and servers
    • preferences-content.md: System preferences UI for managing deployed Wolfram toolsets
    • usage-data.md: Anonymous usage data collected by the built-in local servers ("SubmitUsageData" option, SUBMIT_USAGE_DATA, the global opt-out in GlobalSettings.wxf, storage and submission)

Read the full file on GitHub · 183 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 183 lines · 3,342 tokens per session scan A 16579a27904a

Subscribe to this mod's changes

AgentTools AGENTS.md is an instructions file published in the GitHub repository WolframResearch/AgentTools (82 stars, last pushed 6d ago), licensed MIT. It adds 3,342 tokens to every session, about $0.0167 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

buildNext

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

Instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,040 tokens

langchain AGENTS.md

Instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens