Skip to content
Agentmart
Submit a tool

foundry-agent-chat

Create an ad-hoc Microsoft Foundry agent for a specific purpose using the new v2 Responses API.

Skill by aymenfurter

IndexedMIT★ 87
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/aymenfurter-foundry-agent-chat

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Create an ad-hoc Microsoft Foundry agent for a specific purpose using the new v2 Responses API. Build a custom prompt agent with optional tools, run a conversation, and clean up. Use when the user says: "create a foundry agent", "make an agent for", "foundry agent", "build an ai agent", "create an assistant", "spin up an agent", "agent for this task"

Use cases: backend, marketing, productivity, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/foundry-agent-chat

What's inside

Skill name
foundry-agent-chat
Description
Create an ad-hoc Microsoft Foundry agent for a specific purpose using the new v2 Responses API. Build a custom prompt agent with optional tools, run a conversation, and clean up. Use when the user says: "create a foundry agent", "make an agent for", "foundry agent", "build an ai agent", "create an assistant", "spin up an agent", "agent for this task"
License
MIT
Metadata
verb: create
Instructions
218 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Foundry Agent Chat

Create an ad-hoc Foundry prompt agent tailored to a specific purpose using the new v2 Responses API with conversations.

## Prerequisites

The user must have completed the Foundry setup (the `setup-foundry` skill). They need:
- `FOUNDRY_PROJECT_ENDPOINT` -- the project endpoint URL
- `FOUNDRY_MODEL_DEPLOYMENT_NAME` -- the model deployment name

If these are not set, ask the user for the values.

## Steps

### 1. Define the Agent Purpose

Ask the user:
- What should the agent do? (e.g., "Write marketing copy", "Answer questions about our docs", "Translate text")
- Should it have any special instructions or persona?
- Does it need any tools? (code interpreter, file search, web search)

### 2. Create and Run the Agent

Use the following Python script. Customize the `agent_name`, `instructions`, and `tools` based on the user's requirements.

**Basic prompt agent (no tools):**

```bash
python3 << 'PYEOF'
import os
from azure.identity import DefaultAzureCredential
from azure.ai.projects import AIProjectClient
from azure.ai.projects.models import PromptAgentDefinition

endpoint = os.environ.get("FOUNDRY_PROJECT_ENDPOINT", "<ENDPOINT>")
model = os.environ.get("FOUNDRY_MODEL_DEPLOYMENT_NAME", "<MODEL>")

project_client = AIProjectClient(
    endpoint=endpoint,
    credential=DefaultAzureCredential(),
)

with project_client:
    openai_client = project_client.get_openai_client()

    # Create a purpose-built agent
    agent = project_client.agents.create_version(
        agent_name="AGENT_NAME_HERE",
        definition=PromptAgentDefinition(
            model=model,
            instructions="INSTRUCTIONS_HERE",
        ),
        description="DESCRIPTION_HERE",
    )
    print(f"Agent created: {agent.name} v{agent.version}")

    # Create a conversation
    conversation = openai_client.conversations.create()

    # Send the user's message
    response = openai_client.responses.create(
        conversation=conversation.id,
        input="USER_MESSAGE_HERE",
        extra_body={"agent": {"name": agent.name, "type": "agent_reference"}},
    )

    # Print the response
    print(response.output_text)

    # Clean up
    project_client.agents.delete_version(agent_name=agent.name, agent_version=agent.version)
    print("Agent cleaned up.")
PYEOF
```

**Agent with tools (code interpreter + web search):**

```bash
python3 << 'PYEOF'
import os
from azure.identity import DefaultAzureCredential
from azure.ai.projects import AIProjectClient
from azure.ai.projects.models import (
    PromptAgentDefinition,
    CodeInterpreterTool,
    CodeInterpreterToolAuto,
)

endpoint = os.environ.get("FOUNDRY_PROJECT_ENDPOINT", "<ENDPOINT>")
model = os.environ.get("FOUNDRY_MODEL_DEPLOYMENT_NAME", "<MODEL>")

project_client = AIProjectClient(
    endpoint=endpoint,
    credential=DefaultAzureCredential(),
)

with project_client:
    openai_client = project_client.get_openai_client()

    # Create agent with tools
    agent = project_client.agents.create_version(
        agent_name="AGENT_NAME_HERE",
        definition=PromptAgentDefinition(
            model=model,
            instructions="INSTRUCTIONS_HERE",
            tools=[
                CodeInterpreterTool(container=CodeInterpreterToolAuto()),
                {"type": "web_search_preview"},
            ],
        ),
        description="DESCRIPTION_HERE",
    )
    print(f"Agent created: {agent.name} v{agent.version}")

    # Create a conversation
    conversation = openai_client.conversations.create()

    # Send the user's message
    response = openai_client.responses.create(

From aymenfurter/polyclaw, MIT.

More from aymenfurter/polyclaw

Signals

Stars
87
Forks
19
Open issues
1
Last commit (this folder)
Feb 15, 2026 (8 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from aymenfurter

Cite this page

foundry-agent-chat skill. Agent Mart. https://agentmart.dev/skills/aymenfurter-foundry-agent-chat (last updated 2026-10-24)