Skip to content

Deep Agents Example with deepagents #63

@ponderingdemocritus

Description

@ponderingdemocritus

Deep Agents Example with deepagents

Summary

  • Build a reference example that integrates deepagents with @lucid-agents/agent-kit to showcase a "Deep Agent" capable of planning, subagents, filesystem tooling, and x402 monetization.
  • Provide a reusable boilerplate that demonstrates long-horizon task execution using the deepagents middleware stack together with our paywall and trust primitives.

Problem Statement

Our examples currently focus on single-tool or shallow agent workflows. Builders who want to create Claude Code–style deep agents must piece together planning, subagent, filesystem, and memory tooling on their own. This results in brittle implementations and slower onboarding for complex automation use cases.

Requirements

  • Leverage the deepagents TypeScript package (latest release) to construct a deep agent that chains planning, subagents, filesystem access, and the LangGraph memory backends.
  • Wire the agent into @lucid-agents/agent-kit so that it exposes at least one paid entrypoint protected by x402, demonstrating how deep agents can be monetized.
  • Include tool examples (e.g., Tavily search, filesystem operations, code editing) that highlight how deep agents coordinate multi-step work.
  • Provide a custom system prompt and optional subagent definitions to illustrate how teams can extend deep agents for domain-specific tasks.
  • Document environment variable setup (LLM keys, Tavily API key, facilitator URL, wallet keys) and explain how to switch between local and production backends.

Proposed Scope & Tasks

  • Add a new example directory (e.g. packages/agent-kit/examples/deep-agent/).
  • Implement an agent entrypoint that initializes a deepagents workflow, including planning middleware, filesystem backend, and subagents.
  • Demonstrate at least one specialized subagent (e.g., research or code-editing) and show how it collaborates with the main agent.
  • Integrate x402 pricing via paywall.ts, ensuring the deep agent endpoint enforces payment headers and supports streaming responses.
  • Provide sample scripts or clients to invoke the deep agent and observe the planning/subagent/tool loop.
  • Write a README explaining setup, dependencies (deepagents, @langchain/tavily, etc.), environment configuration, and customization guidance.
  • Capture any follow-up work required for CLI scaffolding (create-agent-kit) if we decide to expose deep agent templates.

Acceptance Criteria

  • Running the documented steps produces a functioning deep agent that plans, calls tools, and enforces x402 payments via @lucid-agents/agent-kit.
  • Example highlights how to configure custom system prompts, subagents, and middleware using deepagents APIs.
  • Documentation is clear about required environment variables, security considerations (private keys, paid actions), and backend selection (state, store, filesystem).
  • Example adheres to repository standards (TypeScript strict mode, Bun scripts, lint clean) and is structured for easy adaptation by builders.

Additional Context

  • Reference deepagents documentation and existing examples such as examples/research/research-agent.ts for guidance on complex workflows.
  • Consider demonstrating LangGraph integrations like human-in-the-loop interrupts or persistent memory if feasible.
  • Coordinate with the identity team if long-term memory or trust configuration requires additional infrastructure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions