Back to list
Jawad-Chaudhary

openai-agents

by Jawad-Chaudhary

The Evolution of Todo: A spec-driven, AI-native journey from a Python CLI to a Cloud-Native, Event-Driven AI Chatbot deployed on Kubernetes. Built with Claude Code, Spec-Kit Plus, Next.js, FastAPI, and Dapr.

0🍴 0📅 Jan 22, 2026

SKILL.md


name: openai-agents description: Build AI agents with OpenAI Agents SDK, tool registration, conversation history, and stateless execution. Use when creating AI agents, registering tools, or handling conversations.

OpenAI Agents SDK Integration

Agent Initialization

from openai import OpenAI
from openai.agents import Agent, Runner

client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))

agent = Agent(
    name="TaskAssistant",
    instructions="""You are a helpful task management assistant.
Use the provided tools to help users manage their todo list.
Always confirm actions with friendly responses.
If a user's request is ambiguous, ask for clarification.""",
    model="gpt-4o",
    tools=[]  # MCP tools registered here
)

Tool Registration (from MCP)

tools = [
    {
        "type": "function",
        "function": {
            "name": "add_task",
            "description": "Create a new task",
            "parameters": {
                "type": "object",
                "properties": {
                    "user_id": {"type": "string"},
                    "title": {"type": "string"},
                    "description": {"type": "string"}
                },
                "required": ["user_id", "title"]
            }
        }
    }
]
agent.tools = tools

Running Agent with History

async def run_agent(messages: list[dict]) -> tuple[str, list[str]]:
    """Run agent with conversation history."""
    runner = Runner(agent=agent)
    result = await runner.run(messages=messages)
    
    # Extract response
    response = result.messages[-1].content[0].text.value
    
    # Extract tool calls
    tool_calls = [
        call.function.name 
        for msg in result.messages 
        if hasattr(msg, 'tool_calls') 
        for call in msg.tool_calls
    ]
    
    return response, tool_calls

Message Format

messages = [
    {"role": "user", "content": "Add a task"},
    {"role": "assistant", "content": "I've added the task"},
    {"role": "user", "content": "Show my tasks"}
]

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon