AI News
Signal over noise. Daily.
一線 AI Lab
10 articlesAgent SDK reference - TypeScript
Complete API reference for the TypeScript Agent SDK, including all functions, types, and interfaces. npm install @anthropic-ai/claude-agent-sdk The SDK bundles a native Claude Code binary for your platform as an optional dependency such as `@anthropic-ai/claude-agent-sdk-darwin-arm64`. Most installs need no separate Claude Code install. The SDK version tracks the bundled Claude Code version: SDK v0.3.191 bundles Claude Code v2.1.191, so a feature on this page that requires a Claude Code version needs the SDK release with the same patch number or later. If your package manager skips optional dependencies, the SDK throws `Native CLI binary for not found`; set `pathToClaudeCodeExecutable` to a separately installed `claude` binary instead.
Agent SDK reference - Python
Complete API reference for the Python Agent SDK, including all functions, types, and classes. Install the package into a virtual environment. On recent Debian, Ubuntu, and Homebrew Python installs, running `pip install` against system Python fails with `error: externally-managed-environment`. python3 -m venv .venv source .venv/bin/activate pip install claude-agent-sdk For uv, Windows PowerShell, and API key setup, see Setup in the Agent SDK quickstart. The Python SDK provides two ways to interact with Claude Code: | Feature | `query()` | `ClaudeSDKClient` | | :------------------ | :--------------------------------------------- | :--------------------------------- | | **Session** | Creates a new session by default | Reuses same session |
Observability with OpenTelemetry
Export traces, metrics, and events from the Agent SDK to your observability backend using OpenTelemetry. When you run agents in production, you need visibility into what they did: * which tools they called * how long each model request took * how many tokens were spent * where failures occurred The Agent SDK can export this data as OpenTelemetry traces, metrics, and log events to any backend that accepts the OpenTelemetry Protocol (OTLP), such as Honeycomb, Datadog, Grafana, Langfuse, or a self-hosted collector. This guide explains how the SDK emits telemetry, how to configure the export, and how to tag and filter the data once it reaches your backend. To read token usage and cost directly from the SDK response stream instead of exporting to a backend, see Track cost and usage. The Agent…
Configure permissions
Control how your agent uses tools with permission modes, hooks, and declarative allow/deny rules. The Claude Agent SDK provides permission controls to manage how Claude uses tools. Use permission modes and rules to define what's allowed automatically, and the `canUseTool` callback to handle everything else at runtime. When Claude requests a tool, the SDK checks permissions in this order: Run hooks first. A hook can deny the call outright or pass it on. A hook that returns `allow` does not skip the deny and ask rules below; those are evaluated regardless of the hook result. Check `deny` rules (from `disallowed_tools` and settings.json). If a deny rule matches, the tool is blocked, even in `bypassPermissions` mode. Bare-name deny rules like `Bash` remove the tool from Claude's context…
Give Claude custom tools
Define custom tools with the Claude Agent SDK's in-process MCP server so Claude can call your functions, hit your APIs, and perform domain-specific operations. Custom tools extend the Agent SDK by letting you define your own functions that Claude can call during a conversation. Using the SDK's in-process MCP server, you can give Claude access to databases, external APIs, domain-specific logic, or any other capability your application needs. | If you want to... | Do this | | :------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
Todo Lists
Track and display todos using the Claude Agent SDK for organized task management The Claude Agent SDK includes built-in todo functionality that helps organize complex workflows and keep users informed about task progression. On TypeScript Agent SDK 0.3.233 and later, or Python Agent SDK 0.2.139 and later, the following tools aren't available on Opus 4.8, Sonnet 5, Fable 5, Mythos 5, or later versions of those families unless you opt in: * `TodoWrite` * `TaskCreate` * `TaskGet` * `TaskUpdate` * `TaskList` On other models, Claude Code provides the Task tools by default and `TodoWrite` only when you set `CLAUDE_CODE_ENABLE_TASKS=0`. On the models that don't get the task-tracking tools, you see no `tool_use` blocks for them in the message stream unless you opt in. If you point `cli_path` in…
Intercept and control agent behavior with hooks
Intercept and customize agent behavior at key execution points with hooks Hooks are callback functions that run your code in response to agent events, like a tool being called, a session starting, or execution stopping. With hooks, you can: * **Block dangerous operations** before they execute, like destructive shell commands or unauthorized file access * **Log and audit** every tool call for compliance, debugging, or analytics * **Transform inputs and outputs** to sanitize data, inject credentials, or redirect file paths * **Require human approval** for sensitive actions like database writes or API calls * **Track session lifecycle** to manage state, clean up resources, or send notifications Something happens during agent execution and the SDK fires an event: a tool is about to be called…
Use Claude Code on the web
Move sessions between web and terminal with `--cloud` and `--teleport`, manage and share sessions, and auto-fix pull requests from the cloud. Claude Code on the web is in research preview for Pro, Max, and Team users, and for Enterprise users with premium seats or Chat + Claude Code seats. Claude Code on the web runs tasks on Anthropic-managed cloud infrastructure at claude.ai/code, or on your organization's self-hosted environment when routed there. Sessions persist even if you close your browser, and you can monitor them from the Claude mobile app. New to Claude Code on the web? Start with Get started to connect your GitHub account and submit your first task. This page covers the web product itself: * Cloud environments: where sessions run, and where to configure that
Claude Text Watermark
Future Claude models will generate text that contains a watermark. This is a way of determining the likelihood that Claude was involved in writing the text, and we, along with several other major AI providers, are implementing this change to comply with the EU AI Act. In this article, we share answers to some of the questions we’ve received about how our chosen watermarking method works, whether it affects Claude’s outputs, and why we’re making this change.
How the agent loop works
Understand the message lifecycle, tool execution, context window, and architecture that power your SDK agents. The Agent SDK lets you embed Claude Code's autonomous agent loop in your own applications. The SDK is a standalone package that gives you programmatic control over tools, permissions, cost limits, and output. Both the TypeScript and Python SDKs bundle a native Claude Code binary, so most installs need no separate Claude Code install. See the quickstart's install note for the installs that do. When you start an agent, the SDK runs the same execution loop that powers Claude Code: Claude evaluates your prompt, calls tools to take action, receives the results, and repeats until the task is complete. This page explains what happens inside that loop so you can build, debug, and…
媒體
7 articlesWoman claims her stepfather used Grok to transform childhood photo into explicit imagery
The woman claimed that AI tools are "taking everyday life and turning it into child sexual abuse."
Have a laugh at AI’s expense by roleplaying as a chatbot
If you squint you can just about make out the hat. | Screenshot: Terrence O’Brien / The Verge Your AI Slop Bores Me is brilliant in its simplicity. There are two tabs: human and LARP as an AI. On one side you enter a request. On the other, you submit an answer. But the important thing is that there's a human on both sides of the equation. Prompts can request a response as text or image, and then whoever is roleplaying as the AI gets 150 seconds to respond. Just like a real LLM, Your AI Slop Bores Me works on a sort of token system. Requests cost credits, and to earn credits you have to jump onto the AI side and answer some of your own. You can also just wait as you get one free request every two minutes. But, as fun as it is to drop … Read the full story at The Verge.
Anthropic shares more details about how Claude’s new watermarks will work
How will the watermarking actually work? Can it be hidden with editing? And how does this affect code?
These A.I. Policies Will Hurt Our Business. We Should Do Them Anyway.
The risks posed by A.I. are too great to forgo any regulation, even for those who stand to gain tremendously from the technology’s rise.
An A.I. Bot is Judging Your Résumé
Raise your hand if you’ve been personally victimized by an A.I. job recruiter. Finding a job has become more difficult in part because many corporations are now using bots to evaluate résumés. The Opinion writer Jessica Grose explains why job hunting has become about gaming A.I. recruiters, and why the solution might just be going analog.
SpaceX officially closes its Cursor acquisition
AI coding startup Cursor is now officially a part of SpaceX.
Amazon Can Use Your Twitch Content to Train Its AI—Unless You Opt Out
When Twitch announced that streamers could opt out, thousands of users questioned why their content was being used to train AI models in the first place.