Deep Agents
Agent automatyzacji zadań z Deep Agents
Zbuduj agenta automatyzacji zadań, który tworzy, przypisuje i śledzi zadania w przepływie zarządzania projektem — z Deep Agents.
automationproject managementtasksworkflow
Działający kod
from deepagents import create_deep_agentfrom langchain_core.tools import tool
@tooldef create_task(title: str, description: str, assignee: str = "") -> str: """Create a new task in the project.""" task_id = project.create_task(title=title, description=description, assignee=assignee) return f"Task created: #{task_id} - {title}"
@tooldef list_tasks(status: str = "open") -> str: """List tasks filtered by status (open, in_progress, done).""" tasks = project.list_tasks(status=status) return "\n".join(f"#{t.id} [{t.status}] {t.title} -> {t.assignee}" for t in tasks)
@tooldef update_task(task_id: int, status: str) -> str: """Update task status.""" project.update_task(task_id, status=status) return f"Task #{task_id} updated to {status}"
agent = create_deep_agent( model="anthropic:claude-sonnet-4-5-20250929", tools=[create_task, list_tasks, update_task], system_prompt="You are a project management assistant. Help organize tasks: create new ones, track progress, and update statuses. Be proactive about suggesting task breakdowns.",)
result = agent.invoke({ "messages": [("user", "Break down 'Launch new website' into subtasks and assign them to the team")]})print(result["messages"][-1].content)Krok po kroku
1
Zainstaluj zależności
Zainstaluj Deep Agents i wymagane narzędzia do tego przypadku użycia.
2
Zdefiniuj narzędzia
Stwórz specyficzne dla domeny funkcje narzędzi, których agent będzie używał do interakcji z zewnętrznymi serwisami.
3
Stwórz agenta i uruchom
Zainicjalizuj agenta Deep Agents z narzędziami, ustaw prompt systemowy i wykonaj zapytanie.
Zbuduj z innymi frameworkami
Więcej poradników z Deep Agents
Gotowy do budowania z Deep Agents?
Wygeneruj gotowy do produkcji projekt z Deep Agents — FastAPI + Next.js, autoryzacja, streaming i więcej.
RozpocznijGotowy, żeby zbudować swojego pierwszego agenta AI?
Open-source'owe narzędzia, sprawdzone wzorce, zero boilerplate'u. Skonfiguruj swój stos i wyślij w minuty — nie miesiące.