AgentApp¶
- class AgentApp[source]¶
Bases:
objectFlower AgentApp.
实例
Define an AgentApp with a single main function:
app = AgentApp() @app.main() def main(agent: AgentSession, context: Context) -> None: print("AgentApp running")
Methods
main()Return a decorator that registers the main fn with the agent app.
- main() Callable[[Callable[[AgentSession, Context], None]], Callable[[AgentSession, Context], None]][source]¶
Return a decorator that registers the main fn with the agent app.
实例
app = AgentApp() @app.main() def main(agent: AgentSession, context: Context) -> None: print("AgentApp running")