> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Analyze Codebase • AI Agent SDK

> analyze_codebase: Protocol-compatible alias for analyze_codebase_with_gitingest.

# analyze\_codebase

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**ContextAgent**](../classes/ContextAgent) class in the [**context\_agent**](../modules/context_agent) module.

Protocol-compatible alias for analyze\_codebase\_with\_gitingest.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def analyze_codebase(project_path: str) -> Dict[str, Any]
```

## Parameters

<ParamField query="project_path" type="str" required={true}>
  Path to the project directory
</ParamField>

### Returns

<ResponseField name="Returns" type="Dict[str, Any]">
  Analysis results including patterns, architecture, conventions
</ResponseField>

## Uses

* `analyze_codebase_with_gitingest`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/context_agent.py#L2389">
  `praisonaiagents/agent/context_agent.py` at line 2389
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Code Agent" icon="code" href="/docs/features/codeagent" />

  <Card title="Code Feature" icon="terminal" href="/docs/features/code" />
</CardGroup>
