Implementing with Agent
Prerequisites
1
2
Example Code
import asyncio
from pathlib import Path
from deepagents import create_deep_agent
from deepagents.graph import init_chat_model
from deepagents.backends.filesystem import FilesystemBackend
from gl_connectors_tools.skills import SkillFactory
async def main():
await SkillFactory.from_github(
source="https://github.com/langchain-ai/deepagentsjs/blob/main/examples/skills/langgraph-docs",
destination=[".deepagents/skills"],
)
agent = create_deep_agent(
model=init_chat_model("openai:gpt-5-mini"),
backend=FilesystemBackend(root_dir=str(Path(__file__).parent.absolute())),
skills=[".deepagents/skills/"],
system_prompt="You are a LangGraph documentation assistant. You can use the LangGraph documentation skill to help the user with their questions.",
)
result = agent.invoke({
"messages": [{"role": "user", "content": "What are agent skills and how to create them?"}],
})
print(result["messages"][-1].content)
asyncio.run(main())Observing Skill Impact
agent = create_deep_agent(
model=init_chat_model("openai:gpt-5-mini"),
backend=FilesystemBackend(root_dir=current_dir),
# skills=[".deepagents/skills/"],
system_prompt="You are a LangGraph documentation assistant. You can use the LangGraph documentation skill to help the user with their questions.",
)Last updated
Was this helpful?