aexecute • AI Agent SDK

aexecute: Execute code asynchronously.

aexecute

Async

Method

</div>

This is a method of the CodeAgent class in the code_agent module.

Execute code asynchronously.

Signature

python
async def aexecute(code: str, language: str) -> Dict[str, Any]

Parameters

ParamField str

Code to execute

ParamField str

Programming language **kwargs: Additional options

Returns

ResponseField Dict[str, Any]

Execution result dictionary

Uses

  • asyncio.get_event_loop
  • loop.run_in_executor
  • execute

Source

View on GitHub

praisonaiagents/agent/code_agent.py at line 281