
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
opencode-agentlens
Advanced tools
OpenCode plugin for AgentLens — trace your coding agent's decisions, tool calls, and sessions
OpenCode plugin for AgentLens — trace your coding agent's decisions, tool calls, and sessions.
npm install opencode-agentlens
| Variable | Required | Default | Description |
|---|---|---|---|
AGENTLENS_API_KEY | Yes | — | Your AgentLens API key. |
AGENTLENS_ENDPOINT | No | AgentLens cloud | API endpoint URL. |
AGENTLENS_ENABLED | No | true | Set to false to disable tracing. |
AGENTLENS_CAPTURE_CONTENT | No | true | Capture message and tool output content. |
AGENTLENS_MAX_OUTPUT_LENGTH | No | 10000 | Max characters to capture per output. |
AGENTLENS_FLUSH_INTERVAL | No | 5000 | Flush interval in milliseconds. |
AGENTLENS_BATCH_SIZE | No | 100 | Max items per batch before auto-flush. |
Add the plugin to your OpenCode configuration at ~/.config/opencode/opencode.json:
{
"plugins": [
{
"name": "agentlens",
"module": "opencode-agentlens"
}
]
}
Set your API key (create one at Settings > API Keys in the AgentLens dashboard):
export AGENTLENS_API_KEY="your-api-key"
The plugin activates automatically when OpenCode starts. No code changes required.
Each OpenCode session counts as one trace (one session) for billing purposes. See the billing documentation for plan details.
The plugin hooks into OpenCode's event system and records:
All data is sent to your AgentLens instance where you can inspect traces, replay sessions, and analyze agent behavior.
The plugin registers handlers for OpenCode's event hooks:
| Event | What is recorded |
|---|---|
| Session start/end | Trace lifecycle, session metadata |
tool.execute.before | Tool name, input arguments |
tool.execute.after | Tool output, duration, success/failure |
chat.message | LLM responses and assistant messages |
chat.params | Model parameters and prompt configuration |
permission.ask | Permission requests and user decisions |
Each OpenCode session maps to a single AgentLens trace. Tool calls and LLM interactions become spans within that trace.
Full documentation: agentlens.vectry.tech/docs/opencode-plugin
MIT
FAQs
OpenCode plugin for AgentLens — trace your coding agent's decisions, tool calls, and sessions
We found that opencode-agentlens demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.