Skip to content

Add agent_tool() examples for common use cases #15

@sunilp

Description

@sunilp

What

Add more examples to examples/agent-as-tool/ demonstrating real-world use cases for the three invocation modes:

  • Sync: Document classification, sentiment analysis, entity extraction
  • Streaming: Long-form research with progress, data pipeline with partial results
  • Conversational: Code review with iterative feedback, negotiation between agents

Why

The current example covers the mechanics but does not show domain-specific patterns. More examples help developers understand when to use each mode.

How

  1. Pick one use case from the list above
  2. Create a new Python file in examples/agent-as-tool/ (e.g., sentiment_analysis.py)
  3. Use the agent_tool() wrapper and WorkflowGraph — see examples/agent-as-tool/main.py for patterns
  4. Add a brief description to examples/agent-as-tool/README.md

Getting Started

pip install jamjet
cd examples/agent-as-tool
python main.py  # run existing example to understand the pattern

Key files to read:

  • sdk/python/jamjet/agent_tool.py — the agent_tool() function
  • examples/agent-as-tool/main.py — existing example with all 3 modes

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions