Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions python/packages/declarative/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ YAML/JSON-based declarative agent and workflow definitions.
```python
from agent_framework.declarative import AgentFactory, WorkflowFactory

agent = AgentFactory.create_from_file("agent.yaml")
workflow = WorkflowFactory.create_from_file("workflow.yaml")
# Create agent from YAML file
agent_factory = AgentFactory()
agent = agent_factory.create_agent_from_yaml_path("agent.yaml")

# Create workflow from YAML file
workflow_factory = WorkflowFactory()
workflow = workflow_factory.create_workflow_from_yaml_path("workflow.yaml")
```

## Import Path
Expand Down
21 changes: 18 additions & 3 deletions python/packages/durabletask/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,29 @@ Durable execution support for long-running agent workflows using Azure Durable F
## Usage

```python
from durabletask.client import TaskHubGrpcClient
from durabletask.worker import TaskHubGrpcWorker
from agent_framework import ChatAgent
from agent_framework.azure import AzureOpenAIChatClient
from agent_framework_durabletask import DurableAIAgentClient, DurableAIAgentWorker

# Client side
client = DurableAIAgentClient(endpoint="https://your-functions.azurewebsites.net")
response = await client.run("Hello")
dt_client = TaskHubGrpcClient(host_address="localhost:4001")
agent_client = DurableAIAgentClient(dt_client)
agent = agent_client.get_agent("assistant")
response = agent.run("Hello, how are you?")
print(response.text)

# Worker side
worker = DurableAIAgentWorker(agent=my_agent)
dt_worker = TaskHubGrpcWorker(host_address="localhost:4001")
agent_worker = DurableAIAgentWorker(dt_worker)

# Create a chat client for the agent
chat_client = AzureOpenAIChatClient()
my_agent = ChatAgent(chat_client=chat_client, name="assistant")
agent_worker.add_agent(my_agent)

dt_worker.start()
```

## Import Path
Expand Down
Loading
Loading