diff --git a/docs/swarms/agents/third_party.md b/docs/swarms/agents/third_party.md index 3ab8700f..c8f9a496 100644 --- a/docs/swarms/agents/third_party.md +++ b/docs/swarms/agents/third_party.md @@ -509,6 +509,13 @@ logging.basicConfig(level=logging.INFO) monitored_agent = MonitoredAgent("MonitoredGriptapeAgent") result = monitored_agent.run("Summarize the latest AI research papers") ``` +Additionally the Agent class now includes built-in logging functionality and the ability to switch between JSON and string output. + +To switch between JSON and string output: +- Use `output_type="str"` for string output (default) +- Use `output_type="json"` for JSON output + +The `output_type` parameter determines the format of the final result returned by the `run` method. When set to "str", it returns a string representation of the agent's response. When set to "json", it returns a JSON object containing detailed information about the agent's run, including all steps and metadata. ## 6. Best Practices for Custom Agent Development @@ -614,4 +621,4 @@ The ability to seamlessly integrate agents from libraries like Griptape, Langcha As you embark on your journey with the swarms framework, remember that the field of AI and agent-based systems is rapidly evolving. Stay curious, keep experimenting, and don't hesitate to push the boundaries of what's possible with custom agents and integrated libraries. -By embracing the power of the swarms framework and the ecosystem of agent libraries it supports, you're well-positioned to create the next generation of intelligent, adaptive, and collaborative AI systems. Happy agent building! \ No newline at end of file +By embracing the power of the swarms framework and the ecosystem of agent libraries it supports, you're well-positioned to create the next generation of intelligent, adaptive, and collaborative AI systems. Happy agent building!