Skip to content

[Feature]: OpenAI Agents SDK Cookbook #92

@yatharthk2

Description

@yatharthk2

Cookbook: Using Moss with OpenAI Agents SDK

Add a cookbook example showing how to wire Moss into an OpenAI Agents SDK agent as a retrieval tool.

What the example should cover

  • Load a Moss index locally (load_index) before querying, to demonstrate sub-10ms retrieval
  • Wrap client.query() as a function tool using the OpenAI Agents SDK @function_tool decorator
  • Show optional metadata filter support passed as tool arguments
  • End-to-end agent run: agent receives a question, calls the Moss tool, returns a grounded answer

Acceptance Criteria

  • Example under examples/cookbook/openai-agents/
  • Handles load_index() before the agent runs (not silently skipped)
  • Tool schema covers query, top_k, and optional filter arguments
  • Includes a short README explaining when to use metadata filters and the local-vs-cloud speed tradeoff

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions