kodeagent.agents#


class kodeagent.agents.CSVAnalysisAgent(name: str = 'CSV Analyst', model_name: str = 'gemini/gemini-2.0-flash-lite', **kwargs: Any)[source]#

Bases: ReActAgent

An agent specializing in discovering patterns and insights from CSV data.

Examples

Using a local file:
agent = CSVAnalysisAgent()
# Pass the file path (or URL) directly as a task file
async for response in agent.run(task, files=['/path/to/data.csv']):
    pass
Using a URL:
agent = CSVAnalysisAgent()
async for response in agent.run(task, files=['https://example.com/data.csv']):
    pass

Initialize the CSVAnalysisAgent.

Parameters:
  • name – Name of the agent.

  • model_name – The LLM model to use.

  • **kwargs – Additional arguments passed to ReActAgent.

async pre_run() AsyncIterator[AgentResponse][source]#

Pre-run hook to auto-load CSV files and yield initialization logs.