Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/langchain-ai/deepagents
/ functions
Functions
17,176 in github.com/langchain-ai/deepagents
⨍
Functions
17,176
◇
Types & classes
2,266
↳
Endpoints
202
↓ 38 callers
Method
set_success
Mark the tool call as successful. For `execute` calls that actually ran (a start time was recorded via `set_running`), the elapsed ru
libs/code/deepagents_code/widgets/messages.py:1255
↓ 37 callers
Function
_widget_text
Extract plain text content from a Static widget.
libs/code/tests/unit_tests/test_mcp_viewer.py:21
↓ 37 callers
Function
format_token_count
Format a token count into a human-readable short string. Args: count: Number of tokens. Returns: Formatted string like `'12.
libs/code/deepagents_code/_session_stats.py:139
↓ 37 callers
Method
read
(self, _size: int)
libs/code/tests/unit_tests/test_managed_tools.py:782
↓ 37 callers
Method
record_request
Accumulate token counts for one completed LLM request. Updates both the session totals and the per-model breakdown. Args:
libs/code/deepagents_code/_session_stats.py:83
↓ 36 callers
Function
_get_harness_profile
Look up the `HarnessProfile` for a model spec. Resolution order: 1. Exact match on `spec`. 2. Provider prefix (everything before the fir
libs/deepagents/deepagents/profiles/harness/harness_profiles.py:1050
↓ 36 callers
Function
_make_spec
(name: str = "test-agent", **overrides: Any)
libs/deepagents/tests/unit_tests/test_async_subagents.py:22
↓ 36 callers
Method
eval_sync
( self, code: str, *, outer_runtime: ToolRuntime | None = None, )
libs/partners/quickjs/langchain_quickjs/_repl.py:738
↓ 36 callers
Function
handler
(_req)
libs/deepagents/tests/unit_tests/test_permissions.py:65
↓ 36 callers
Method
show_manager
Push the manager screen.
libs/code/tests/unit_tests/test_auth_widgets.py:96
↓ 35 callers
Function
_wait_for_sent_count
(channel: RecordingChannel, count: int)
libs/talon/tests/test_host.py:835
↓ 35 callers
Function
_write_uv_receipt
( root: Path, requirements: str, *, python: str | None = None, )
libs/code/tests/unit_tests/test_update_check.py:150
↓ 35 callers
Method
from_env
Build runtime configuration from environment variables. Args: env: Environment mapping to read. Defaults to `os.environ`.
libs/talon/deepagents_talon/config.py:47
↓ 34 callers
Function
_check_fs_permission
( rules: list[FilesystemPermission], operation: FilesystemOperation, path: str, )
libs/deepagents/deepagents/middleware/filesystem.py:288
↓ 34 callers
Function
_make_sandbox
()
libs/deepagents/tests/unit_tests/backends/test_langsmith_sandbox.py:16
↓ 34 callers
Method
_switch_model
Switch to a new model, preserving conversation history. This requires a server-backed interactive session. It sets a model override t
libs/code/deepagents_code/app.py:15828
↓ 34 callers
Function
is_ascii_mode
Check whether the terminal is in ASCII charset mode. Convenience wrapper so widgets can branch on charset without importing both `_detect_cha
libs/code/deepagents_code/config.py:1186
↓ 34 callers
Function
mock_get_config
Context manager to mock `get_config()` with a specific `thread_id`. Args: thread_id: The `thread_id` to return, or `None` to simulate mis
libs/deepagents/tests/unit_tests/middleware/test_summarization_middleware.py:225
↓ 34 callers
Method
read
Read file content for the requested line range. Args: file_path: Absolute file path. offset: Line offset to start rea
libs/deepagents/deepagents/backends/store.py:517
↓ 34 callers
Method
save
Persist state, optionally updating agent_id / revision in the same call.
libs/cli/deepagents_cli/deploy/state.py:88
↓ 33 callers
Function
_make_backend
Create a StoreBackend backed by InMemoryStore, optionally pre-populated with files.
libs/deepagents/tests/unit_tests/test_middleware_async.py:17
↓ 33 callers
Function
build_oauth_provider
Construct an `OAuthClientProvider` for an MCP server. Args: server_name: MCP server name used in re-auth messages. server_url: Re
libs/code/deepagents_code/mcp_auth.py:1322
↓ 33 callers
Method
edit
Edit a file by replacing string occurrences.
libs/deepagents/tests/unit_tests/middleware/test_summarization_middleware.py:179
↓ 33 callers
Method
get_or_create
( self, *, sandbox_id: str | None = None, # noqa: ARG002 **kwargs: Any, # no
libs/code/tests/unit_tests/test_sandbox_registry.py:33
↓ 33 callers
Method
start
Start the agent runtime, scheduler, and channels.
libs/talon/deepagents_talon/host.py:131
↓ 33 callers
Method
stop
Stop managed components and cancel in-flight agent work.
libs/talon/deepagents_talon/host.py:156
↓ 32 callers
Function
_create_skill
Create a minimal skill directory with a valid `SKILL.md`. Args: skill_dir: Directory to create the skill in (will be created if needed).
libs/code/tests/unit_tests/skills/test_load.py:11
↓ 32 callers
Method
read
Read file content from the mapped real path.
libs/deepagents/tests/unit_tests/test_local_sandbox_operations.py:153
↓ 32 callers
Method
write
(self, path: str, content: str)
libs/deepagents/tests/unit_tests/middleware/test_summarization_middleware.py:164
↓ 31 callers
Method
_handle_offload
Offload older messages to free context window space.
libs/code/deepagents_code/app.py:9794
↓ 31 callers
Function
_make_fake_chat_model
Create a fake chat model compatible with summarization middleware.
libs/code/tests/unit_tests/test_agent.py:71
↓ 31 callers
Method
_sync_status_connection
Mirror the current connection state onto the bottom status bar. The app-level welcome banner keeps rendering its regular footer while
libs/code/deepagents_code/app.py:5442
↓ 31 callers
Method
edit
Edit file content at the mapped real path.
libs/deepagents/tests/unit_tests/test_local_sandbox_operations.py:171
↓ 31 callers
Method
invoke
( self, state: dict[str, object], config: object = None,
libs/deepagents/tests/unit_tests/middleware/test_subagent_middleware_init.py:342
↓ 30 callers
Function
_config
()
libs/code/tests/unit_tests/test_remote_client.py:253
↓ 30 callers
Method
_intercept_large_tool_result
Intercept and process large tool results before they're added to state. Args: tool_result: The tool result to potentially evict (
libs/deepagents/deepagents/middleware/filesystem.py:2961
↓ 30 callers
Function
_invoke
Run `install.sh` non-interactively with the fake tools on `PATH`. `start_new_session` detaches the controlling terminal so `/dev/tty` is unop
libs/code/tests/unit_tests/test_install_script.py:135
↓ 30 callers
Function
_load_theme_preference
Load the forced or saved theme name, or return the default. Resolution order: 1. `DEEPAGENTS_CODE_THEME` env var (explicit override). If it
libs/code/deepagents_code/app.py:525
↓ 30 callers
Function
_runtime
()
libs/deepagents/tests/unit_tests/test_middleware_async.py:36
↓ 30 callers
Function
build_stream_config
Build the LangGraph stream config dict. Stamps the shared `coding-agent-v1` trace-metadata contract (LSEN-277) via `build_coding_agent_metada
libs/code/deepagents_code/config.py:1467
↓ 30 callers
Method
set_tokens
Persist `tokens` to disk, preserving any stored client info. Also records the absolute Unix-epoch expiry as a sidecar so a cold-start
libs/code/deepagents_code/mcp_auth.py:300
↓ 30 callers
Function
validate_path
r"""Validate and normalize file path for security. Ensures paths are safe to use by preventing directory traversal attacks and enforcing cons
libs/deepagents/deepagents/backends/utils.py:578
↓ 29 callers
Function
_get_provider
Get a `SandboxProvider` instance for the specified provider (internal). Args: provider_name: Name of the provider. Resolved through the r
libs/code/deepagents_code/integrations/sandbox_factory.py:1057
↓ 29 callers
Function
_missing_dep_entry
( tool: str = "ripgrep", *, install_command: str | None = None, url: str | None = None, )
libs/code/tests/unit_tests/test_app.py:14512
↓ 29 callers
Function
contains_dangerous_patterns
Check if a command contains dangerous shell patterns. These patterns can be used to bypass allow-list validation by embedding arbitrary comma
libs/acp/deepagents_acp/utils.py:127
↓ 29 callers
Method
from_env
Build a client from `LANGSMITH_*` / `LANGCHAIN_*` env vars. Endpoint resolution is env var > `_DEFAULT_ENDPOINT`. Project-local deplo
libs/cli/deepagents_cli/deploy/api_client.py:91
↓ 29 callers
Function
get_available_models
Get available models dynamically from installed LangChain provider packages. Imports model profiles from each provider package and extracts model
libs/code/deepagents_code/model_config.py:925
↓ 29 callers
Function
get_provider_profile
Look up the `ProviderProfile` for a model spec. !!! beta `deepagents.profiles` exposes beta APIs that may receive minor changes in
libs/deepagents/deepagents/profiles/provider/provider_profiles.py:250
↓ 29 callers
Method
grep
Search files for literal text pattern. Routes to backends based on path: specific route searches one backend, `"/"` or `None` searche
libs/deepagents/deepagents/backends/composite.py:308
↓ 29 callers
Method
new_session
Create a new agent session with the given working directory.
libs/acp/deepagents_acp/server.py:268
↓ 29 callers
Function
write_json
Write a JSON envelope to stdout and flush. The envelope is a single-line JSON object with a stable schema: ```json {"schema_version": 1,
libs/code/deepagents_code/output.py:49
↓ 28 callers
Function
_build_async_subagent_tools
Build the async subagent tools from agent specs. Args: agents: List of async subagent specifications. Returns: List of `Stru
libs/deepagents/deepagents/middleware/async_subagents.py:843
↓ 28 callers
Method
_format_output
Format tool output based on tool type for nicer display. Args: output: Raw output string is_preview: Whether this is
libs/code/deepagents_code/widgets/messages.py:1435
↓ 28 callers
Function
_make_mcp_tool
Build a mock MCP `Tool` object suitable for conversion.
libs/code/tests/unit_tests/test_mcp_tools.py:45
↓ 28 callers
Function
_make_runtime
Create a mock ToolRuntime with a real dict for state.
libs/deepagents/tests/unit_tests/middleware/test_compact_tool.py:79
↓ 28 callers
Function
_write_dist_info
( root: Path, name: str, *, version: str = "1.0.0", requires: tuple[str, ...] = (), )
libs/code/tests/unit_tests/test_update_check.py:135
↓ 28 callers
Method
action_interrupt
Handle escape key. Priority order: 1. If modal screen is active, dismiss it 2. If completion popup is open, dismiss it
libs/code/deepagents_code/app.py:11679
↓ 28 callers
Method
als
Async version of `ls`, delegating to `aexecute`.
libs/deepagents/deepagents/backends/sandbox.py:915
↓ 28 callers
Method
cancel
Cancel the current execution.
libs/acp/deepagents_acp/server.py:373
↓ 28 callers
Method
write
Write content to a file, creating it or overwriting it if it already exists. The update is queued directly via `CONFIG_KEY_SEND`.
libs/deepagents/deepagents/backends/state.py:250
↓ 27 callers
Function
_make_banner
Create a `WelcomeBanner` with all env vars cleared. Args: thread_id: Optional thread ID to display. project_name: If set, simulat
libs/code/tests/unit_tests/test_welcome.py:60
↓ 27 callers
Function
_make_prefixed_tool
Build a mock tool as the adapter produces with `tool_name_prefix=True`.
libs/code/tests/unit_tests/test_mcp_tools.py:2566
↓ 27 callers
Function
_register_lc_theme
Register the LangChain theme on a test app so ThemeSelectorScreen works.
libs/code/tests/unit_tests/test_theme.py:1945
↓ 27 callers
Method
grep
(self, pattern: str, path: str | None = None, glob: str | None = None)
libs/deepagents/tests/unit_tests/backends/test_composite_backend.py:1161
↓ 27 callers
Method
on_connect
Store the client connection for sending session updates.
libs/acp/deepagents_acp/server.py:183
↓ 27 callers
Method
show_selector
Show the model selector screen. Starts in the full-list (`_recommended_only=False`) state so that legacy assertions about the full ca
libs/code/tests/unit_tests/test_model_selector.py:83
↓ 26 callers
Function
_config
(tmp_path: Path, env: dict[str, str] | None = None)
libs/talon/tests/test_host.py:116
↓ 26 callers
Function
_get_by_id
(data: list[DataItemT], item_id: int, label: str)
libs/evals/tests/evals/test_tool_usage_incident_graph.py:340
↓ 26 callers
Function
_greet_tool
A synchronous tool that records its invocations. Async-capable by default because `StructuredTool.from_function` synthesises a coroutine wrap
libs/partners/quickjs/tests/unit_tests/test_ptc.py:52
↓ 26 callers
Method
action_quit_or_interrupt
Handle Ctrl+C - interrupt agent, reject approval, or quit on double press. Priority order: 1. If a focused input has a non-empty sele
libs/code/deepagents_code/app.py:11514
↓ 26 callers
Method
first
()
libs/code/tests/unit_tests/test_app.py:13226
↓ 26 callers
Method
get_images
Get all tracked images. Returns: Copy of the list of tracked images.
libs/code/deepagents_code/input.py:165
↓ 26 callers
Function
get_provider_auth_status
Return credential readiness details for a provider. Combines config, well-known provider metadata, optional provider auth, and implicit-auth
libs/code/deepagents_code/model_config.py:1799
↓ 26 callers
Function
is_env_truthy
Return whether env var *name* is set to a recognizably truthy value. Unlike `bool(os.environ.get(name))`, this does not treat `"0"` or `"fals
libs/code/deepagents_code/_env_vars.py:275
↓ 26 callers
Function
make_skill_content
Create SKILL.md content with YAML frontmatter. Args: name: Skill name for frontmatter description: Skill description for frontmat
libs/deepagents/tests/unit_tests/middleware/test_skills_middleware.py:72
↓ 26 callers
Method
set_future
Set the future to resolve when user answers.
libs/code/deepagents_code/widgets/ask_user.py:178
↓ 25 callers
Method
_dispatch_notification_action
Execute the side effect for a notification action. Catches `Exception` broadly so any failure in the handler surfaces as a warning to
libs/code/deepagents_code/app.py:13478
↓ 25 callers
Function
_make_backend
Create a mock backend with execute() returning the given output.
libs/code/tests/unit_tests/test_local_context.py:103
↓ 25 callers
Function
_run_startup_auto_update
Apply enabled auto-updates before the TUI and server start. On a successful upgrade the process is re-exec'd so the new version is loaded. An
libs/code/deepagents_code/main.py:255
↓ 25 callers
Method
grep
Search for a literal text pattern in files. Uses ripgrep if available, falling back to Python search. Args: pattern: Lit
libs/deepagents/deepagents/backends/filesystem.py:622
↓ 25 callers
Method
ls
List directory contents (non-recursive). If path matches a route, lists only that backend. If path is `"/"`, aggregates default backe
libs/deepagents/deepagents/backends/composite.py:183
↓ 25 callers
Function
resolve_model
Resolve a model string to a `BaseChatModel`. If `model` is already a `BaseChatModel`, returns it unchanged. String models are resolved via `
libs/deepagents/deepagents/_models.py:35
↓ 24 callers
Function
_make_model
Create a mock BaseChatModel exposing `attrs` via attribute access. `get_model_identifier` reads `model_name` / `model` directly off the insta
libs/deepagents/tests/unit_tests/test_models.py:70
↓ 24 callers
Function
_make_tokens
(access_token: str = "at")
libs/code/tests/unit_tests/test_mcp_auth.py:93
↓ 24 callers
Function
_make_tool_page
Build a mock `list_tools` page result.
libs/code/tests/unit_tests/test_mcp_tools.py:60
↓ 24 callers
Function
_named_mw
Return a minimal AgentMiddleware whose .name returns `name`.
libs/deepagents/tests/unit_tests/test_graph.py:2234
↓ 24 callers
Function
_tool_msg_app
Build a single-`ToolCallMessage` Textual app for pilot-driven tests. Args: tool_name: Tool name the message represents. args: Opt
libs/code/tests/unit_tests/test_messages.py:880
↓ 24 callers
Function
_transport
(handler: Handler)
libs/cli/tests/unit_tests/deploy/test_api_client.py:16
↓ 24 callers
Method
agrep
Async version of grep. See `grep()` for detailed documentation on routing behavior and parameters.
libs/deepagents/deepagents/backends/composite.py:374
↓ 24 callers
Function
execute_mcp_servers_command
Run the `deepagents mcp-servers` sub-command.
libs/cli/deepagents_cli/deploy/commands.py:710
↓ 24 callers
Function
get_system_prompt
Get the base system prompt for the agent. Loads the base system prompt template from `system_prompt.md` and interpolates dynamic sections (mo
libs/code/deepagents_code/agent.py:792
↓ 24 callers
Method
invoke
(self, *_a, **_k)
libs/partners/quickjs/tests/unit_tests/test_repl_middleware.py:100
↓ 24 callers
Method
open
(_payload: object)
libs/deepagents/tests/unit_tests/middleware/test_video.py:280
↓ 24 callers
Method
reset
Clear all phases and hide the panel immediately (e.g. on `/clear`).
libs/code/deepagents_code/widgets/subagent_panel.py:577
↓ 24 callers
Function
run_agent_async
Run agent eval asynchronously against the given query. Args: agent: The compiled state graph to invoke. query: A string prompt or
libs/evals/tests/evals/utils.py:1237
↓ 24 callers
Method
start
Start the `langgraph dev` server and wait for it to be healthy. Args: timeout: Max seconds to wait for the server to become healt
libs/code/deepagents_code/server.py:443
↓ 23 callers
Method
_load_thread_history
Load and render message history when resuming a thread. When `preloaded_payload` is provided (e.g., from `_resume_thread`), this reus
libs/code/deepagents_code/app.py:10735
↓ 23 callers
Function
_make_config
( tmp_path: Path, *, exposure: ChannelExposure | None = None, operator_id: str | None = None,
libs/talon/tests/channels/test_telegram.py:196
↓ 23 callers
Function
_make_remote_agent
Create a RemoteAgent pointing at a dummy URL for test scaffolding.
libs/code/tests/unit_tests/test_model_switch.py:37
↓ 23 callers
Function
_parse_version
Parse a PEP 440 version string into a comparable `Version` object. Supports stable (`1.2.3`) and pre-release (`1.2.3a1`, `1.2.3rc2`) versions.
libs/code/deepagents_code/update_check.py:153
← previous
next →
101–200 of 17,176, ranked by callers