deepagentsjs

repository·main·Indexed 23 days ago

https://github.com/langchain-ai/deepagentsjs

A library for building controllable AI agents with LangGraph. It includes a Modal-backed implementation of the SandboxBackendProtocol for secure code execution, file management, and GPU access, along with a comprehensive suite of behavioral evaluations for testing agent reasoning, memory, file operations, and Human-in-the-Loop (HITL) interrupts.

Tokens
75K
Snippets
173
Records
379
Agent score
80%

What's inside deepagentsjs

  1. Overview of @deepagents/evals

    main

    The @deepagents/evals package is a generic evaluation harness designed for deepagents. It provides a standardized runner interface, a runner registry, trajectory parsing, and custom Vitest matchers that integrate with LangSmith feedback for experiment tracking.

    Package Exports

    ExportDescription
    @deepagents/evalsCore harness including EvalRunner, registry functions, parseTrajectory, getFinalText, and custom matchers.
    @deepagents/evals/deepagentProvides registerDeepAgentRunner() to bridge createDeepAgent into the generic runner interface.
    @deepagents/evals/setupA side-effect import that automatically registers all concrete runners (e.g., sonnet-4-5, gpt-4.1).
  2. Overview of tool-usage-relational evaluation

    main

    The tool-usage-relational evaluation suite tests an agent's ability to perform multi-step tool chaining over relational datasets. It specifically focuses on scenarios where data entities (such as users, locations, and foods) are connected via IDs.

    Key testing capabilities include:

    • Sequential Lookups: Verifying the agent can navigate relational hops (from 1 to 4 hops deep) to find connected information.
    • Parallel Fan-out: Testing if the agent can correctly identify and execute multiple independent tool calls simultaneously in a single step when the tasks do not depend on each other.
  3. Overview of memory-agent-bench

    main
    The memory-agent-bench package provides evaluation suites designed to test agent performance in scenarios involving long-context memorization, conflict resolution, and retrieval from file-seeded data. It is specifically tailored for benchmarking how well agents handle large amounts of information and resolve contradictions within that information.
  4. Overview of subagent delegation evals

    main

    The subagents evaluation suite is designed to test subagent delegation capabilities. Specifically, it evaluates how well an agent performs task tool routing to two types of subagents:

    1. Named subagents: Specific subagents with defined identities or roles.
    2. General-purpose subagents: Subagents designed for broad, non-specific tasks.

    Use these evals to ensure your agent correctly identifies when a task requires delegation and routes the tool call to the appropriate subagent entity.

  5. Overview of tau2-airline evaluations

    main
    The tau2-airline evaluation suite is inspired by Tau2-airline. It is designed to evaluate airline support agents on their ability to perform policy-grounded tool use. The suite covers 15 distinct task IDs, testing how well an agent can navigate airline policies while utilizing available tools to resolve customer issues.
  6. Evaluate tool selection and tool chaining

    main

    The tool-selection evaluation suite is designed to assess an agent's ability to perform three specific capabilities:

    1. Direct tool selection: Choosing the correct tool for a single, straightforward task.
    2. Indirect tool selection: Selecting tools based on complex or nuanced reasoning where the tool choice is not immediately obvious.
    3. Multi-step tool chaining: Successfully sequencing multiple tool calls to complete a complex, multi-stage objective.
  7. Understand the purpose of basic agent behavior evaluations

    main

    The basic evaluation suite is designed to measure core agent behaviors. It focuses on fundamental capabilities that every agent should possess, specifically:

    • System prompt adherence: Ensuring the agent follows the instructions and constraints provided in its system prompt.
    • Simple reasoning: Testing the agent's ability to perform logical steps to reach a conclusion.
    • Avoiding unnecessary tool calls: Verifying that the agent only invokes tools when required by the task, preventing redundant or incorrect tool usage.
  8. Run all evaluation suites via the aggregate runner

    main

    The all package provides an aggregate eval runner that allows you to execute all available evaluation suites through a single top-level ls.describe block in eval.test.ts. This approach ensures that the entire execution run is captured under a single LangSmith experiment target, making it easier to monitor and compare results across different suites.

    Each individual suite is implemented as a function following the pattern <suiteName>Suite(runner), exported from its own index.ts file. The aggregate runner in evals/all/eval.test.ts imports these functions and invokes them directly to orchestrate the full evaluation process.

  9. Use file operation evals for agent testing

    main

    The files evaluation suite is designed to test an agent's ability to perform standard file system operations. Use these evals to verify that an agent can correctly execute the following tasks:

    • Read: Accessing file contents.
    • Write: Creating or overwriting files.
    • Edit: Modifying existing files.
    • ls: Listing directory contents.
    • grep: Searching for patterns within files.
    • glob: Using pattern matching to find files.
    • Parallel I/O: Handling multiple I/O operations concurrently.
  10. DeepAgents ACP Server Features and Customization

    main

    The ACP server provides several core capabilities for agentic workflows:

    Core Features

    • Full Filesystem Access: Read, write, and edit files within the workspace.
    • Code Search: Support for grep and glob patterns.
    • Task Management: Tracking todo lists for complex tasks.
    • Subagent Delegation: Spawning specialized subagents.
    • Session Persistence: Maintaining context across interactions.
    • Multiple Modes: Switching between Agent, Plan, and Ask modes.

    Customization

    You can customize the server behavior by editing examples/acp-server/server.ts. Key configurable areas include:

    • Model selection
    • System prompts
    • Skills and memory paths
    • Custom tools
    • Middleware configuration
  11. Evaluate summarization middleware and history compaction

    main

    The summarization evaluation suite is used to assess how middleware handles summarization tasks. Specifically, it evaluates:

    • Summarization middleware behavior: How the system processes and generates summaries.
    • History offloading: The effectiveness of moving older conversation history into summaries.
    • Continued task performance after compaction: How well the agent performs its tasks after the conversation history has been compacted via summarization.