AgentApp

class AgentApp[source]

Bases : object

Flower AgentApp.

Exemples

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.

Exemples

app = AgentApp()

@app.main()
def main(agent: AgentSession, context: Context) -> None:
    print("AgentApp running")